Move patching to prepare()

master
Davi da Silva Böger 8 years ago
parent e37914a47d
commit 9169ff4023

@ -1,5 +1,5 @@
# Generated by mksrcinfo v8 # Generated by mksrcinfo v8
# Tue Jan 31 20:09:33 UTC 2017 # Tue Jan 31 20:55:25 UTC 2017
pkgbase = bbswitch-dkms-git pkgbase = bbswitch-dkms-git
pkgdesc = kernel module allowing to switch dedicated graphics card on Optimus laptops, dkms version pkgdesc = kernel module allowing to switch dedicated graphics card on Optimus laptops, dkms version
pkgver = 0.8.r0.g0c38f97 pkgver = 0.8.r0.g0c38f97

@ -26,11 +26,15 @@ pkgver() {
git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
} }
package() { prepare() {
cd "${srcdir}/${_pkgname}" cd "${srcdir}/${_pkgname}"
# Exceprt adapted from upstream Makefile.dkms # Exceprt adapted from upstream Makefile.dkms
sed -e "s/#MODULE_VERSION#/${pkgver}/" -i "dkms/dkms.conf" sed -e "s/#MODULE_VERSION#/${pkgver}/" -i "dkms/dkms.conf"
}
package() {
cd "${srcdir}/${_pkgname}"
install -dm755 "${pkgdir}/usr/src/${_pkgname}-${pkgver}" install -dm755 "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
install -Dm644 Makefile bbswitch.c dkms/dkms.conf "${pkgdir}/usr/src/${_pkgname}-${pkgver}" install -Dm644 Makefile bbswitch.c dkms/dkms.conf "${pkgdir}/usr/src/${_pkgname}-${pkgver}"

Loading…
Cancel
Save