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

Jan Steffens heftig at archlinux.org
Wed Sep 21 21:50:56 UTC 2011


    Date: Wednesday, September 21, 2011 @ 17:50:56
  Author: heftig
Revision: 138413

upgpkg: deluge 1.3.3-3

make python2-distribute a makedepend. cleanup. fix some shebangs. use gtk-update-icon-cache. use update-desktop-database.

Modified:
  deluge/trunk/PKGBUILD
  deluge/trunk/deluge.install

----------------+
 PKGBUILD       |   42 +++++++++++++++++++++++++-----------------
 deluge.install |   32 ++++++++++++++++++--------------
 2 files changed, 43 insertions(+), 31 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-09-21 21:33:41 UTC (rev 138412)
+++ PKGBUILD	2011-09-21 21:50:56 UTC (rev 138413)
@@ -1,40 +1,48 @@
 # $Id$
-# Maintainer : Ionut Biru <ibiru at archlinux.org>
+# Maintainer: Jan "heftig" Steffens <jan.steffens at gmail.com>
+# Contributor: Ionut Biru <ibiru at archlinux.org>
 # Contributor: Hugo Doria <hugo at archlinux.org>
 
 pkgname=deluge
 pkgver=1.3.3
-pkgrel=2
-pkgdesc="A bittorrent client written with python and pygtk"
+pkgrel=3
+pkgdesc="A BitTorrent client with multiple user interfaces in a client/server model"
 arch=('any')
 url="http://deluge-torrent.org/"
 license=('GPL3')
-depends=('pyxdg' 'python2-distribute' 'libtorrent-rasterbar>=0.15.0' 'twisted' 'python2-pyopenssl' 'xdg-utils' 'python2-chardet')
-makedepends=('intltool' 'pygtk' 'librsvg' 'python-mako')
+depends=('pyxdg' 'libtorrent-rasterbar>=0.15.0' 'twisted' 'python2-pyopenssl'
+         'xdg-utils' 'python2-chardet' 'desktop-file-utils' 'hicolor-icon-theme')
+makedepends=('intltool' 'pygtk' 'librsvg' 'python-mako' 'python2-distribute')
 optdepends=('python-notify: libnotify notifications'
-	    'pygtk: needed for gtk ui'
-	    'librsvg: needed for gtk ui'
-	    'python-mako: needed for web ui')
-source=(http://download.deluge-torrent.org/source/${pkgname}-${pkgver}.tar.bz2 deluged deluged.conf.d deluge-web)
+            'pygtk: needed for gtk ui'
+            'librsvg: needed for gtk ui'
+            'python-mako: needed for web ui')
 backup=(etc/conf.d/deluged)
 install=deluge.install
+source=(http://download.deluge-torrent.org/source/$pkgname-$pkgver.tar.bz2
+        deluged deluged.conf.d deluge-web)
 md5sums=('4027c60bb5d1c5da61e97a47e62ab1ab'
          '7d5790eeb14cd0b47d1bb3e0a19c9935'
          '332d23fe0d21ce92b494efd73322856c'
          '6c913ec7322eaa60494ac9d53103005f')
 
 build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
+  cd "$srcdir/$pkgname-$pkgver"
   python2 setup.py build
 }
 
 package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
+  cd "$srcdir/$pkgname-$pkgver"
+  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+  install -Dm644 deluge/data/pixmaps/deluge.svg "$pkgdir/usr/share/pixmaps/deluge.svg"
 
-  install -d -m755 "${pkgdir}"/srv/deluge
-  install -D -m644 deluge/data/pixmaps/deluge.svg "${pkgdir}"/usr/share/pixmaps/deluge.svg
-  install -D -m755 "${srcdir}"/deluged "${pkgdir}"/etc/rc.d/deluged
-  install -D -m755 "${srcdir}"/deluge-web "${pkgdir}"/etc/rc.d/deluge-web
-  install -D -m644 "${srcdir}"/deluged.conf.d "${pkgdir}"/etc/conf.d/deluged
+  _dir="$pkgdir/usr/lib/python2.7/site-packages/deluge/ui"
+  sed -e '1s/python$/&2/' \
+      -i "$_dir/Win32IconImagePlugin.py" \
+      -i "$_dir/web/gen_gettext.py"
+
+  install -d "$pkgdir/srv/deluge"
+  install -D "$srcdir/deluged" "$pkgdir/etc/rc.d/deluged"
+  install -D "$srcdir/deluge-web" "$pkgdir/etc/rc.d/deluge-web"
+  install -Dm644 "$srcdir/deluged.conf.d" "$pkgdir/etc/conf.d/deluged"
 }

Modified: deluge.install
===================================================================
--- deluge.install	2011-09-21 21:33:41 UTC (rev 138412)
+++ deluge.install	2011-09-21 21:50:56 UTC (rev 138413)
@@ -1,25 +1,29 @@
 post_install() {
-  getent group deluge >/dev/null 2>&1 || usr/sbin/groupadd -g 125 deluge
-  if getent passwd deluge > /dev/null 2>&1; then
-      usr/sbin/usermod -c 'Deluge user' -d /srv/deluge -s /bin/false deluge > /dev/null 2>&1
-  else
-      usr/sbin/useradd -c 'Deluge user' -u 125 -g deluge -d /srv/deluge -s /bin/false deluge
+  getent group deluge &>/dev/null || usr/sbin/groupadd -g 125 deluge
+  if ! getent passwd deluge &>/dev/null; then
+    useradd -c 'Deluge user' -u 125 -g deluge -d /srv/deluge -s /bin/false deluge
+    passwd -l deluge &>/dev/null
   fi
-  usr/bin/passwd -l deluge &>/dev/null
 
-  chown deluge.deluge srv/deluge
-  xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+  chown deluge:deluge srv/deluge
 
+  post_upgrade
+
 cat << _EOF
->>> Deluge's daemon is running default with the "deluge" user. The default download directory is /srv/deluge/.
-    You can change the user by editing /etc/conf.d/deluged
+>>> The standalone daemon started using /etc/rc.d/deluged uses the "deluge" user
+    by default. Its default download directory is /srv/deluge. You can change
+    the user by editing /etc/conf.d/deluged.
 _EOF
 }
 
+post_upgrade() {
+  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+  update-desktop-database -q
+}
+
 post_remove() {
-  getent passwd deluge >/dev/null 2>&1 && userdel deluge
-  getent group deluge >/dev/null 2>&1 && groupdel deluge
+  getent passwd deluge &>/dev/null && userdel deluge
+  getent group deluge &>/dev/null && groupdel deluge
 
-  xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+  post_upgrade
 }
-




More information about the arch-commits mailing list