
PKGBUILD
By: a guest on
Sep 22nd, 2010 | syntax:
Bash | size: 1.77 KB | hits: 132 | expires: Never
# Contributor: fs4000 <matthias_dienstbier[at]yahoo[dot]de>
pkgname=phc-k8
pkgver=0.4.2
pkgrel=5
pkgdesc="frequency driver for AMD K8 with undervolting feature"
url="http://www.linux-phc.org"
arch=('i686' 'x86_64')
license=('GPL')
depends=('kernel26-headers')
provides=('linux-phc')
backup=('etc/modprobe.d/phc-k8.conf' 'etc/conf.d/phc-k8.conf')
install=phc-k8.install
source=("phc-k8-$pkgver.tar.gz::$url/forum/download/file.php?id=83"
"phc-k8.rc"
"phc-k8.conf")
md5sums=('41c63322ed041467433cc6abdd6e5bf2'
'f02c367deb29aba9248e4a9ab40a939f'
'83f73be7004b895a745961d0b00804ce')
build(){
sed "s/depmod.*/depmod `uname -r`/" -i ../$install
cd phc-k8_v$pkgver
#sed -i 's| /etc/modprobe.d/phc-k8.conf| /etc/modprobe.d/phc-k8.conf|' Makefile
sed -i 's|^\tinstall -m 644 -o root -g root phc-k8.modprobe /etc/modprobe.d/phc-k8.conf||' Makefile
sed -i 's|\([^=]\) /lib/modules/|\1 ${DESTDIR}/lib/modules/|' Makefile
#sed -i 's|^\tdepmod $(KERNELVERSION) -a|#\tdepmod $(KERNELVERSION) -a|' Makefile
# Fix kernels 2.6.33 and later
[ `uname -r | head -c6 | tail -c2` -ge 33 ] && sed -i 's|/include/linux/utsrelease.h|/include/generated/utsrelease.h|' Makefile
#make || return 1
#install -d "$pkgdir/etc/modprobe.d"
#make DESTDIR="$pkgdir" install || return 1
install -d ${pkgdir}/usr/lib/phc-k8
install -Dm644 {phc-k8.c,phc-k8.h,Makefile} ${pkgdir}/usr/lib/phc-k8/
install -Dm644 phc-k8.modprobe ${pkgdir}/etc/modprobe.d/phc-k8.conf
install -Dm644 ${srcdir}/phc-k8.conf $pkgdir/etc/conf.d/phc-k8.conf
install -Dm755 ${srcdir}/phc-k8.rc $pkgdir/etc/rc.d/phc-k8
install -d "$pkgdir/usr/share/doc/phc-k8/"
install -m644 {Changelog,README} "$pkgdir/usr/share/doc/phc-k8/"
install -d ${pkgdir}/var/log/
touch ${pkgdir}/var/log/phc-k8.log
}