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

Ionut Biru ibiru at archlinux.org
Mon Jan 11 14:32:50 EST 2010


    Date: Monday, January 11, 2010 @ 14:32:49
  Author: ibiru
Revision: 62760

upgpkg: deluge 1.2.0-1
    update to 1.2.0, fixed running deluged daemon with deluge user, added the possibility to change the user in /etc/conf.d/deluged, moved dependency that are needed for UIs on optdepends. FS#14142 FS#15949 FS#16772

Added:
  deluge/trunk/deluged.conf.d
Modified:
  deluge/trunk/PKGBUILD
  deluge/trunk/deluge.install
  deluge/trunk/deluged

----------------+
 PKGBUILD       |   34 +++++++++++++++++++---------------
 deluge.install |   15 +++++++++------
 deluged        |    3 ++-
 deluged.conf.d |    1 +
 4 files changed, 31 insertions(+), 22 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-01-11 19:13:12 UTC (rev 62759)
+++ PKGBUILD	2010-01-11 19:32:49 UTC (rev 62760)
@@ -2,29 +2,33 @@
 # Maintainer: Hugo Doria <hugo at archlinux.org>
 
 pkgname=deluge
-pkgver=1.1.9
-pkgrel=3
+pkgver=1.2.0
+pkgrel=1
 pkgdesc="A bittorrent client written with python and pygtk"
 arch=('i686' 'x86_64')
 url="http://deluge-torrent.org/"
 license=('GPL3')
-depends=('pygtk' 'pyxdg' 'dbus-python' 'librsvg' 'setuptools' 'libtorrent-rasterbar>=0.14.7')
-makedepends=('subversion' 'intltool')
-optdepends=('python-chardet: used to load non-UTF8 encoded torrents')
-source=(http://download.deluge-torrent.org/source/${pkgname}-${pkgver}.tar.bz2 deluged)
-md5sums=('38b9dbf255ed9620760d546dbb757882' '6e1585bdc79243b1cd22ed9423cc4ec2')
+depends=('pyxdg' 'dbus-python' 'setuptools' 'libtorrent-rasterbar>=0.14.7' 'twisted' 'pyopenssl' 'xdg-utils')
+makedepends=( 'intltool' 'pygtk' 'librsvg' 'python-mako')
+optdepends=('python-notify: libnotify notifications'
+	    'python-chardet: needed for UIs'
+	    '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)
 install="deluge.install"
-
+md5sums=('13ac84e9b5b0293eccb5d89a9fc49461'
+         'a462fc27d283ecec9bbd52b840d27262'
+         '332d23fe0d21ce92b494efd73322856c')
 build() {
 
-  cd ${srcdir}/${pkgname}-${pkgver}/
+  cd "${srcdir}/${pkgname}-${pkgver}"
 
   python setup.py build || return 1
-  python setup.py install --prefix=/usr --root=${pkgdir} || return 1
+  python setup.py install --prefix=/usr --root="${pkgdir}" || return 1
 
-  install -d -m755 ${pkgdir}/srv/deluge || return 1
-  install -D -m644 deluge/data/pixmaps/deluge.svg ${pkgdir}/usr/share/pixmaps/deluge.svg || return 1
-  install -D -m755 ${srcdir}/deluged ${pkgdir}/etc/rc.d/deluged || return 1
-
+  install -d -m755 "${pkgdir}"/srv/deluge || return 1
+  install -D -m644 deluge/data/pixmaps/deluge.svg "${pkgdir}"/usr/share/pixmaps/deluge.svg || return 1
+  install -D -m755 "${srcdir}"/deluged "${pkgdir}"/etc/rc.d/deluged || return 1
+  install -D -m644 "${srcdir}"/deluged.conf.d "${pkgdir}"/etc/conf.d/deluged || return 1
 }
-

Modified: deluge.install
===================================================================
--- deluge.install	2010-01-11 19:13:12 UTC (rev 62759)
+++ deluge.install	2010-01-11 19:32:49 UTC (rev 62760)
@@ -1,14 +1,14 @@
 post_install() {
-  getent group deluge >/dev/null || usr/sbin/groupadd -g 125 deluge
-  getent passwd deluge >/dev/null || usr/sbin/useradd -c 'Deluge user' -u 125 -g deluge -d /srv/deluge -s /bin/false deluge 
+  getent group deluge >/dev/null 2>&1 || usr/sbin/groupadd -g 125 deluge
+  getent passwd deluge >/dev/null 2>&1 || usr/sbin/useradd -c 'Deluge user' -u 125 -g deluge -d /srv/deluge -s /bin/bash deluge
   usr/bin/passwd -l deluge &>/dev/null
 
   chown deluge.deluge srv/deluge -R
+  xdg-icon-resource forceupdate --theme hicolor &> /dev/null
 
 cat << _EOF
-
->>> Deluge's daemon is running with the "deluge" user. The default download directory is /srv/deluge/
-
+>>> 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/deluge
 _EOF
 }
 
@@ -17,6 +17,9 @@
 }
 
 pre_remove() {
-  usr/sbin/userdel deluge &> /dev/null
+  getent passwd deluge >/dev/null 2>&1 && userdel deluge
+  getent group deluge >/dev/null 2>&1 && groupdel deluge
+
+  xdg-icon-resource forceupdate --theme hicolor &> /dev/null
 }
 

Modified: deluged
===================================================================
--- deluged	2010-01-11 19:13:12 UTC (rev 62759)
+++ deluged	2010-01-11 19:32:49 UTC (rev 62760)
@@ -2,13 +2,14 @@
 
 . /etc/rc.conf
 . /etc/rc.d/functions
+. /etc/conf.d/deluged
 
 [[ -f /var/run/deluged.pid ]] && PID=`cat /var/run/deluged.pid`
 
 case "$1" in
   start)
     stat_busy "Starting Deluge Daemon"
-    [[ -z $PID ]] && /usr/bin/deluged 2>&1
+    [[ -z $PID ]] && su -l -c "/usr/bin/deluged" $DELUGE_USER
     if [ $? -gt 0 ]; then
       stat_fail
     else

Added: deluged.conf.d
===================================================================
--- deluged.conf.d	                        (rev 0)
+++ deluged.conf.d	2010-01-11 19:32:49 UTC (rev 62760)
@@ -0,0 +1 @@
+DELUGE_USER="deluge"



More information about the arch-commits mailing list