makedeb
Application to control the MFD and LEDs of a Saitek X52/X52Pro HOTAS
Click here to go back to the commit logs for libx52.
Hash: 0d22481fe1ebc5dda1d1af369e048e5c9bf33e10
Message: Fix package building for makedeb
diff --git a/.SRCINFO b/.SRCINFO
index 0ed9705..a446d08 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,29 +1,40 @@
-generated-by = makedeb-makepkg
-
-pkgbase = libx52
- pkgdesc = Application to control the MFD and LEDs of a Saitek X52/X52Pro HOTAS
- pkgver = 0.3.0
- pkgrel = 1
- url = https://github.com/nirenjan/libx52
- arch = x86_64
- license = GPL2
- makedepends = autoconf
- makedepends = automake
- makedepends = libtool
- makedepends = pkg-config
- makedepends = python3
- makedepends = gettext
- makedepends = autopoint
- makedepends = libusb-1.0-0-dev
- makedepends = libhidapi-dev
- makedepends = libevdev-dev
- makedepends = doxygen
- makedepends = libcmocka-dev
- makedepends = git
- depends = libusb-1.0-0
- depends = libhidapi-hidraw0
- depends = libevdev2
- source = https://github.com/nirenjan/libx52/releases/download/v${pkgver}/${pkgname}_${pkgver}.orig.tar.gz
- sha256sums = 80a6141c64c94387d5593c8b4a9b5de5c22db16a0fa9cacaf1a2a80e8a3cd96e
-
+generated-by = makedeb
pkgname = libx52
+postinst = libx52.post.sh
+postrm = libx52.post.sh
+pkgbase = libx52
+pkgdesc = Application to control the MFD and LEDs of a Saitek X52/X52Pro HOTAS
+pkgrel = 2
+pkgver = 0.3.0
+url = https://github.com/nirenjan/libx52
+arch = amd64
+depends = libusb-1.0-0
+depends = libhidapi-hidraw0
+depends = libevdev2
+license = GPL2
+makedepends = autoconf
+makedepends = automake
+makedepends = libtool
+makedepends = pkg-config
+makedepends = python3
+makedepends = gettext
+makedepends = autopoint
+makedepends = libusb-1.0-0-dev
+makedepends = libhidapi-dev
+makedepends = libevdev-dev
+makedepends = doxygen
+makedepends = libcmocka-dev
+source = https://github.com/nirenjan/libx52/releases/download/v0.3.0/libx52_0.3.0.orig.tar.gz
+sha256sums = 80a6141c64c94387d5593c8b4a9b5de5c22db16a0fa9cacaf1a2a80e8a3cd96e
+makedepends = autoconf
+makedepends = automake
+makedepends = libtool
+makedepends = pkg-config
+makedepends = python3
+makedepends = gettext
+makedepends = autopoint
+makedepends = libusb-1.0-0-dev
+makedepends = libhidapi-dev
+makedepends = libevdev-dev
+makedepends = doxygen
+makedepends = libcmocka-dev
diff --git a/PKGBUILD b/PKGBUILD
index 31af793..dbb8507 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,21 +2,23 @@
pkgname=libx52
pkgver=0.3.0
-pkgrel=1
+pkgrel=2
pkgdesc="Application to control the MFD and LEDs of a Saitek X52/X52Pro HOTAS"
-arch=('x86_64')
+arch=('amd64')
url="https://github.com/nirenjan/libx52"
license=('GPL2')
depends=('libusb-1.0-0' 'libhidapi-hidraw0' 'libevdev2')
makedepends=('autoconf' 'automake' 'libtool' 'pkg-config' 'python3'
'gettext' 'autopoint' 'libusb-1.0-0-dev' 'libhidapi-dev'
- 'libevdev-dev' 'doxygen' 'libcmocka-dev' 'git')
+ 'libevdev-dev' 'doxygen' 'libcmocka-dev')
source=("https://github.com/nirenjan/libx52/releases/download/v${pkgver}/${pkgname}_${pkgver}.orig.tar.gz")
sha256sums=('80a6141c64c94387d5593c8b4a9b5de5c22db16a0fa9cacaf1a2a80e8a3cd96e')
+postinst=libx52.post.sh
+postrm=libx52.post.sh
build() {
cd ${srcdir}/${pkgname}-${pkgver}
- mkdir build
+ mkdir -p build
cd build
../configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--disable-silent-rules --disable-maintainer-mode
@@ -24,7 +26,7 @@ build() {
}
package() {
- cd ${srcdir}/${pkgname}
+ cd ${srcdir}/${pkgname}-${pkgver}/build
make install DESTDIR="$pkgdir"
}
diff --git a/libx52.post.sh b/libx52.post.sh
new file mode 100755
index 0000000..afb90ed
--- /dev/null
+++ b/libx52.post.sh
@@ -0,0 +1,4 @@
+#!/bin/bash -e
+
+udevadm control --reload-rules
+udevadm trigger --subsystem-match=usb --attr-match=idVendor=06a3 --action=add