Advertisement
Guest User

PKGBUILD

a guest
Sep 22nd, 2010
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.77 KB | None | 0 0
  1. # Contributor: fs4000 <matthias_dienstbier[at]yahoo[dot]de>
  2.  
  3. pkgname=phc-k8
  4. pkgver=0.4.2
  5. pkgrel=5
  6. pkgdesc="frequency driver for AMD K8 with undervolting feature"
  7. url="http://www.linux-phc.org"
  8. arch=('i686' 'x86_64')
  9. license=('GPL')
  10. depends=('kernel26-headers')
  11. provides=('linux-phc')
  12. backup=('etc/modprobe.d/phc-k8.conf' 'etc/conf.d/phc-k8.conf')
  13. install=phc-k8.install
  14. source=("phc-k8-$pkgver.tar.gz::$url/forum/download/file.php?id=83"
  15.     "phc-k8.rc"
  16.     "phc-k8.conf")
  17. md5sums=('41c63322ed041467433cc6abdd6e5bf2'
  18.          'f02c367deb29aba9248e4a9ab40a939f'
  19.          '83f73be7004b895a745961d0b00804ce')
  20.  
  21. build(){
  22.     sed "s/depmod.*/depmod `uname -r`/" -i ../$install
  23.     cd phc-k8_v$pkgver
  24.     #sed -i 's| /etc/modprobe.d/phc-k8.conf| /etc/modprobe.d/phc-k8.conf|' Makefile
  25.     sed -i 's|^\tinstall -m 644 -o root -g root phc-k8.modprobe /etc/modprobe.d/phc-k8.conf||' Makefile
  26.     sed -i 's|\([^=]\) /lib/modules/|\1 ${DESTDIR}/lib/modules/|' Makefile
  27.     #sed -i 's|^\tdepmod $(KERNELVERSION) -a|#\tdepmod $(KERNELVERSION) -a|' Makefile
  28.     # Fix kernels 2.6.33 and later
  29.     [ `uname -r | head -c6 | tail -c2` -ge 33 ] && sed -i 's|/include/linux/utsrelease.h|/include/generated/utsrelease.h|' Makefile
  30.     #make || return 1
  31.     #install -d "$pkgdir/etc/modprobe.d"
  32.     #make DESTDIR="$pkgdir" install || return 1
  33.    
  34.     install -d ${pkgdir}/usr/lib/phc-k8
  35.     install -Dm644 {phc-k8.c,phc-k8.h,Makefile} ${pkgdir}/usr/lib/phc-k8/
  36.     install -Dm644 phc-k8.modprobe ${pkgdir}/etc/modprobe.d/phc-k8.conf
  37.     install -Dm644 ${srcdir}/phc-k8.conf $pkgdir/etc/conf.d/phc-k8.conf
  38.     install -Dm755 ${srcdir}/phc-k8.rc $pkgdir/etc/rc.d/phc-k8
  39.    
  40.     install -d "$pkgdir/usr/share/doc/phc-k8/"
  41.     install -m644 {Changelog,README} "$pkgdir/usr/share/doc/phc-k8/"
  42.    
  43.     install -d ${pkgdir}/var/log/
  44.     touch ${pkgdir}/var/log/phc-k8.log
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement