[arch-commits] Commit in goagent/trunk (PKGBUILD goagent.install goagent.service)

Felix Yan fyan at nymeria.archlinux.org
Wed May 22 22:32:24 EDT 2013


    Date: Thursday, May 23, 2013 @ 04:32:24
  Author: fyan
Revision: 91473

upgpkg: goagent 3.0.0-1

Modified:
  goagent/trunk/PKGBUILD
  goagent/trunk/goagent.install
  goagent/trunk/goagent.service

-----------------+
 PKGBUILD        |   46 ++++++++++++++++------------------------------
 goagent.install |    8 +++++---
 goagent.service |    2 +-
 3 files changed, 22 insertions(+), 34 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-05-23 01:19:04 UTC (rev 91472)
+++ PKGBUILD	2013-05-23 02:32:24 UTC (rev 91473)
@@ -4,52 +4,38 @@
 # Contributor: Guten <ywzhaifei at gmail.com> 
 
 pkgname=goagent
-pkgver=2.1.17
+pkgver=3.0.0
 pkgrel=1
 pkgdesc="A gae proxy forked from gappproxy/wallproxy"
 arch=("any")
 url="http://goagent.googlecode.com"
 license=("GPL2")
-depends=('python2' 'python2-pyopenssl' 'python2-gevent-beta')
+depends=('python' 'python-pyopenssl')
+optdepends=('python2: if you want to use uploader.zip to upload server')
 source=(https://github.com/goagent/goagent/archive/v$pkgver.tar.gz
         $pkgname.service)
 backup=('etc/goagent')
 install=goagent.install
 
 package() {
-  cd "$srcdir/$pkgname-$pkgver"
+  cd "$srcdir/$pkgbase-$pkgver"
+  
+  install -Dm755 local/proxy.py "$pkgdir/usr/share/$pkgname/local/proxy.py"
+  install -Dm644 local/proxy.pac "$pkgdir/usr/share/$pkgname/local/proxy.pac"
+  install -Dm644 local/cacert.pem "$pkgdir/usr/share/$pkgname/local/cacert.pem"
+  install -Dm644 local/SwitchyOptions.bak "$pkgdir/usr/share/$pkgname/local/SwitchyOptions.bak"
+  install -Dm644 local/SwitchySharp_1_9_52.crx "$pkgdir/usr/share/$pkgname/local/SwitchySharp_1_9_52.crx"
 
-  # python2 fix
-  sed -i -re "1s/python2?/python2/" local/*.py
-  chmod +x local/proxy.py
-
-  mkdir -p "$pkgdir/opt/goagent"
-  cp -r local server "$pkgdir/opt/goagent"
+  install -Dm644 local/proxy.ini "$pkgdir/etc/goagent"
+  ln -sf "/etc/goagent" "${pkgdir}/usr/share/$pkgname/local/proxy.ini"
   
-  # remove Windows-only files
-  rm -f "$pkgdir/opt/goagent/"*/*.{vbs,dll,exe,manifest,bat}
-  rm -f "$pkgdir/opt/goagent/local/python27.zip"
+  cp -r server "$pkgdir/usr/share/$pkgname/"
+  rm "$pkgdir/usr/share/$pkgname/server/uploader.exe"
 
-  # remove Mac-only files
-  rm -f "$pkgdir/opt/goagent/local/goagent-osx.py"
-
-  # remove goagent-gtk
-  rm -f "$pkgdir/opt/goagent/local/goagent-gtk.py"
-  rm -f "$pkgdir/opt/goagent/local/logo.png"
-  rm -f "$pkgdir/opt/goagent/local/addto-startup.py"
-
-  # remove CA.crt CA.key for security issues
-  rm -f "$pkgdir/opt/goagent/local/CA.crt" "$pkgdir/opt/goagent/local/CA.key"
-  rm -rf "$pkgdir/opt/goagent/local/certs"
-
-  # config file
-  install -Dm644 "${pkgdir}/opt/goagent/local/proxy.ini" "${pkgdir}/etc/goagent"
-  ln -sf "/etc/goagent" "${pkgdir}/opt/goagent/local/proxy.ini"
-
   # systemd service
   install -Dm644 "${srcdir}/goagent.service" "${pkgdir}/usr/lib/systemd/system/goagent.service"
 }
 
 # vim:set ts=2 sw=2 et:
-md5sums=('5ee022e802b927531e302f8c9aa83711'
-         'e49aca604fcbf7b64d07460d33669640')
+sha512sums=('bb51be21fea89c84d1466c3a2a629b7b86dfd814a81f2eaedb653a7ddaa060c859d343daf3057cdc77244fd276593dbdab46cebeef6f005ad1fd145cda15aa45'
+            'b8f5f6342303edd520a577d0348deef7017ba79aa5c6f43c4e1c368d7b204f6364f4537f2a5e21f3b63a321bdcf3d407e5dea9883211c11a4d11801b057cddc2')

Modified: goagent.install
===================================================================
--- goagent.install	2013-05-23 01:19:04 UTC (rev 91472)
+++ goagent.install	2013-05-23 02:32:24 UTC (rev 91473)
@@ -4,7 +4,7 @@
     
     #cd /opt/goagent/local
     #python2 -c 'from proxy import CertUtil; CertUtil.check_ca()'
-    chown -R nobody:daemon /opt/goagent/local
+    chown -R nobody:daemon /usr/share/goagent/local
 }
 
 post_upgrade() {
@@ -12,9 +12,11 @@
 }
 
 pre_upgrade() {
-    rm -rf /opt/goagent/certs
+    rm -rf /opt/goagent/local/certs
+    rm -rf /usr/share/goagent/local/certs
 }
 
 pre_remove() {
-    rm -rf /opt/goagent/certs
+    rm -rf /opt/goagent/local/certs
+    rm -rf /usr/share/goagent/local/certs
 }

Modified: goagent.service
===================================================================
--- goagent.service	2013-05-23 01:19:04 UTC (rev 91472)
+++ goagent.service	2013-05-23 02:32:24 UTC (rev 91473)
@@ -5,7 +5,7 @@
 [Service]
 Type=simple
 User=nobody
-ExecStart=/opt/goagent/local/proxy.py
+ExecStart=/usr/share/goagent/local/proxy.py
 
 [Install]
 WantedBy=multi-user.target



More information about the arch-commits mailing list