1 #based on starfish's updated PKGBUILD and Ubuntu Documentation (https://help.ubuntu.com/community/DialupModemHowto/Conexant)
2 #framewrk.h and osservices.h by diaco, with Ganton's instructions : http://ubuntuforums.org/showthread.php?p=10100007#post10100007
7 pkgdesc="Linux drivers for the Conexant HSF Softmodem family (kernel modules), with Dell binaries"
9 url="http://www.linuxant.com/drivers/hsf/"
10 license=('GPL' 'custom')
11 depends=("hsfmodem-utils-dell>=$pkgver" "kernel26>=2.6.39")
12 install=hsfmodem.install
16 source=(http://www.linuxant.com/drivers/hsf/full/archive/hsfmodem-${pkgver}/hsfmodem-${pkgver}.tar.gz
17 http://linux.dell.com/files/ubuntu/hardy/modem-drivers/hsf/hsfmodem-7.68.00.09oem.tar.gz
20 fix-deprecated-include.patch)
21 md5sums=('8eb0935e86b898190bf20c08894af17e'
22 '71bccfcb8caed31b91e605889e94bcc9'
23 '9bb75183e6bbda5cc27c3aa3214b1659'
24 'c6bb8a0ce9b373e950a12bfa0e32a965'
25 '2e0b08e9186ce995f25905445782cbdc')
28 source=(http://www.linuxant.com/drivers/hsf/full/archive/hsfmodem-${pkgver%full}${CARCH}full/hsfmodem-${pkgver%full}${CARCH}full.tar.gz
29 http://linux.dell.com/files/ubuntu/hardy/modem-drivers/hsf/hsfmodem-7.68.00.09x86_64oem.tar.gz
32 fix-deprecated-include.patch)
33 md5sums=('74df1a0af818a918a68b38bf9a01599b'
34 '9cfa801c88f9c61cb26db786d64872c7'
35 '9bb75183e6bbda5cc27c3aa3214b1659'
36 'c6bb8a0ce9b373e950a12bfa0e32a965'
37 '2e0b08e9186ce995f25905445782cbdc')
42 cd $srcdir/hsfmodem-${pkgver%full}*full/
43 patch -Np1 -i ../fix-deprecated-include.patch
44 cd $srcdir/hsfmodem-${pkgver%full}*full/modules/
47 cp -R $srcdir/hsfmodem-7.68.00.09x86_64oem/modules/imported ./
48 cp -pr $srcdir/framewrk.h ./imported/include/framewrk.h
49 cp -pr $srcdir/osservices.h ./imported/include/osservices.h
51 #fix compilation errors, taken from http://openmamba.org/pub/openmamba/devel-kernel/patches/hsfmodem-7.80.02.06-kernel-2.6.37.patch
52 sed -e 's/static DECLARE_MUTEX(cnxt_port_sem);/static DEFINE_SEMAPHORE(cnxt_port_sem);/g' -i GPL/serial_cnxt.c
53 sed -e 's/.ioctl = diag_ioctl,/.compat_ioctl = diag_ioctl,/g' -i osdiag.c
54 sed -e 's/static DECLARE_MUTEX(nvmelem_writelist_sem);/static DEFINE_SEMAPHORE(nvmelem_writelist_sem);/g' -i osnvm.c
56 #fix compilation errors for 2.6.39 (BKL removal)
57 sed -e 's*#include <linux/smp_lock.h>**g' -i osservices.c
58 sed -e 's/static spinlock_t atomic_lock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;/static DEFINE_SPINLOCK(atomic_lock);/g' -i osservices.c
59 sed -e 's/ lock_kernel();//g' -i osservices.c
60 sed -e 's/ unlock_kernel();//g' -i osservices.c
61 sed -e 's/static spinlock_t tqueue_lock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;/static DEFINE_SPINLOCK(tqueue_lock);/g' -i GPL/oscompat.h
62 sed -e 's/static spinlock_t diag_lock = SPIN_LOCK_UNLOCKED;/static DEFINE_SPINLOCK(diag_lock);/g' -i osdiag.c
63 sed -e 's/static spinlock_t fpstates_lock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;/static DEFINE_SPINLOCK(fpstates_lock);/g' -i osfloat.c
64 sed -e 's/static spinlock_t dcp_lock = SPIN_LOCK_UNLOCKED;/static DEFINE_SPINLOCK(dcp_lock);/g' -i osdcp.c
66 make CNXT_MODS_DIR=$pkgdir/lib/modules/$(uname -r)/extra modules_install || return 1
67 make CNXTLIBDIR=$pkgdir/usr/lib/hsfmodem CNXT_MODS_DIR=$pkgdir/lib/modules/$(uname -r)/extra modules_install