[arch-commits] Commit in subdownloader/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Sat Jan 27 10:52:53 UTC 2018


    Date: Saturday, January 27, 2018 @ 10:52:52
  Author: dvzrv
Revision: 287404

upgpkg: subdownloader 2.0.18-5

Updating maintainer. Removing unneeded options and makedepends.
Moving patching and modifications to prepare(). Switching to sha512sums. Switching to https for source. Cleaning up package().

Modified:
  subdownloader/trunk/PKGBUILD

----------+
 PKGBUILD |   50 +++++++++++++++++++++++---------------------------
 1 file changed, 23 insertions(+), 27 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-27 09:42:39 UTC (rev 287403)
+++ PKGBUILD	2018-01-27 10:52:52 UTC (rev 287404)
@@ -1,5 +1,6 @@
 # $Id$
 # Maintainer: Ray Rashif <schiv at archlinux.org>
+# Maintainer: David Runge <dave at sleepmap.de>
 # Contributor: Andrea Scarpino <andrea at archlinux.org>
 # Contributor: Geoffroy Carrier <geoffroy.carrier at koon.fr>
 # Contributor: Thomas Jost <thomas.jost at gmail.com>
@@ -12,15 +13,13 @@
 url="http://www.subdownloader.net/"
 license=('GPL3')
 depends=('python2-pyqt4')
-makedepends=('icu')
-options=('!emptydirs')
-source=("http://launchpad.net/$pkgname/trunk/$pkgver/+download/${pkgname}_$pkgver.orig.tar.gz"
+source=("https://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}_${pkgver}.orig.tar.gz"
         "follow-download-links.patch")
-md5sums=('11dbc455f542b68e96e2cc539deb3f8f'
-         'ae4eee141243cb5a20eeaaa49abcf75b')
+sha512sums=('ecddf606ce374af43fff39c225ee896af4d8bd2384a2f300dcbb4b443377807edd5233a0531e95d338b0f9c84a274b3afd4109d9216510a5a4bc8fa17485b999'
+            '09a03b7b06813f887e18b6774fc2d5f1d477b88fe98785fd03d85bcd33b4aedc6ee1cf233e8af7dd3ca7a524ca14e3a1f8d5e7163e803b0f534023f9b5ded5e9')
 
-build() {
-  cd "$srcdir/$pkgname-$pkgver"
+prepare(){
+  cd "${pkgname}-${pkgver}"
 
   # See https://bugs.archlinux.org/task/48402
   patch -Np0 -i "$srcdir/follow-download-links.patch"
@@ -27,14 +26,17 @@
 
   # python2 fix
   for file in $(find . -name '*.py' -print); do
-    sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
-    sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
+    sed -e 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' \
+        -e 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' \
+        -i "${file}"
   done
 
+  # remove empty, useless dir
+  rmdir modules/mmpython/doc
 }
 
 package() {
-  cd "$srcdir/$pkgname-$pkgver"
+  cd "${pkgname}-${pkgver}"
 
   # prepare dirs
   install -d "$pkgdir/usr/share/$pkgname" \
@@ -41,27 +43,21 @@
     "$pkgdir/usr/bin" \
     "$pkgdir/usr/share/man/man1/"
 
-  # manuals
-  gzip subdownloader.1
-  install -D subdownloader.1.gz "$pkgdir/usr/share/man/man1/"
+  # man page
+  install -vDm644 ${pkgname}.1 "$pkgdir/usr/share/man/man1/${pkgname}.1"
 
   # freedesktop.org
-  install -D -m644 subdownloader.desktop \
-    "$pkgdir/usr/share/applications/subdownloader.desktop"
-  rm subdownloader.1.gz subdownloader.desktop
+  install -vDm644 "${pkgname}.desktop" \
+    "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+  install -vDm644 "gui/images/${pkgname}.png" \
+    "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
 
   # runtime and executables
-  cp -a * "$pkgdir/usr/share/$pkgname/"
-  chmod 755 "$pkgdir/usr/share/$pkgname/run.py"
-  ln -s "/usr/share/$pkgname/run.py" \
-    "$pkgdir/usr/bin/subdownloader"
-
-  install -D -m644 gui/images/subdownloader.png \
-    "$pkgdir/usr/share/pixmaps/subdownloader.png"
-
-  # unnecessary directories
-  cd "$pkgdir/usr/share/$pkgname"
-  rm -r distribution
+  cp -av {FileManagement,gui,languages,locale,modules} \
+    "${pkgdir}/usr/share/${pkgname}/"
+  install -vDm 755 run.py "${pkgdir}/usr/share/${pkgname}/run.py"
+  ln -s "/usr/share/${pkgname}/run.py" \
+    "${pkgdir}/usr/bin/${pkgname}"
 }
 
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list