mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
75 lines
3.2 KiB
Bash
75 lines
3.2 KiB
Bash
# $Id: PKGBUILD 42165 2009-06-11 18:04:52Z tpowa $
|
|
#Maintainer: Tobias Powalowski <t.powa@gmx.de>
|
|
|
|
pkgname=fcpcmcia
|
|
pkgver=31107
|
|
pkgrel=46
|
|
_kernver=2.6.30-ARCH
|
|
pkgdesc="AVM ISDN driver for FRITZ PCMCIA isdn cards. For stock arch 2.6 kernel"
|
|
arch=(i686 x86_64)
|
|
license=('custom:"AVM"' 'LPGL')
|
|
url="http://www.avm.de"
|
|
depends=('capi4k-utils' 'kernel26>=2.6.30' 'kernel26<2.6.31')
|
|
if [ "$CARCH" = "i686" ]; then source=(ftp://ftp.avm.de/cardware/fritzcrd.pcm/linux/suse.93/fcpcmcia-suse93-3.11-07.tar.gz
|
|
pcmcia-2.6.17.patch atomic.patch kernel-2.6.19.patch kernel-2.6.20.patch kernel-2.6.22.patch kernel-2.6.24.patch kernel-2.6.27.patch kernel-2.6.28.patch)
|
|
md5sums=('96fc3e72afdc2087b4dafe41c069ec18'
|
|
'ec21dee3a5a09203dc55b399c29bc58c'
|
|
'258b13bb2ac46960b9c91635f02cd080'
|
|
'5c63dc9df0810bb1ba85f3425abaa0ed'
|
|
'890ec6e1219a3a4bae77f5815c3ed40d'
|
|
'4f4f03630ed994b16b4cd167f090a116'
|
|
'21bfa466b1fb94663ed1f265948dba5e'
|
|
'e32439084b62ee7975ae45a443b6eba9'
|
|
'e953a90fe3d08ebbd8736f66902414dc')
|
|
fi
|
|
if [ "$CARCH" = "x86_64" ]; then source=(ftp://ftp.avm.de/cardware/fritzcrd.pcm/linux_64bit/suse.10.0/fcpcmcia-suse10.0-64bit-3.11-07.tar.gz
|
|
pcmcia-2.6.17.patch atomic.patch kernel-2.6.19.patch kernel-2.6.20.patch kernel-2.6.22.patch kernel-2.6.24.patch kernel-2.6.27.patch kernel-2.6.28.patch)
|
|
md5sums=('4f461710cf57ebf50b3c4f2842288752'
|
|
'ec21dee3a5a09203dc55b399c29bc58c'
|
|
'258b13bb2ac46960b9c91635f02cd080'
|
|
'5c63dc9df0810bb1ba85f3425abaa0ed'
|
|
'890ec6e1219a3a4bae77f5815c3ed40d'
|
|
'4f4f03630ed994b16b4cd167f090a116'
|
|
'21bfa466b1fb94663ed1f265948dba5e'
|
|
'e32439084b62ee7975ae45a443b6eba9'
|
|
'e953a90fe3d08ebbd8736f66902414dc')
|
|
fi
|
|
install=(fcpcmcia.install)
|
|
options=(!makeflags)
|
|
build() {
|
|
cd $srcdir/fritz/src
|
|
[ "$CARCH" = "i686" ] && (patch -Np0 -i ../../atomic.patch || return 1)
|
|
patch -Np0 -i ../../pcmcia-2.6.17.patch || return 1
|
|
patch -Np0 -i ../../kernel-2.6.19.patch || return 1
|
|
patch -Np0 -i ../../kernel-2.6.20.patch || return 1
|
|
patch -Np0 -i ../../kernel-2.6.22.patch || return 1
|
|
patch -Np0 -i ../../kernel-2.6.24.patch || return 1
|
|
patch -Np2 -i ../../kernel-2.6.27.patch || return 1
|
|
patch -Np1 -i ../../kernel-2.6.28.patch || return 1
|
|
|
|
cd ..
|
|
# fix from Karsten Keil <kkeil@suse.de>
|
|
# in refernece to bug: http://bugs.archlinux.org/task/8511
|
|
OBJ=$(find . -name '*lib.o')
|
|
for i in $OBJ; do
|
|
mv $i $i.old
|
|
objcopy -L memcmp \
|
|
-L memcpy \
|
|
-L memmove \
|
|
-L memset \
|
|
-L strcat \
|
|
-L strcmp \
|
|
-L strcpy \
|
|
-L strlen \
|
|
-L strncmp \
|
|
-L strncpy \
|
|
$i.old $i
|
|
done
|
|
cd $srcdir/fritz
|
|
make KDIR=/lib/modules/${_kernver}/build LIBDIR=$pkgdir/var/lib/fritz all || return 1
|
|
mkdir -p $pkgdir/lib/modules/${_kernver}/kernel/drivers/isdn/hardware/avm/
|
|
cp $srcdir/fritz/src/fcpcmcia.ko $pkgdir/lib/modules/${_kernver}/kernel/drivers/isdn/hardware/avm/
|
|
cp $srcdir/fritz/src/fcpcmcia_cs.ko $pkgdir/lib/modules/${_kernver}/kernel/drivers/isdn/hardware/avm/
|
|
rm -r $pkgdir/var/lib/fritz
|
|
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/fcpcmcia.install
|
|
}
|