aboutsummaryrefslogtreecommitdiffstats
path: root/community/libftdi1
diff options
context:
space:
mode:
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