1 # Contributor: Ali H. Caliskan <ali.h.caliskan AT gmail DOT com>
2 # Contributor: sergeantspoon <sergeantspoon@archlinux.us>
3 # Contributor: Speedboy <theknight696.linux AT gmail DOT com>
4 # Maintainer: Gimmeapill <gimmeapill at gmail DOT com>
9 pkgdesc="Hercules DJ kernel module"
10 arch=('i686' 'x86_64')
11 url="http://ts.hercules.com/eng/"
13 depends=('linux>=3.0')
14 makedepends=('rpmextract' 'linux-headers')
15 optdepends=('hdjcpl: Control Panel for the Hercules DJ series hardware settings')
16 install=hdjmod.install
18 source=('ftp://ftp.hercules.com/pub/webupdate/DJCSeries/Hercules_DJSeries_Linux.tgz'
20 'kernel_2.6.31_fix.patch'
21 'kernel_2.6.35_fix.diff'
22 'dj_console_mp3_e2.patch'
23 'kernel_2.6.37_fix.patch'
24 'kernel_2.6.39_fix.patch')
26 md5sums=('498cf0ff144f20106718932ab22571ce'
27 '464f8a8eda9d4c2ec83cf1c43e5dbee3'
28 '405a57365935fa003514ac2370325de1'
29 '359c33f8e21a7ce5425d5409919f8252'
30 'f9e6f12c5f59c7bdb44d813cd42c9b27'
31 '132528f078a26775ca8c7c4c3ebfe748'
32 '9cc3e1cb4c7877ebf09e389e67b19182')
36 cd $srcdir/kernel\ module
37 /usr/bin/rpmextract.sh hdjmod-dkms-1.28-1.noarch.rpm
39 # Delete the old source folder
40 rm -rf $srcdir/hdjmod-1.28
43 mv usr/src/hdjmod-1.28 $srcdir
44 cd $srcdir/hdjmod-1.28
46 # First patch makes installing easier
47 patch -p0 < $srcdir/hdjmod.diff
49 # Second patch fixes APIs that were changed in kernel >= 2.6.31
50 patch -p0 < $srcdir/kernel_2.6.31_fix.patch
52 # Third patch fixes Build errors with a kernel >= 2.6.35
53 patch -p0 < $srcdir/kernel_2.6.35_fix.diff
55 # Fourth patch adds supports for the DJ Console MP3 e2
56 patch -p0 < $srcdir/dj_console_mp3_e2.patch
58 # Fifth patch fixes build errors with kernel 2.6.37
59 patch -p0 < $srcdir/kernel_2.6.37_fix.patch
61 # Sixth patch fixes build errors with kernel 2.6.39
62 patch -p0 < $srcdir/kernel_2.6.39_fix.patch
64 # Fix the path to the linux headers in bulk.h (this was hardcoded by kernel_2.6.35_fix.diff)
65 sed -i s/2.6.35-ARCH/$(uname -r)/ bulk.h
69 make DESTDIR="$pkgdir" install || return 1