From 9169ff40234ebd56219322471064ad84d8cba2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davi=20da=20Silva=20B=C3=B6ger?= Date: Tue, 31 Jan 2017 18:55:45 -0200 Subject: [PATCH] Move patching to prepare() --- .SRCINFO | 2 +- PKGBUILD | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index f1872f6..8ba4f73 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Tue Jan 31 20:09:33 UTC 2017 +# Tue Jan 31 20:55:25 UTC 2017 pkgbase = bbswitch-dkms-git pkgdesc = kernel module allowing to switch dedicated graphics card on Optimus laptops, dkms version pkgver = 0.8.r0.g0c38f97 diff --git a/PKGBUILD b/PKGBUILD index 69110f3..155b422 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -26,11 +26,15 @@ pkgver() { git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' } -package() { +prepare() { cd "${srcdir}/${_pkgname}" # Exceprt adapted from upstream Makefile.dkms sed -e "s/#MODULE_VERSION#/${pkgver}/" -i "dkms/dkms.conf" +} + +package() { + cd "${srcdir}/${_pkgname}" install -dm755 "${pkgdir}/usr/src/${_pkgname}-${pkgver}" install -Dm644 Makefile bbswitch.c dkms/dkms.conf "${pkgdir}/usr/src/${_pkgname}-${pkgver}"