diff options
author | Leonardo Arena <rnalrd@gmail.com> | 2010-06-22 11:05:50 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@gmail.com> | 2010-06-22 11:05:50 +0000 |
commit | bb87c077f9ae1e89c0cca15cdcd25952cb2dfadd (patch) | |
tree | fcd8b40684208b94426dd75fe509e767f7f97363 | |
parent | e36c61c0f09d9c36a33edfd2fae36f0e7c480336 (diff) | |
download | aports-bb87c077f9ae1e89c0cca15cdcd25952cb2dfadd.tar.bz2 aports-bb87c077f9ae1e89c0cca15cdcd25952cb2dfadd.tar.xz |
testing/usb-modeswitch: new aport
-rw-r--r-- | testing/usb-modeswitch/APKBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/usb-modeswitch/APKBUILD b/testing/usb-modeswitch/APKBUILD new file mode 100644 index 000000000..55f87034b --- /dev/null +++ b/testing/usb-modeswitch/APKBUILD @@ -0,0 +1,53 @@ +# Maintainer: Leonardo Arena <rnalrd@gmail.com> +pkgname=usb-modeswitch +pkgver=1.1.2 +pkgrel=0 +_pkgdata=20100418 +pkgdesc="A mode switching tool for controlling flip flop (multiple device) USB gear" +url="http://www.draisberghof.de/usb_modeswitch/" +license="GPL" +depends="tcl" +makedepends="libusb-compat-dev" +install= +subpackages="$pkgname-doc" +source="http://www.draisberghof.de/usb_modeswitch/${pkgname}-${pkgver}.tar.bz2 + http://www.draisberghof.de/usb_modeswitch/${pkgname}-data-${_pkgdata}.tar.bz2 + http://www.draisberghof.de/usb_modeswitch/usb_modeswitch.setup" + +_builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + cd "$_builddir" + mkdir -p $pkgdir/lib/udev/usb_modeswitch || return 1 + mkdir -p $pkgdir/etc || return 1 + mkdir -p $pkgdir/usr/share/man/man1 || return 1 + make clean || return 1 + sed -i -e 's/--mode=/-m/' Makefile + cd ../${pkgname}-data-${_pkgdata} + sed -i -e 's%install --mode=644 -t $(ETCDIR)/usb_modeswitch.d \./usb_modeswitch.d/\*%cp -R ./usb_modeswitch.d/\* $(ETCDIR)/usb_modeswitch.d%' Makefile + sed -i -e 's/--mode=/-m/' Makefile +} + +build() { + cd "$_builddir" + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install + # adjusting the tcl script location + mv ${pkgdir}/lib/udev/usb_modeswitch/usb_modeswitch.tcl ${pkgdir}/lib/udev/usb_modeswitch.tcl || return 1 + rmdir ${pkgdir}/lib/udev/usb_modeswitch || return 1 + mv ${pkgdir}/lib/udev/usb_modeswitch.tcl ${pkgdir}/lib/udev/usb_modeswitch || return 1 + + # installing data + cd $srcdir/usb-modeswitch-data-${_pkgdata} || return 1 + make DESTDIR=$pkgdir install || return 1 + # installing config + cp $srcdir/usb_modeswitch.setup $pkgdir/etc/ || return 1 +} + +md5sums="071cb300d00938bfe20025c654303d92 usb-modeswitch-1.1.2.tar.bz2 +659c9633513fa2f84465244a50c351b3 usb-modeswitch-data-20100418.tar.bz2 +9a25756669937ac86774bb55733f09cd usb_modeswitch.setup" |