updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / hsfmodem-utils-dell / PKGBUILD
blobada8aba811c8f66736bb4d5e1a7d64a4b7e66efd
1 #based on starfish's updated PKGBUILD and Ubuntu Documentation (https://help.ubuntu.com/community/DialupModemHowto/Conexant)
3 pkgname=hsfmodem-utils-dell
4 pkgver=7.80.02.06full
5 pkgrel=1
6 pkgdesc="Linux drivers for the Conexant HSF Softmodem family (userspace tools and libraries), with Dell binaries"
7 arch=('i686' 'x86_64')
8 url="http://www.linuxant.com/drivers/hsf/"
9 license=('GPL' 'custom')
10 depends=('cpio')
11 backup=('etc/hsfmodem/nvm/dynamic')
12 install=hsfmodem-utils.install
13 options=(!emptydirs)
15 case "$CARCH" in
16   i686)
17       source=(http://www.linuxant.com/drivers/hsf/full/archive/hsfmodem-${pkgver}/hsfmodem-${pkgver}.tar.gz
18               http://linux.dell.com/files/ubuntu/hardy/modem-drivers/hsf/hsfmodem-7.68.00.09oem.tar.gz)
19       md5sums=('8eb0935e86b898190bf20c08894af17e'
20                '71bccfcb8caed31b91e605889e94bcc9')
21       ;;
22   x86_64)
23       source=(http://www.linuxant.com/drivers/hsf/full/archive/hsfmodem-${pkgver%full}${CARCH}full/hsfmodem-${pkgver%full}${CARCH}full.tar.gz
24               http://linux.dell.com/files/ubuntu/hardy/modem-drivers/hsf/hsfmodem-7.68.00.09x86_64oem.tar.gz)
25       md5sums=('74df1a0af818a918a68b38bf9a01599b'
26                '9cfa801c88f9c61cb26db786d64872c7')
27       ;;
28 esac
30 build() {
31   cd $srcdir/hsfmodem-${pkgver%full}*full/
33   rm -r modules/imported
34   cp -R $srcdir/hsfmodem-7.68.00.09x86_64oem/modules/imported ./modules/
36   make ROOT=$pkgdir install || return 1
38   echo "TAR hsfmodem-$pkgver" > $pkgdir/etc/hsfmodem/package
40   # Fix paths in scripts
41   sed -e "s|$pkgdir/usr/sbin:||" -e "s|$pkgdir||g" -i $pkgdir/usr/sbin/hsf{config,dcpd}
43   rm -R $pkgdir/etc/hsfmodem/nvm/hsfpcibasic2hsfi/Region
44   ln -s ../hsfpcibasic2/Region $pkgdir/etc/hsfmodem/nvm/hsfpcibasic2hsfi/
46   # Install license for non-GPL'ed components
47   install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/license.txt
49   rm $pkgdir/usr/lib/hsfmodem/{config.mak,LICENSE}
50   rm $pkgdir/usr/lib/hsfmodem/modules/Makefile
51   rm $pkgdir/usr/lib/hsfmodem/modules/GPL/{COPYING,hda/Makefile}