summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/lirc-parabola/PKGBUILD65
-rw-r--r--libre/lirc-parabola/kmod.install12
2 files changed, 29 insertions, 48 deletions
diff --git a/libre/lirc-parabola/PKGBUILD b/libre/lirc-parabola/PKGBUILD
index 68ba148d6..ddae1f6a7 100644
--- a/libre/lirc-parabola/PKGBUILD
+++ b/libre/lirc-parabola/PKGBUILD
@@ -4,25 +4,28 @@
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: Márcio Silva <coadde@parabola.nu>
-# Kernel info
-_basekernel=3.16
-_kernelname=
-
-# Source info
_pkgname=lirc-parabola${_kernelname}
-# Only build lirc-utils once; for the stock kernel
-if [[ -n "${_kernelname}" ]]; then
- pkgname=$_pkgname
-else
- pkgbase=$_pkgname
- pkgname=("$_pkgname" lirc-utils-parabola)
-fi
-
+pkgbase=$_pkgname
+pkgname=("$_pkgname" lirc-utils-parabola)
_pkgver=0.9.1a
[[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver"
-
+pkgrel=3.2
+epoch=1
+_basekernel=3.16-gnu
+_kernelname=
+_extramodules=extramodules-${_basekernel}${_kernelname}
+arch=('i686' 'x86_64' 'mips64el')
url="http://www.lirc.org/"
license=('GPL')
+# NOTICE: Don't forget to bump version in depends in package_lirc()!
+makedepends=('help2man' 'alsa-lib' 'libx11' 'libftdi-compat' 'libirman' 'python2')
+
+# Generic (you shouldn't have to modify any of these variables)
+_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1)))
+makedepends+=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}"
+ "linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}")
+
+options=('!makeflags' '!strip')
source=("http://prdownloads.sourceforge.net/lirc/lirc-${_pkgver}.tar.bz2"
"wpc8769l-build-fix.patch"
lirc-0.9.1a-fix-segfaults.patch
@@ -36,19 +39,6 @@ md5sums=('1f1fac162ed309dd50f307e96a292957'
'32df3b9bc859565d6acf5f0e5b747083'
'febf25c154a7d36f01159e84f26c2d9a')
-# Package info
-pkgrel=3.2
-epoch=1
-arch=('i686' 'x86_64' 'mips64el')
-options=('!makeflags' '!strip')
-makedepends=('help2man' 'alsa-lib' 'libx11' 'libftdi-compat' 'libirman' 'python2')
-
-# Generic (you shouldn't have to modify any of these variables)
-_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1)))
-_extramodules=extramodules-${_basekernel}${_kernelname}
-makedepends+=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}"
- "linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}")
-
prepare() {
cd "${srcdir}/lirc-${_pkgver}"
@@ -83,32 +73,24 @@ build() {
make
}
-_package_lirc() {
+_package_lirc-parabola() {
pkgdesc="Linux Infrared Remote Control kernel modules (built for the linux-libre${_kernelname} kernel package)"
depends=('lirc-utils' "linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
replaces=('lirc+pctv')
- [[ -z "$_kernelname" ]] || provides=("lirc-parabola=${pkgver}")
install=kmod.install
-
replaces+=("lirc${_kernelname}" "lirc-libre${_kernelname}")
conflicts+=("lirc${_kernelname}" "lirc-libre${_kernelname}")
provides+=("lirc${_kernelname}=${pkgver}")
cd "${srcdir}/lirc-${_pkgver}/drivers"
- # 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}"
-
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"
}
-if [[ -n "$_kernelname" ]]; then
- eval "package() { _package_lirc; }"
-else
- eval "package_${_pkgname}() { _package_lirc; }"
-fi
+eval "package_${_pkgname}() { _package_lirc-parabola; }"
package_lirc-utils-parabola() {
pkgdesc="Linux Infrared Remote Control utilities"
@@ -116,11 +98,10 @@ package_lirc-utils-parabola() {
optdepends=('python2: pronto2lirc utility')
options=('strip')
backup=('etc/lirc/lirc_options.conf' 'etc/lirc/lircd.conf' 'etc/lirc/lircmd.conf')
-
replaces=('lirc-utils' 'lirc-libre-utils')
conflicts=('lirc-utils' 'lirc-libre-utils')
provides=("lirc-utils=$pkgver")
- install=kmod.install
+ install=lirc-utils.install
cd "${srcdir}/lirc-${_pkgver}"
diff --git a/libre/lirc-parabola/kmod.install b/libre/lirc-parabola/kmod.install
index d4bd8cb34..40caa464f 100644
--- a/libre/lirc-parabola/kmod.install
+++ b/libre/lirc-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: