aboutsummaryrefslogtreecommitdiffstats
path: root/community/libftdi1
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2016-11-18 13:40:33 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2016-11-18 13:41:37 +0100
commit0a56fcdbd4c0e8d24c681be43ef65ca44eeef356 (patch)
treee65e88773e0f909773f3e5e2e663f9ec9bc3e2fd /community/libftdi1
parentc3ff0793f4b6332d3000f6b42d645c91fa843f00 (diff)
downloadaports-0a56fcdbd4c0e8d24c681be43ef65ca44eeef356.tar.bz2
aports-0a56fcdbd4c0e8d24c681be43ef65ca44eeef356.tar.xz
community/libftdi1: install udev rules to /etc/udev/rules.d/
Also create the plugdev group used by the udev rules.
Diffstat (limited to 'community/libftdi1')
-rw-r--r--community/libftdi1/APKBUILD32
l---------community/libftdi1/libftdi1.post-upgrade1
-rw-r--r--community/libftdi1/libftdi1.pre-install3
3 files changed, 27 insertions, 9 deletions
diff --git a/community/libftdi1/APKBUILD b/community/libftdi1/APKBUILD
index 851c3218b1..501dff1987 100644
--- a/community/libftdi1/APKBUILD
+++ b/community/libftdi1/APKBUILD
@@ -2,32 +2,46 @@
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=libftdi1
pkgver=1.3
-pkgrel=0
+pkgrel=1
pkgdesc="A library to talk to FTDI chips"
url="http://www.intra2net.com/en/developer/libftdi/download.php"
arch="all"
license="LGPL2, GPL2"
makedepends="cmake doxygen swig libusb-dev"
subpackages="$pkgname-dev $pkgname-doc"
+install="$pkgname.pre-install $pkgname.post-upgrade"
source="http://www.intra2net.com/en/developer/libftdi/download/${pkgname}-${pkgver}.tar.bz2
01-CMakeLists-no-lib-suffix.patch"
+builddir="$srcdir/$pkgname-$pkgver"
-builddir="$srcdir/${pkgname}-${pkgver}"
build() {
mkdir "$builddir/build" || return 1
+
cd "$builddir/build"
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_BUILD_RPATH=ON \
- -DCMAKE_BUILD_TYPE=Release -DEXAMPLES=OFF -DFTDI_EEPROM=ON .. || return 1
- make
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_SKIP_BUILD_RPATH=ON \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DEXAMPLES=OFF \
+ -DFTDI_EEPROM=ON .. \
+ || return 1
+ make || return 1
}
package() {
cd "$builddir/build"
make DESTDIR="$pkgdir" install || return 1
- install -Dm644 ../packages/99-libftdi.rules "$pkgdir"/usr/lib/udev/rules.d/99-libftdi.rules || return 1
- mkdir -p "$pkgdir"/usr/share/doc/$pkgname/ "$pkgdir"/usr/share/man/man3/ || return 1
- install -m644 doc/html/* "$pkgdir"/usr/share/doc/$pkgname/ || return 1
- install -m644 doc/man/man3/ftdi_eeprom.3 "$pkgdir"/usr/share/man/man3/ || return 1
+
+ mkdir -p "$pkgdir"/etc/udev/rules.d/
+ install -Dm644 ../packages/99-libftdi.rules \
+ "$pkgdir"/etc/udev/rules.d/99-$pkgname.rules \
+ || return 1
+
+ mkdir -p "$pkgdir"/usr/share/doc/$pkgname/ \
+ "$pkgdir"/usr/share/man/man3/ || return 1
+ install -m644 doc/html/* \
+ "$pkgdir"/usr/share/doc/$pkgname/ || return 1
+ install -m644 doc/man/man3/ftdi_eeprom.3 \
+ "$pkgdir"/usr/share/man/man3/ || return 1
}
md5sums="156cdf40cece9f8a3ce1582db59a502a libftdi1-1.3.tar.bz2
diff --git a/community/libftdi1/libftdi1.post-upgrade b/community/libftdi1/libftdi1.post-upgrade
new file mode 120000
index 0000000000..b3adbf2e9f
--- /dev/null
+++ b/community/libftdi1/libftdi1.post-upgrade
@@ -0,0 +1 @@
+libftdi1.pre-install \ No newline at end of file
diff --git a/community/libftdi1/libftdi1.pre-install b/community/libftdi1/libftdi1.pre-install
new file mode 100644
index 0000000000..d91ffec58d
--- /dev/null
+++ b/community/libftdi1/libftdi1.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+addgroup -S plugdev 2>/dev/null
+exit 0