Date: Saturday, May 9, 2015 @ 17:25:07
  Author: arodseth
Revision: 133094

upgpkg: hwinfo 21.12_1-1

Modified:
  hwinfo/trunk/PKGBUILD

----------+
 PKGBUILD |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2015-05-09 15:23:53 UTC (rev 133093)
+++ PKGBUILD    2015-05-09 15:25:07 UTC (rev 133094)
@@ -5,7 +5,8 @@
 # Contributor: champus, madeye, ranguvar and ninja_pt
 
 pkgname=hwinfo
-pkgver=21.10.1.1
+pkgver=21.12_1
+_fn="$pkgname-${pkgver/_/-}.1.src.rpm"
 pkgrel=1
 pkgdesc='Hardware detection tool from openSUSE'
 arch=('x86_64' 'i686')
@@ -14,9 +15,9 @@
 depends=('libx86emu' 'bash' 'perl')
 makedepends=('sysfsutils' 'rpmextract' 'flex' 'git')
 options=('!emptydirs')
-source=("http://download.opensuse.org/source/factory/repo/oss/suse/src/$pkgname-${pkgver%.*.*}-${pkgver#*.*.}.src.rpm";
+source=("http://download.opensuse.org/source/factory/repo/oss/suse/src/$_fn";
         'custom_ioctl.patch')
-sha256sums=('db8f9cbe57fc48e974b74fc035d4b308ff3fbc786408de983cbea69ef63aeaf9'
+sha256sums=('1f20612a1498007fdf73ad306520f90dadfa46a8b646a2e9c28e88d67710ea15'
             '6e83b50aa34f31db5fe6de938402e7c4dda6ffa9ffe1346c076e4779018fcf1d')
 
 prepare() {
@@ -23,23 +24,24 @@
   #aria2c -M "$pkgname.meta4" -V -c --allow-overwrite=true --no-conf=true
 
   # Wish upstream could just provide a normal $pkgname-$pkgver.tar.gz...
-  rpmextract.sh "$pkgname-${pkgver%.*.*}-${pkgver#*.*.}.src.rpm"
-  tar Jxf "$pkgname-${pkgver%.*.*}.tar.xz"
+  rpmextract.sh "$_fn"
+  tar Jxf "${_fn%-*.*}.tar.xz"
 
   # Patching
-  cd "$pkgname-${pkgver%.*.*}"
+  cd "${_fn%-*.*}"
   patch -p0 -i ../custom_ioctl.patch
 }
 
 build() {
-  make -C "$pkgname-${pkgver%.*.*}" -j1 \
-    CFLAGS+="-fPIC -I$srcdir/$pkgname-${pkgver%.*.*}/src/hd" \
+  make -C "${_fn%-*.*}" -j1 \
+    CFLAGS+="-fPIC -I$srcdir/${_fn%-*.*}/src/hd" \
     LIBDIR=/usr/lib
 }
 
 package() {
-  make -C "$pkgname-${pkgver%.*.*}" LIBDIR=/usr/lib DESTDIR="$pkgdir" install
+  make -C "${_fn%-*.*}" LIBDIR=/usr/lib DESTDIR="$pkgdir" install
   mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
 }
 
+# getver: -u 4 https://tracker.debian.org/pkg/hwinfo #
 # vim:set ts=2 sw=2 et:

Reply via email to