Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  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>
  5.  
  6. pkgname=hdjmod
  7. pkgver=1.28
  8. pkgrel=9
  9. pkgdesc="Hercules DJ kernel module"
  10. arch=('x86_64')
  11. url="http://ts.hercules.com/eng/"
  12. license=('GPL2')
  13. depends=('linux>=3.12')
  14. makedepends=('rpmextract' 'linux-headers')
  15. # optdepends=('hdjcpl: Control Panel for the Hercules DJ series hardware settings')
  16. install=hdjmod.install
  17.  
  18. source=('ftp://ftp.hercules.com/pub/webupdate/DJCSeries/Hercules_DJSeries_Linux.tgz'
  19. 'hdjmod.diff'
  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'
  25. 'kernel_3.6_fix.patch'
  26. 'kernel_3.7_fix.patch'
  27. 'kernel_3.16_fix.patch')
  28.  
  29. md5sums=('498cf0ff144f20106718932ab22571ce'
  30. '464f8a8eda9d4c2ec83cf1c43e5dbee3'
  31. '405a57365935fa003514ac2370325de1'
  32. '359c33f8e21a7ce5425d5409919f8252'
  33. 'f9e6f12c5f59c7bdb44d813cd42c9b27'
  34. '132528f078a26775ca8c7c4c3ebfe748'
  35. '9cc3e1cb4c7877ebf09e389e67b19182'
  36. '8bf580fcfe06f48ce8247272b55633ce'
  37. 'f40801f32abc47088a54c8893aa27e75'
  38. 'c3524049f1ef6046ccfaa657b398053f')
  39.  
  40. build() {
  41. # Obtain source files
  42. cd $srcdir/kernel\ module
  43. /usr/bin/rpmextract.sh hdjmod-dkms-1.28-1.noarch.rpm
  44.  
  45. # Delete the old source folder
  46. rm -rf $srcdir/hdjmod-1.28
  47.  
  48. # Move the source
  49. mv usr/src/hdjmod-1.28 $srcdir
  50. cd $srcdir/hdjmod-1.28
  51.  
  52. # First patch makes installing easier
  53. patch -p0 < $srcdir/hdjmod.diff
  54.  
  55. # Second patch fixes APIs that were changed in kernel >= 2.6.31
  56. patch -p0 < $srcdir/kernel_2.6.31_fix.patch
  57.  
  58. # Third patch fixes Build errors with a kernel >= 2.6.35
  59. patch -p0 < $srcdir/kernel_2.6.35_fix.diff
  60.  
  61. # Fix the path to the linux headers in bulk.h (this was hardcoded by kernel_2.6.35_fix.diff)
  62. sed -i s/2.6.35-ARCH/$(uname -r)/ bulk.h
  63.  
  64. # Fourth patch adds supports for the DJ Console MP3 e2
  65. patch -p0 < $srcdir/dj_console_mp3_e2.patch
  66.  
  67. # Fifth patch fixes build errors with kernel 2.6.37
  68. patch -p0 < $srcdir/kernel_2.6.37_fix.patch
  69.  
  70. # Sixth patch fixes build errors with kernel 2.6.39 (from OpenSUSE Factory)
  71. patch -p0 < $srcdir/kernel_2.6.39_fix.patch
  72.  
  73. # Seventh patch fixes build errors with kernel 3.6.x (from OpenSUSE Factory)
  74. patch -p0 < $srcdir/kernel_3.6_fix.patch
  75.  
  76. # Eighth patch fixes build errors with kernel 3.7.x (from OpenSUSE Factory)
  77. patch -p0 < $srcdir/kernel_3.7_fix.patch
  78.  
  79. # Ninth patch fixes build errors with kernel 3.16.x ( by Fabian Zimmermann / fabian-zimmermann.net )
  80. patch -p0 < $srcdir/kernel_3.16_fix.patch
  81.  
  82. # Fix again the path to slab.h in bulk.h
  83. sed -i s@/usr/src/linux-$(uname -r)/include/linux/slab.h@/usr/lib/modules/$(uname -r)/build/include/linux/slab.h@ bulk.h
  84.  
  85. # Patches 5->8 by Matthias Bach <marix@marix.org>
  86. # http://download.opensuse.org/repositories/hardware/openSUSE_Factory/src/
  87.  
  88. # Compile...
  89. make
  90. make DESTDIR="$pkgdir" install
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement