summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Xhokaxhiu2018-05-21 18:41:51 +0200
committerJulian Xhokaxhiu2018-05-21 18:41:51 +0200
commit61a2b3ca8d7fb5663f195afce4dacc6a03282c49 (patch)
tree69b4a5cfe65e664562ff388f83da3a5c41b4ebd2
parentf5fd8b618a67aae25fe1cb4d360a6432b73c99db (diff)
downloadaur-61a2b3ca8d7fb5663f195afce4dacc6a03282c49.tar.gz
Use prepare phase for extraction
-rw-r--r--PKGBUILD16
1 files changed, 13 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c0d29eb96a36..538d0c48ddd9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,7 +13,7 @@ conflicts=('omnikey_ifdokccid-git')
source=("https://www.hidglobal.fr/sites/default/files/drivers/omnikey_ccid_driver_for_8051_controller_based_readers_v.${pkgver}.zip")
md5sums=('441670be336df12167652a751ba5a08e')
-package() {
+prepare() {
_ARCH=""
# Update the architecture name based on the current one running this PKGBUILD
@@ -31,12 +31,22 @@ package() {
_PACKAGE_NAME="ifdokccid_linux_${_ARCH}-${pkgver}-${pkgrel}-${_gitrel}"
# Extract the platform package
+ mkdir -p ${pkgname}
tar xzf ${_PACKAGE_NAME}.tar.gz
- cd ${_PACKAGE_NAME}
+
+ # Move all the package files in a common diretory name
+ mv ${_PACKAGE_NAME}/* ${pkgname}
+
+ # Rename the bundle directory
+ mv ${pkgname}/${_PACKAGE_NAME}.bundle ${pkgname}/${pkgname}.bundle
+}
+
+package() {
+ cd ${pkgname}
# Start to build the driver package
mkdir -p $pkgdir/usr/lib/pcsc/drivers
- cp -r ${_PACKAGE_NAME}.bundle $pkgdir/usr/lib/pcsc/drivers
+ cp -r ${pkgname}.bundle $pkgdir/usr/lib/pcsc/drivers
mkdir -p $pkgdir/etc
install -m0600 omnikey.ini $pkgdir/etc/omnikey.ini
mkdir -p $pkgdir/etc/udev/rules.d