diff options
-rw-r--r-- | libre/acpi_call-parabola/PKGBUILD | 33 | ||||
-rw-r--r-- | libre/acpi_call-parabola/kmod.install | 12 | ||||
-rw-r--r-- | libre/lirc-parabola/PKGBUILD | 14 |
3 files changed, 32 insertions, 27 deletions
diff --git a/libre/acpi_call-parabola/PKGBUILD b/libre/acpi_call-parabola/PKGBUILD index bf80b98da..f15838d2a 100644 --- a/libre/acpi_call-parabola/PKGBUILD +++ b/libre/acpi_call-parabola/PKGBUILD @@ -6,38 +6,35 @@ # Contributor: Luke Shumaker <lukeshu@sbcglobal.net> # Contributor: Márcio Silva <coadde@parabola.nu> -# Kernel info _basekernel=3.16 _kernelname= -# Source info _pkgname=acpi_call +pkgname=${_pkgname}-parabola${_kernelname} pkgver=1.1.0 +pkgrel=11.1 +_extramodules=extramodules-${_basekernel}${_kernelname} pkgdesc="A linux kernel module that enables calls to ACPI methods through /proc/acpi/call (built for the linux-libre${_kernelname} kernel package)" +arch=('i686' 'x86_64' 'mips64el') url="http://github.com/mkottman/${_pkgname}" license=('GPL') -source=("${url}/archive/v${pkgver}.tar.gz") -sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0') - -# Package info -pkgrel=11.1 -arch=('i686' 'x86_64' 'mips64el') -install='kmod.install' -_replaces=("${_pkgname}" "${_pkgname}-libre") -_provides=("${_pkgname}") # Generic (you shouldn't have to modify any of these variables) -pkgname=${_pkgname}-parabola${_kernelname} _toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) -_extramodules=extramodules-${_basekernel}${_kernelname} depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") + +_replaces=("${_pkgname}" "${_pkgname}-libre") +_provides=("${_pkgname}") + replaces=( "${_replaces[@]/%/${_kernelname}}") conflicts=("${_replaces[@]/%/${_kernelname}}") provides=( "${_provides[@]/%/${_kernelname}=${pkgver}}") -if [[ -n "${_kernelname}" ]]; then - provides+=("${_pkgname}-parabola=${pkgver}") # pkgname without _kernelname -fi +provides+=("${_pkgname}-parabola=${pkgver}") # pkgname without _kernelname + +install='kmod.install' +source=("${url}/archive/v${pkgver}.tar.gz") +sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0') build() { cd "${srcdir}/${_pkgname}-${pkgver}" @@ -53,7 +50,7 @@ package() { # Set the correct extramodules directory for install cp -f "${startdir}/${install}" "${startdir}/${install}.pkg" true && install=${install}.pkg - sed -r "s/(_extramodules=).*/\1${_extramodules}/" -i "${startdir}/${install}" + sed -i "s/^_EXTRAMODULES=.*/_EXTRAMODULES="${_extramodules}"/" "${startdir}/${install}" # Actually install install -dm 755 "${pkgdir}"/usr/lib/{modules/${_extramodules},modules-load.d} @@ -64,3 +61,5 @@ package() { install -dm 755 "${pkgdir}"/usr/share/${pkgname} cp -dr --no-preserve='ownership' {examples,support} "${pkgdir}"/usr/share/${pkgname}/ } + +# vim: ts=2 sw=2 et: diff --git a/libre/acpi_call-parabola/kmod.install b/libre/acpi_call-parabola/kmod.install index d4bd8cb34..40caa464f 100644 --- a/libre/acpi_call-parabola/kmod.install +++ b/libre/acpi_call-parabola/kmod.install @@ -1,14 +1,14 @@ +_EXTRAMODULES= + post_install() { - _extramodules=THIS_IS_AUTOMATICALLY_SET_BY_PKGBUILD - depmod $(cat /usr/lib/modules/${_extramodules}/version) + echo ">>> Updating module dependencies. Please wait ..." + depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 } post_upgrade() { - post_install + post_install } post_remove() { - post_install + post_install } - -# vim: ts=2 sw=2 et: diff --git a/libre/lirc-parabola/PKGBUILD b/libre/lirc-parabola/PKGBUILD index 5208acab7..d5f36b531 100644 --- a/libre/lirc-parabola/PKGBUILD +++ b/libre/lirc-parabola/PKGBUILD @@ -4,6 +4,10 @@ # Contributor: Luke Shumaker <lukeshu@sbcglobal.net> # Contributor: Márcio Silva <coadde@parabola.nu> + +_basekernel=3.16 +_kernelname= + _pkgname=lirc-parabola${_kernelname} pkgbase=$_pkgname pkgname=("$_pkgname" lirc-utils-parabola) @@ -11,8 +15,6 @@ _pkgver=0.9.1a [[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver" pkgrel=3.2 epoch=1 -_basekernel=3.16 -_kernelname= _extramodules=extramodules-${_basekernel}${_kernelname} arch=('i686' 'x86_64' 'mips64el') url="http://www.lirc.org/" @@ -87,8 +89,10 @@ _package_lirc-parabola() { make DESTDIR="${pkgdir}" moduledir="/usr/lib/modules/${_extramodules}" install gzip -9 "${pkgdir}/usr/lib/modules/${_extramodules}"/*.ko - # set the kernel we've built for inside the install script - sed -i "s/^_EXTRAMODULES=$/_EXTRAMODULES="${_extramodules}"/" "${startdir}/kmod.install" + # Set the correct extramodules directory for install + cp -f "${startdir}/${install}" "${startdir}/${install}.pkg" + true && install=${install}.pkg + sed -i "s/^_EXTRAMODULES=$/_EXTRAMODULES="${_extramodules}"/" "${startdir}/${install}" } eval "package_${_pkgname}() { _package_lirc-parabola; }" @@ -119,3 +123,5 @@ package_lirc-utils-parabola() { # remove built modules rm -r "${pkgdir}/usr/lib/modules" } + +# vim: ts=2 sw=2 et: |