From 3f2a8eca7c7bdcd7bcdc9b67e00f02cdef9002bf Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Mon, 1 Sep 2014 07:52:09 -0300 Subject: remove parabola suffix and add complex pkgrel on kernel module packages --- libre/acpi_call-parabola/PKGBUILD | 87 ----------- libre/acpi_call-parabola/kmod.install | 14 -- libre/acpi_call/PKGBUILD | 96 ++++++++++++ libre/acpi_call/kmod.install | 14 ++ libre/bbswitch-parabola/PKGBUILD | 77 ---------- libre/bbswitch-parabola/kmod.install | 14 -- libre/bbswitch/PKGBUILD | 88 +++++++++++ libre/bbswitch/kmod.install | 14 ++ libre/lirc-parabola/PKGBUILD | 154 ------------------- libre/lirc-parabola/irexec.service | 11 -- libre/lirc-parabola/kmod.install | 14 -- .../lirc-parabola/lirc-0.9.1a-fix-segfaults.patch | 79 ---------- libre/lirc-parabola/lirc-utils.install | 13 -- libre/lirc-parabola/lirc.logrotate | 5 - libre/lirc-parabola/lirc.tmpfiles | 1 - libre/lirc-parabola/wpc8769l-build-fix.patch | 90 ------------ libre/lirc/PKGBUILD | 163 +++++++++++++++++++++ libre/lirc/irexec.service | 11 ++ libre/lirc/kmod.install | 14 ++ libre/lirc/lirc-0.9.1a-fix-segfaults.patch | 79 ++++++++++ libre/lirc/lirc-utils.install | 13 ++ libre/lirc/lirc.logrotate | 5 + libre/lirc/lirc.tmpfiles | 1 + libre/lirc/wpc8769l-build-fix.patch | 90 ++++++++++++ libre/tp_smapi-parabola/PKGBUILD | 97 ------------ libre/tp_smapi-parabola/kmod.install | 14 -- libre/tp_smapi/PKGBUILD | 107 ++++++++++++++ libre/tp_smapi/kmod.install | 14 ++ libre/vhba-module-parabola/60-vhba.rules | 1 - libre/vhba-module-parabola/PKGBUILD | 82 ----------- libre/vhba-module-parabola/kmod.install | 20 --- libre/vhba-module/60-vhba.rules | 1 + libre/vhba-module/PKGBUILD | 93 ++++++++++++ libre/vhba-module/kmod.install | 20 +++ 34 files changed, 823 insertions(+), 773 deletions(-) delete mode 100644 libre/acpi_call-parabola/PKGBUILD delete mode 100644 libre/acpi_call-parabola/kmod.install create mode 100644 libre/acpi_call/PKGBUILD create mode 100644 libre/acpi_call/kmod.install delete mode 100644 libre/bbswitch-parabola/PKGBUILD delete mode 100644 libre/bbswitch-parabola/kmod.install create mode 100644 libre/bbswitch/PKGBUILD create mode 100644 libre/bbswitch/kmod.install delete mode 100644 libre/lirc-parabola/PKGBUILD delete mode 100644 libre/lirc-parabola/irexec.service delete mode 100644 libre/lirc-parabola/kmod.install delete mode 100644 libre/lirc-parabola/lirc-0.9.1a-fix-segfaults.patch delete mode 100644 libre/lirc-parabola/lirc-utils.install delete mode 100644 libre/lirc-parabola/lirc.logrotate delete mode 100644 libre/lirc-parabola/lirc.tmpfiles delete mode 100644 libre/lirc-parabola/wpc8769l-build-fix.patch create mode 100644 libre/lirc/PKGBUILD create mode 100644 libre/lirc/irexec.service create mode 100644 libre/lirc/kmod.install create mode 100644 libre/lirc/lirc-0.9.1a-fix-segfaults.patch create mode 100644 libre/lirc/lirc-utils.install create mode 100644 libre/lirc/lirc.logrotate create mode 100644 libre/lirc/lirc.tmpfiles create mode 100644 libre/lirc/wpc8769l-build-fix.patch delete mode 100644 libre/tp_smapi-parabola/PKGBUILD delete mode 100644 libre/tp_smapi-parabola/kmod.install create mode 100644 libre/tp_smapi/PKGBUILD create mode 100644 libre/tp_smapi/kmod.install delete mode 100644 libre/vhba-module-parabola/60-vhba.rules delete mode 100644 libre/vhba-module-parabola/PKGBUILD delete mode 100644 libre/vhba-module-parabola/kmod.install create mode 100644 libre/vhba-module/60-vhba.rules create mode 100644 libre/vhba-module/PKGBUILD create mode 100644 libre/vhba-module/kmod.install (limited to 'libre') diff --git a/libre/acpi_call-parabola/PKGBUILD b/libre/acpi_call-parabola/PKGBUILD deleted file mode 100644 index 35fda1171..000000000 --- a/libre/acpi_call-parabola/PKGBUILD +++ /dev/null @@ -1,87 +0,0 @@ -# $Id: PKGBUILD 116819 2014-08-04 07:10:28Z tpowa $ -# Maintainer (Arch): Maxime Gauduin -# Contributor (Arch): mortzu -# Contributor (Arch): fnord0 -# Maintainer: André Silva -# Contributor: Luke Shumaker -# Contributor: Márcio Silva - -_kernelname= -_basekernel=3.16 -_pkgrel=1 - -if [[ ${_kernelname} == "" ]]; then - _basekernel=${_basekernel} - _pkgrel=11.3 -elif [[ ${_kernelname} == -lts ]]; then - _basekernel=3.14 - _pkgrel=7 -elif [[ ${_kernelname} == -grsec ]]; then - _basekernel=3.15 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -lts-knock ]]; then - _basekernel=3.10 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -rt ]]; then - _basekernel=3.14 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -pae ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -xen ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -fi - -_pkgname=acpi_call -pkgname=${_pkgname}${_kernelname}-parabola -pkgver=1.1.0 -pkgrel=${_pkgrel} -_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') - -# Generic (you shouldn't have to modify any of these variables) -_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) -depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") -makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") - -replaces=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") -[[ -n ${_kernelname} ]] && replaces+=("${_pkgname}-parabola${_kernelname}") -conflicts=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") -[[ -n ${_kernelname} ]] && conflicts+=("${_pkgname}-parabola${_kernelname}") -provides=("${_pkgname}${_kernelname}=${pkgver}") - -install='kmod.install' -source=("${url}/archive/v${pkgver}.tar.gz") -sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0') - -build() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" - - make KVERSION="${_kernver}" -} - -package() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - # 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}" - - # Actually install - install -dm 755 "${pkgdir}"/usr/lib/{modules/${_extramodules},modules-load.d} - install -m 644 ${_pkgname}.ko "${pkgdir}"/usr/lib/modules/${_extramodules} - gzip "${pkgdir}"/usr/lib/modules/${_extramodules}/${_pkgname}.ko - echo ${_pkgname} > "${pkgdir}"/usr/lib/modules-load.d/${_pkgname}${_kernelname}.conf - - install -dm 755 "${pkgdir}"/usr/share/${_pkgname}${_kernelname} - cp -dr --no-preserve='ownership' {examples,support} "${pkgdir}"/usr/share/${_pkgname}${_kernelname}/ -} - -# vim: ts=2 sw=2 et: diff --git a/libre/acpi_call-parabola/kmod.install b/libre/acpi_call-parabola/kmod.install deleted file mode 100644 index 40caa464f..000000000 --- a/libre/acpi_call-parabola/kmod.install +++ /dev/null @@ -1,14 +0,0 @@ -_EXTRAMODULES= - -post_install() { - echo ">>> Updating module dependencies. Please wait ..." - depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} diff --git a/libre/acpi_call/PKGBUILD b/libre/acpi_call/PKGBUILD new file mode 100644 index 000000000..1629c010c --- /dev/null +++ b/libre/acpi_call/PKGBUILD @@ -0,0 +1,96 @@ +# $Id: PKGBUILD 116819 2014-08-04 07:10:28Z tpowa $ +# Maintainer (Arch): Maxime Gauduin +# Contributor (Arch): mortzu +# Contributor (Arch): fnord0 +# Maintainer: André Silva +# Contributor: Luke Shumaker +# Contributor: Márcio Silva + +_kernelname= +_basekernel=3.16 + +if [[ ${_kernelname} == "" ]]; then + _basekernel=${_basekernel} + _archrel=11 + _parabolarel=1 +elif [[ ${_kernelname} == -lts ]]; then + _basekernel=3.14 + _archrel=7 + _parabolarel=1 +elif [[ ${_kernelname} == -grsec ]]; then + _basekernel=3.15 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-grsec ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-knock ]]; then + _basekernel=3.10 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -rt ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -pae ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -xen ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +fi + +_pkgname=acpi_call +pkgname=${_pkgname}${_kernelname} +pkgver=1.1.0 +pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel} +_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') + +# Generic (you shouldn't have to modify any of these variables) +_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) +depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") +makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") + +replaces=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") +[[ -n ${_kernelname} ]] && replaces+=("${_pkgname}${_kernelname}-parabola") +conflicts=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") +[[ -n ${_kernelname} ]] && conflicts+=("${_pkgname}${_kernelname}-parabola") + +install='kmod.install' +source=("${url}/archive/v${pkgver}.tar.gz") +sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0') + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + + make KVERSION="${_kernver}" +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + # 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}" + + # Actually install + install -dm 755 "${pkgdir}"/usr/lib/{modules/${_extramodules},modules-load.d} + install -m 644 ${_pkgname}.ko "${pkgdir}"/usr/lib/modules/${_extramodules} + gzip "${pkgdir}"/usr/lib/modules/${_extramodules}/${_pkgname}.ko + echo ${_pkgname} > "${pkgdir}"/usr/lib/modules-load.d/${_pkgname}${_kernelname}.conf + + install -dm 755 "${pkgdir}"/usr/share/${_pkgname}${_kernelname} + cp -dr --no-preserve='ownership' {examples,support} "${pkgdir}"/usr/share/${_pkgname}${_kernelname}/ +} + +# vim: ts=2 sw=2 et: diff --git a/libre/acpi_call/kmod.install b/libre/acpi_call/kmod.install new file mode 100644 index 000000000..40caa464f --- /dev/null +++ b/libre/acpi_call/kmod.install @@ -0,0 +1,14 @@ +_EXTRAMODULES= + +post_install() { + echo ">>> Updating module dependencies. Please wait ..." + depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/libre/bbswitch-parabola/PKGBUILD b/libre/bbswitch-parabola/PKGBUILD deleted file mode 100644 index bdac305f6..000000000 --- a/libre/bbswitch-parabola/PKGBUILD +++ /dev/null @@ -1,77 +0,0 @@ -# Maintainer (Arch): Sven-Hendrik Haase -# Contributor (Arch): M0Rf30 -# Contributor (Arch): Samsagax -# Maintainer: André Silva -# Contributor: Luke Shumaker -# Contributor: Márcio Silva - -_kernelname= -_basekernel=3.16 -_pkgrel=15.2 - -if [[ ${_kernelname} == "" ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -lts ]]; then - _basekernel=3.14 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -grsec ]]; then - _basekernel=3.15 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -lts-knock ]]; then - _basekernel=3.10 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -rt ]]; then - _basekernel=3.14 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -pae ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -xen ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -fi - -_pkgname=bbswitch -pkgname=${_pkgname}${_kernelname}-parabola -pkgver=0.8 -pkgrel=${_pkgrel} -_extramodules=extramodules-${_basekernel}${_kernelname} -pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops (built for the linux-libre${_kernelname} kernel package)" -arch=('i686' 'x86_64' 'mips64el') -url="http://github.com/Bumblebee-Project/${_pkgname}" -license=('GPL') - -# Generic (you shouldn't have to modify any of these variables) -_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) -depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") -makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") - -replaces=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") -conflicts=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") -provides=("${_pkgname}${_kernelname}=${pkgver}") - -install='kmod.install' -source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz") -md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807') - -build() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" - - make KDIR=/lib/modules/${_kernver}/build -} - -package() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - # 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}" - - # Actually install - install -Dm644 ${_pkgname}.ko "${pkgdir}"/usr/lib/modules/${_extramodules}/${_pkgname}.ko - gzip "${pkgdir}/usr/lib/modules/${_extramodules}/${_pkgname}.ko" -} diff --git a/libre/bbswitch-parabola/kmod.install b/libre/bbswitch-parabola/kmod.install deleted file mode 100644 index 40caa464f..000000000 --- a/libre/bbswitch-parabola/kmod.install +++ /dev/null @@ -1,14 +0,0 @@ -_EXTRAMODULES= - -post_install() { - echo ">>> Updating module dependencies. Please wait ..." - depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} diff --git a/libre/bbswitch/PKGBUILD b/libre/bbswitch/PKGBUILD new file mode 100644 index 000000000..a7d017da3 --- /dev/null +++ b/libre/bbswitch/PKGBUILD @@ -0,0 +1,88 @@ +# Maintainer (Arch): Sven-Hendrik Haase +# Contributor (Arch): M0Rf30 +# Contributor (Arch): Samsagax +# Maintainer: André Silva +# Contributor: Luke Shumaker +# Contributor: Márcio Silva + +_kernelname= +_basekernel=3.16 +_archrel=15 +_parabolarel=1 + +if [[ ${_kernelname} == "" ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -grsec ]]; then + _basekernel=3.15 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-grsec ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-knock ]]; then + _basekernel=3.10 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -rt ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -pae ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -xen ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +fi + +_pkgname=bbswitch +pkgname=${_pkgname}${_kernelname} +pkgver=0.8 +pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel} +_extramodules=extramodules-${_basekernel}${_kernelname} +pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops (built for the linux-libre${_kernelname} kernel package)" +arch=('i686' 'x86_64' 'mips64el') +url="http://github.com/Bumblebee-Project/${_pkgname}" +license=('GPL') + +# Generic (you shouldn't have to modify any of these variables) +_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) +depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") +makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") + +replaces=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") +conflicts=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") + +install='kmod.install' +source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz") +md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807') + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + + make KDIR=/lib/modules/${_kernver}/build +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + # 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}" + + # Actually install + install -Dm644 ${_pkgname}.ko "${pkgdir}"/usr/lib/modules/${_extramodules}/${_pkgname}.ko + gzip "${pkgdir}/usr/lib/modules/${_extramodules}/${_pkgname}.ko" +} diff --git a/libre/bbswitch/kmod.install b/libre/bbswitch/kmod.install new file mode 100644 index 000000000..40caa464f --- /dev/null +++ b/libre/bbswitch/kmod.install @@ -0,0 +1,14 @@ +_EXTRAMODULES= + +post_install() { + echo ">>> Updating module dependencies. Please wait ..." + depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/libre/lirc-parabola/PKGBUILD b/libre/lirc-parabola/PKGBUILD deleted file mode 100644 index f4136ff98..000000000 --- a/libre/lirc-parabola/PKGBUILD +++ /dev/null @@ -1,154 +0,0 @@ -# $Id: PKGBUILD 220120 2014-08-16 22:32:11Z lfleischer $ -# Maintainer (Arch): Paul Mattal -# Maintainer: André Silva -# Contributor: Luke Shumaker -# Contributor: Márcio Silva - -_kernelname= -_basekernel=3.16 -_pkgrel=3.3 - -if [[ ${_kernelname} == "" ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -lts ]]; then - _basekernel=3.14 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -grsec ]]; then - _basekernel=3.15 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -lts-knock ]]; then - _basekernel=3.10 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -rt ]]; then - _basekernel=3.14 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -pae ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -xen ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -fi - -pkgbase=lirc -_pkgname=${pkgbase}${_kernelname}-parabola -if [[ -z ${_kernelname} ]]; then - pkgname=("$_pkgname" "${pkgbase}-utils-parabola") -else - pkgname=("$_pkgname") -fi -_pkgver=0.9.1a -[[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver" -pkgrel=${_pkgrel} -epoch=1 -_extramodules=extramodules-${_basekernel}${_kernelname} -arch=('i686' 'x86_64' 'mips64el') -url="http://www.$pkgbase.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/${pkgbase}/${pkgbase}-${_pkgver}.tar.bz2" - wpc8769l-build-fix.patch - ${pkgbase}-0.9.1a-fix-segfaults.patch - ${pkgbase}.logrotate - irexec.service - ${pkgbase}.tmpfiles) -md5sums=('1f1fac162ed309dd50f307e96a292957' - '9ec33169b3407f74264062d7679dd269' - 'cd00acf480e82a0bf050032732d0d733' - '3deb02604b37811d41816e9b4385fcc3' - '32df3b9bc859565d6acf5f0e5b747083' - 'febf25c154a7d36f01159e84f26c2d9a') - -prepare() { - cd "${srcdir}/lirc-${_pkgver}" - - patch -Np1 -i "${srcdir}/wpc8769l-build-fix.patch" - patch -Np1 -i "${srcdir}/${pkgbase}-0.9.1a-fix-segfaults.patch" - - sed -i '/AC_PATH_XTRA/d' configure.ac - sed -e 's/@X_CFLAGS@//g' \ - -e 's/@X_LIBS@//g' \ - -e 's/@X_PRE_LIBS@//g' \ - -e 's/@X_EXTRA_LIBS@//g' -i Makefile.am tools/Makefile.am - - libtoolize - autoreconf -} - -build() { - cd "${srcdir}/${pkgbase}-${_pkgver}" - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" - - PYTHON=python2 ./configure --enable-sandboxed --prefix=/usr \ - --with-driver=all --with-kerneldir="/usr/lib/modules/${_kernver}/build/" \ - --with-moduledir="/usr/lib/modules/${_kernver}/kernel/drivers/misc" \ - --sbindir=/usr/bin --with-transmitter - - # Remove drivers already in kernel - sed -e "s:lirc_dev::" -e "s:lirc_bt829::" -e "s:lirc_igorplugusb::" \ - -e "s:lirc_imon::" -e "s:lirc_parallel::" -e "s:lirc_sasem::" \ - -e "s:lirc_serial::" -e "s:lirc_sir::" -e "s:lirc_ttusbir::" \ - -e "s:lirc_atiusb::" -e "s:lirc_i2c::" \ - -i Makefile drivers/Makefile drivers/*/Makefile tools/Makefile - make -} - -_package_lirc-parabola() { - pkgdesc="Linux Infrared Remote Control kernel modules (built for the linux-libre${_kernelname} kernel package)" - depends=("${pkgbase}-utils" "linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") - replaces=("${pkgbase}${_kernelname}" "${pkgbase}-libre${_kernelname}") - [[ -n ${_kernelname} ]] && replaces+=("${pkgbase}-parabola${_kernelname}") - conflicts=("${pkgbase}${_kernelname}" "${pkgbase}-libre${_kernelname}") - [[ -n ${_kernelname} ]] && conflicts+=("${pkgbase}-parabola${_kernelname}") - provides=("${pkgbase}${_kernelname}=${epoch}:${pkgver}") - replaces+=("${pkgbase}+pctv") - install=kmod.install - - cd "${srcdir}/${pkgbase}-${_pkgver}/drivers" - - make DESTDIR="${pkgdir}" moduledir="/usr/lib/modules/${_extramodules}" install - gzip -9 "${pkgdir}/usr/lib/modules/${_extramodules}"/*.ko - - # 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; }" - -package_lirc-utils-parabola() { - pkgdesc="Linux Infrared Remote Control utilities" - depends=('alsa-lib' 'libx11' 'libftdi-compat' 'libirman') - optdepends=('python2: pronto2lirc utility') - options=('strip') - backup=("etc/${pkgbase}/${pkgbase}_options.conf" "etc/${pkgbase}/${pkgbase}d.conf" "etc/${pkgbase}/${pkgbase}md.conf") - replaces=("${pkgbase}-utils" "${pkgbase}-libre-utils") - conflicts=("${pkgbase}-utils" "${pkgbase}-libre-utils") - provides=("${pkgbase}-utils=${epoch}:${pkgver}") - install=${pkgbase}-utils.install - - cd "${srcdir}/${pkgbase}-${_pkgver}" - - make DESTDIR="${pkgdir}" install - - install -Dm644 "${srcdir}"/irexec.service "${pkgdir}"/usr/lib/systemd/system/irexec.service - install -Dm644 "${srcdir}"/${pkgbase}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgbase}.conf - - cp -rp remotes "${pkgdir}/usr/share/${pkgbase}" - chmod -R go-w "${pkgdir}/usr/share/${pkgbase}/" - - # install the logrotate config - install -Dm644 "${srcdir}/${pkgbase}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgbase}" - - # remove built modules - rm -r "${pkgdir}/usr/lib/modules" -} diff --git a/libre/lirc-parabola/irexec.service b/libre/lirc-parabola/irexec.service deleted file mode 100644 index dffbbf5e0..000000000 --- a/libre/lirc-parabola/irexec.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=LIRC command handler -After=network.target - -[Service] -Type=forking -ExecStart=/usr/bin/irexec --daemon - -[Install] -WantedBy=multi-user.target -Wants=lircd.service diff --git a/libre/lirc-parabola/kmod.install b/libre/lirc-parabola/kmod.install deleted file mode 100644 index 40caa464f..000000000 --- a/libre/lirc-parabola/kmod.install +++ /dev/null @@ -1,14 +0,0 @@ -_EXTRAMODULES= - -post_install() { - echo ">>> Updating module dependencies. Please wait ..." - depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} diff --git a/libre/lirc-parabola/lirc-0.9.1a-fix-segfaults.patch b/libre/lirc-parabola/lirc-0.9.1a-fix-segfaults.patch deleted file mode 100644 index a1f657551..000000000 --- a/libre/lirc-parabola/lirc-0.9.1a-fix-segfaults.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 8459a881fd53525a47ae2f9180fa3644be5df343 Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Mon, 18 Aug 2014 10:00:49 +0200 -Subject: [PATCH 1/3] Fix segfault when starting lircd (AUR 41581) - -See https://bugs.archlinux.org/task/41581 ---- - lirc_options.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lirc_options.conf b/lirc_options.conf -index d8ddedd..11293e2 100644 ---- a/lirc_options.conf -+++ b/lirc_options.conf -@@ -7,7 +7,7 @@ nodaemon = False - permission = 666 - driver = default - device = /dev/lirc0 --output = /var/run/lirc/lircd -+lircdfile = /var/run/lirc/lircd - pidfile = /var/run/lirc/lircd.pid - plugindir = /usr/lib/lirc/plugins - allow-simulate = No --- -2.1.0 - - -From 4a9b45822890f50c5ed36660468e0a99cd4531e0 Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Mon, 18 Aug 2014 10:05:44 +0200 -Subject: [PATCH 2/3] lircd: Fix bad default for lircdfile. - ---- - daemons/lircd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/daemons/lircd.c b/daemons/lircd.c -index db8ea13..fa8cf17 100644 ---- a/daemons/lircd.c -+++ b/daemons/lircd.c -@@ -2147,7 +2147,7 @@ static void lircd_add_defaults(void) - "lircd:device", LIRC_DRIVER_DEVICE, - "lircd:listen", NULL , - "lircd:connect", NULL, -- "lircd:output", LIRCD, -+ "lircd:lircdfile", LIRCD, - "lircd:pidfile", PIDFILE, - "lircd:logfile", LOGFILE, - "lircd:debug", "False", --- -2.1.0 - - -From 02252a9fe76c4a4fd809966971759c66af707f02 Mon Sep 17 00:00:00 2001 -From: Andreas Bader -Date: Tue, 19 Aug 2014 16:58:21 +0200 -Subject: [PATCH 3/3] 0.9.1a: Bugfix: segfault when parsing --connect in config - file. - ---- - daemons/lircd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/daemons/lircd.c b/daemons/lircd.c -index fa8cf17..7af4265 100644 ---- a/daemons/lircd.c -+++ b/daemons/lircd.c -@@ -2311,7 +2311,7 @@ int main(int argc, char **argv) - } - opt = options_getstring("lircd:connect"); - if (opt != NULL) { -- if (!add_peer_connection(optarg)) -+ if (!add_peer_connection(opt)) - return(EXIT_FAILURE); - } - # ifdef DEBUG --- -2.1.0 - diff --git a/libre/lirc-parabola/lirc-utils.install b/libre/lirc-parabola/lirc-utils.install deleted file mode 100644 index f7faa07eb..000000000 --- a/libre/lirc-parabola/lirc-utils.install +++ /dev/null @@ -1,13 +0,0 @@ -post_install() { - systemd-tmpfiles --create lirc.conf -} - -post_upgrade() { - post_install - - if [[ "$(vercmp $2 1:0.9.1-1)" -lt 0 ]]; then - echo ':: lirc.service and lircm.service have been replaced' - echo ' by the upstream unit files lircd.service and' - echo ' lircmd.service.' - fi -} diff --git a/libre/lirc-parabola/lirc.logrotate b/libre/lirc-parabola/lirc.logrotate deleted file mode 100644 index 623c4f328..000000000 --- a/libre/lirc-parabola/lirc.logrotate +++ /dev/null @@ -1,5 +0,0 @@ -/var/log/lircd { - missingok - notifempty - delaycompress -} diff --git a/libre/lirc-parabola/lirc.tmpfiles b/libre/lirc-parabola/lirc.tmpfiles deleted file mode 100644 index 0b80e2e47..000000000 --- a/libre/lirc-parabola/lirc.tmpfiles +++ /dev/null @@ -1 +0,0 @@ -d /run/lirc 0755 root root - diff --git a/libre/lirc-parabola/wpc8769l-build-fix.patch b/libre/lirc-parabola/wpc8769l-build-fix.patch deleted file mode 100644 index 5e25693ab..000000000 --- a/libre/lirc-parabola/wpc8769l-build-fix.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff --git a/drivers/lirc_wpc8769l/lirc_wpc8769l.c b/drivers/lirc_wpc8769l/lirc_wpc8769l.c -index 790efa2..4248fe9 100644 ---- a/drivers/lirc_wpc8769l/lirc_wpc8769l.c -+++ b/drivers/lirc_wpc8769l/lirc_wpc8769l.c -@@ -51,17 +51,13 @@ - #include - - #include -+#include - - #include -+#include - --#include "drivers/kcompat.h" --#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) --#include --#include --#else --#include "drivers/lirc.h" --#include "drivers/lirc_dev/lirc_dev.h" --#endif -+#include "media/lirc_dev.h" -+#include "media/lirc.h" - - #include "lirc_wpc8769l.h" - -@@ -105,11 +101,11 @@ static unsigned int baseport2; - static unsigned int irq; - - /* Debugging flag. */ --static int debug; -+static bool debug; - - /* If true, we skip ACPI autodetection and use the parameter-supplied I/O and - * IRQ. */ --static int skip_probe; -+static bool skip_probe; - - /* Whether the device is open or not. */ - static int lirc_wpc8769l_is_open; -@@ -360,14 +356,14 @@ static irqreturn_t irq_handler(int irqno, void *blah, struct pt_regs *regs) - size = count << 3; - - ldata = (unsigned long *) data_buf; -- next_one = generic_find_next_le_bit(ldata, size, 0); -+ next_one = find_next_bit(ldata, size, 0); - - if (next_one > 0) - put_pulse_bit(next_one - * WPC8769L_USECS_PER_BIT); - - while (next_one < size) { -- next_zero = generic_find_next_zero_le_bit(ldata, -+ next_zero = find_next_zero_bit(ldata, - size, next_one + 1); - - put_space_bit( -@@ -375,7 +371,7 @@ static irqreturn_t irq_handler(int irqno, void *blah, struct pt_regs *regs) - * WPC8769L_USECS_PER_BIT); - - if (next_zero < size) { -- next_one = generic_find_next_le_bit(ldata, -+ next_one = find_next_bit(ldata, - size, next_zero + 1); - - put_pulse_bit( -@@ -922,12 +918,12 @@ static int wpc8769l_acpi_detect(void) - #ifdef MODULE - static struct platform_device *lirc_wpc8769l_platform_dev; - --static int __devinit lirc_wpc8769l_probe(struct platform_device *dev) -+static int lirc_wpc8769l_probe(struct platform_device *dev) - { - return 0; - } - --static int __devexit lirc_wpc8769l_remove(struct platform_device *dev) -+static int lirc_wpc8769l_remove(struct platform_device *dev) - { - return 0; - } -@@ -955,7 +951,7 @@ static int lirc_wpc8769l_resume(struct platform_device *dev) - - static struct platform_driver lirc_wpc8769l_platform_driver = { - .probe = lirc_wpc8769l_probe, -- .remove = __devexit_p(lirc_wpc8769l_remove), -+ .remove = lirc_wpc8769l_remove, - .suspend = lirc_wpc8769l_suspend, - .resume = lirc_wpc8769l_resume, - .driver = { diff --git a/libre/lirc/PKGBUILD b/libre/lirc/PKGBUILD new file mode 100644 index 000000000..ff9c204df --- /dev/null +++ b/libre/lirc/PKGBUILD @@ -0,0 +1,163 @@ +# $Id: PKGBUILD 220120 2014-08-16 22:32:11Z lfleischer $ +# Maintainer (Arch): Paul Mattal +# Maintainer: André Silva +# Contributor: Luke Shumaker +# Contributor: Márcio Silva + +_kernelname= +_basekernel=3.16 +_archrel=3 +_parabolarel=1 + +if [[ ${_kernelname} == "" ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -grsec ]]; then + _basekernel=3.15 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-grsec ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-knock ]]; then + _basekernel=3.10 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -rt ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -pae ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -xen ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +fi + +pkgbase=lirc +_pkgname=${pkgbase}${_kernelname} +if [[ -z ${_kernelname} ]]; then + pkgname=("$_pkgname" "${pkgbase}-utils") +else + pkgname=("$_pkgname") +fi +_pkgver=0.9.1a +[[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver" +pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel} +epoch=1 +_extramodules=extramodules-${_basekernel}${_kernelname} +arch=('i686' 'x86_64' 'mips64el') +url="http://www.$pkgbase.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/${pkgbase}/${pkgbase}-${_pkgver}.tar.bz2" + wpc8769l-build-fix.patch + ${pkgbase}-0.9.1a-fix-segfaults.patch + ${pkgbase}.logrotate + irexec.service + ${pkgbase}.tmpfiles) +md5sums=('1f1fac162ed309dd50f307e96a292957' + '9ec33169b3407f74264062d7679dd269' + 'cd00acf480e82a0bf050032732d0d733' + '3deb02604b37811d41816e9b4385fcc3' + '32df3b9bc859565d6acf5f0e5b747083' + 'febf25c154a7d36f01159e84f26c2d9a') + +prepare() { + cd "${srcdir}/lirc-${_pkgver}" + + patch -Np1 -i "${srcdir}/wpc8769l-build-fix.patch" + patch -Np1 -i "${srcdir}/${pkgbase}-0.9.1a-fix-segfaults.patch" + + sed -i '/AC_PATH_XTRA/d' configure.ac + sed -e 's/@X_CFLAGS@//g' \ + -e 's/@X_LIBS@//g' \ + -e 's/@X_PRE_LIBS@//g' \ + -e 's/@X_EXTRA_LIBS@//g' -i Makefile.am tools/Makefile.am + + libtoolize + autoreconf +} + +build() { + cd "${srcdir}/${pkgbase}-${_pkgver}" + _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + + PYTHON=python2 ./configure --enable-sandboxed --prefix=/usr \ + --with-driver=all --with-kerneldir="/usr/lib/modules/${_kernver}/build/" \ + --with-moduledir="/usr/lib/modules/${_kernver}/kernel/drivers/misc" \ + --sbindir=/usr/bin --with-transmitter + + # Remove drivers already in kernel + sed -e "s:lirc_dev::" -e "s:lirc_bt829::" -e "s:lirc_igorplugusb::" \ + -e "s:lirc_imon::" -e "s:lirc_parallel::" -e "s:lirc_sasem::" \ + -e "s:lirc_serial::" -e "s:lirc_sir::" -e "s:lirc_ttusbir::" \ + -e "s:lirc_atiusb::" -e "s:lirc_i2c::" \ + -i Makefile drivers/Makefile drivers/*/Makefile tools/Makefile + make +} + +package_lirc() { + pkgdesc="Linux Infrared Remote Control kernel modules (built for the linux-libre${_kernelname} kernel package)" + depends=("${pkgbase}-utils" "linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") + replaces=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") + [[ -n ${_kernelname} ]] && replaces+=("${_pkgname}${_kernelname}-parabola") + conflicts=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") + [[ -n ${_kernelname} ]] && conflicts+=("${_pkgname}${_kernelname}-parabola") + replaces+=("${pkgbase}+pctv") + install=kmod.install + + cd "${srcdir}/${pkgbase}-${_pkgver}/drivers" + + make DESTDIR="${pkgdir}" moduledir="/usr/lib/modules/${_extramodules}" install + gzip -9 "${pkgdir}/usr/lib/modules/${_extramodules}"/*.ko + + # 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}" +} + +package_lirc-utils() { + pkgdesc="Linux Infrared Remote Control utilities" + depends=('alsa-lib' 'libx11' 'libftdi-compat' 'libirman') + optdepends=('python2: pronto2lirc utility') + options=('strip') + backup=("etc/${pkgbase}/${pkgbase}_options.conf" "etc/${pkgbase}/${pkgbase}d.conf" "etc/${pkgbase}/${pkgbase}md.conf") + replaces=("${pkgbase}-libre-utils" "${pkgbase}-utils-parabola") + conflicts=("${pkgbase}-libre-utils" "${pkgbase}-utils-parabola") + install=${pkgbase}-utils.install + + cd "${srcdir}/${pkgbase}-${_pkgver}" + + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}"/irexec.service "${pkgdir}"/usr/lib/systemd/system/irexec.service + install -Dm644 "${srcdir}"/${pkgbase}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgbase}.conf + + cp -rp remotes "${pkgdir}/usr/share/${pkgbase}" + chmod -R go-w "${pkgdir}/usr/share/${pkgbase}/" + + # install the logrotate config + install -Dm644 "${srcdir}/${pkgbase}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgbase}" + + # remove built modules + rm -r "${pkgdir}/usr/lib/modules" +} diff --git a/libre/lirc/irexec.service b/libre/lirc/irexec.service new file mode 100644 index 000000000..dffbbf5e0 --- /dev/null +++ b/libre/lirc/irexec.service @@ -0,0 +1,11 @@ +[Unit] +Description=LIRC command handler +After=network.target + +[Service] +Type=forking +ExecStart=/usr/bin/irexec --daemon + +[Install] +WantedBy=multi-user.target +Wants=lircd.service diff --git a/libre/lirc/kmod.install b/libre/lirc/kmod.install new file mode 100644 index 000000000..40caa464f --- /dev/null +++ b/libre/lirc/kmod.install @@ -0,0 +1,14 @@ +_EXTRAMODULES= + +post_install() { + echo ">>> Updating module dependencies. Please wait ..." + depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/libre/lirc/lirc-0.9.1a-fix-segfaults.patch b/libre/lirc/lirc-0.9.1a-fix-segfaults.patch new file mode 100644 index 000000000..a1f657551 --- /dev/null +++ b/libre/lirc/lirc-0.9.1a-fix-segfaults.patch @@ -0,0 +1,79 @@ +From 8459a881fd53525a47ae2f9180fa3644be5df343 Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Mon, 18 Aug 2014 10:00:49 +0200 +Subject: [PATCH 1/3] Fix segfault when starting lircd (AUR 41581) + +See https://bugs.archlinux.org/task/41581 +--- + lirc_options.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lirc_options.conf b/lirc_options.conf +index d8ddedd..11293e2 100644 +--- a/lirc_options.conf ++++ b/lirc_options.conf +@@ -7,7 +7,7 @@ nodaemon = False + permission = 666 + driver = default + device = /dev/lirc0 +-output = /var/run/lirc/lircd ++lircdfile = /var/run/lirc/lircd + pidfile = /var/run/lirc/lircd.pid + plugindir = /usr/lib/lirc/plugins + allow-simulate = No +-- +2.1.0 + + +From 4a9b45822890f50c5ed36660468e0a99cd4531e0 Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Mon, 18 Aug 2014 10:05:44 +0200 +Subject: [PATCH 2/3] lircd: Fix bad default for lircdfile. + +--- + daemons/lircd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/daemons/lircd.c b/daemons/lircd.c +index db8ea13..fa8cf17 100644 +--- a/daemons/lircd.c ++++ b/daemons/lircd.c +@@ -2147,7 +2147,7 @@ static void lircd_add_defaults(void) + "lircd:device", LIRC_DRIVER_DEVICE, + "lircd:listen", NULL , + "lircd:connect", NULL, +- "lircd:output", LIRCD, ++ "lircd:lircdfile", LIRCD, + "lircd:pidfile", PIDFILE, + "lircd:logfile", LOGFILE, + "lircd:debug", "False", +-- +2.1.0 + + +From 02252a9fe76c4a4fd809966971759c66af707f02 Mon Sep 17 00:00:00 2001 +From: Andreas Bader +Date: Tue, 19 Aug 2014 16:58:21 +0200 +Subject: [PATCH 3/3] 0.9.1a: Bugfix: segfault when parsing --connect in config + file. + +--- + daemons/lircd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/daemons/lircd.c b/daemons/lircd.c +index fa8cf17..7af4265 100644 +--- a/daemons/lircd.c ++++ b/daemons/lircd.c +@@ -2311,7 +2311,7 @@ int main(int argc, char **argv) + } + opt = options_getstring("lircd:connect"); + if (opt != NULL) { +- if (!add_peer_connection(optarg)) ++ if (!add_peer_connection(opt)) + return(EXIT_FAILURE); + } + # ifdef DEBUG +-- +2.1.0 + diff --git a/libre/lirc/lirc-utils.install b/libre/lirc/lirc-utils.install new file mode 100644 index 000000000..f7faa07eb --- /dev/null +++ b/libre/lirc/lirc-utils.install @@ -0,0 +1,13 @@ +post_install() { + systemd-tmpfiles --create lirc.conf +} + +post_upgrade() { + post_install + + if [[ "$(vercmp $2 1:0.9.1-1)" -lt 0 ]]; then + echo ':: lirc.service and lircm.service have been replaced' + echo ' by the upstream unit files lircd.service and' + echo ' lircmd.service.' + fi +} diff --git a/libre/lirc/lirc.logrotate b/libre/lirc/lirc.logrotate new file mode 100644 index 000000000..623c4f328 --- /dev/null +++ b/libre/lirc/lirc.logrotate @@ -0,0 +1,5 @@ +/var/log/lircd { + missingok + notifempty + delaycompress +} diff --git a/libre/lirc/lirc.tmpfiles b/libre/lirc/lirc.tmpfiles new file mode 100644 index 000000000..0b80e2e47 --- /dev/null +++ b/libre/lirc/lirc.tmpfiles @@ -0,0 +1 @@ +d /run/lirc 0755 root root - diff --git a/libre/lirc/wpc8769l-build-fix.patch b/libre/lirc/wpc8769l-build-fix.patch new file mode 100644 index 000000000..5e25693ab --- /dev/null +++ b/libre/lirc/wpc8769l-build-fix.patch @@ -0,0 +1,90 @@ +diff --git a/drivers/lirc_wpc8769l/lirc_wpc8769l.c b/drivers/lirc_wpc8769l/lirc_wpc8769l.c +index 790efa2..4248fe9 100644 +--- a/drivers/lirc_wpc8769l/lirc_wpc8769l.c ++++ b/drivers/lirc_wpc8769l/lirc_wpc8769l.c +@@ -51,17 +51,13 @@ + #include + + #include ++#include + + #include ++#include + +-#include "drivers/kcompat.h" +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) +-#include +-#include +-#else +-#include "drivers/lirc.h" +-#include "drivers/lirc_dev/lirc_dev.h" +-#endif ++#include "media/lirc_dev.h" ++#include "media/lirc.h" + + #include "lirc_wpc8769l.h" + +@@ -105,11 +101,11 @@ static unsigned int baseport2; + static unsigned int irq; + + /* Debugging flag. */ +-static int debug; ++static bool debug; + + /* If true, we skip ACPI autodetection and use the parameter-supplied I/O and + * IRQ. */ +-static int skip_probe; ++static bool skip_probe; + + /* Whether the device is open or not. */ + static int lirc_wpc8769l_is_open; +@@ -360,14 +356,14 @@ static irqreturn_t irq_handler(int irqno, void *blah, struct pt_regs *regs) + size = count << 3; + + ldata = (unsigned long *) data_buf; +- next_one = generic_find_next_le_bit(ldata, size, 0); ++ next_one = find_next_bit(ldata, size, 0); + + if (next_one > 0) + put_pulse_bit(next_one + * WPC8769L_USECS_PER_BIT); + + while (next_one < size) { +- next_zero = generic_find_next_zero_le_bit(ldata, ++ next_zero = find_next_zero_bit(ldata, + size, next_one + 1); + + put_space_bit( +@@ -375,7 +371,7 @@ static irqreturn_t irq_handler(int irqno, void *blah, struct pt_regs *regs) + * WPC8769L_USECS_PER_BIT); + + if (next_zero < size) { +- next_one = generic_find_next_le_bit(ldata, ++ next_one = find_next_bit(ldata, + size, next_zero + 1); + + put_pulse_bit( +@@ -922,12 +918,12 @@ static int wpc8769l_acpi_detect(void) + #ifdef MODULE + static struct platform_device *lirc_wpc8769l_platform_dev; + +-static int __devinit lirc_wpc8769l_probe(struct platform_device *dev) ++static int lirc_wpc8769l_probe(struct platform_device *dev) + { + return 0; + } + +-static int __devexit lirc_wpc8769l_remove(struct platform_device *dev) ++static int lirc_wpc8769l_remove(struct platform_device *dev) + { + return 0; + } +@@ -955,7 +951,7 @@ static int lirc_wpc8769l_resume(struct platform_device *dev) + + static struct platform_driver lirc_wpc8769l_platform_driver = { + .probe = lirc_wpc8769l_probe, +- .remove = __devexit_p(lirc_wpc8769l_remove), ++ .remove = lirc_wpc8769l_remove, + .suspend = lirc_wpc8769l_suspend, + .resume = lirc_wpc8769l_resume, + .driver = { diff --git a/libre/tp_smapi-parabola/PKGBUILD b/libre/tp_smapi-parabola/PKGBUILD deleted file mode 100644 index 0a789ecb9..000000000 --- a/libre/tp_smapi-parabola/PKGBUILD +++ /dev/null @@ -1,97 +0,0 @@ -# Maintainer (Arch): Lukas Fleischer -# Contributor (Arch): xduugu -# Contributor (Arch): nh2 -# Contributor (Arch): Steven Davidovitz -# Contributor (Arch): Nick B -# Contributor (Arch): Christof Musik -# Contributor (Arch): Stefan Rupp -# Contributor (Arch): Ignas Anikevicius -# Maintainer: André Silva -# Contributor: Luke Shumaker -# Contributor: Márcio Silva - -_kernelname= -_basekernel=3.16 -_pkgrel=1 - -if [[ ${_kernelname} == "" ]]; then - _basekernel=${_basekernel} - _pkgrel=52.2 -elif [[ ${_kernelname} == -lts ]]; then - _basekernel=3.14 - _pkgrel=29.1 -elif [[ ${_kernelname} == -grsec ]]; then - _basekernel=3.15 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -lts-knock ]]; then - _basekernel=3.10 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -rt ]]; then - _basekernel=3.14 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -pae ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -xen ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -fi - -_pkgname=tp_smapi -pkgname=${_pkgname}${_kernelname}-parabola -pkgver=0.41 -pkgrel=${_pkgrel} -_extramodules=extramodules-${_basekernel}${_kernelname} -pkgdesc="Modules for ThinkPad's SMAPI functionality (built for the linux-libre${_kernelname} kernel package)" -arch=('i686' 'x86_64' 'mips64el') -url='https://github.com/evgeni/tp_smapi' -license=('GPL') - -# Generic (you shouldn't have to modify any of these variables) -_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) -depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") -makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") - -replaces=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") -conflicts=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") -provides=("${_pkgname}${_kernelname}=${pkgver}") - -install='kmod.install' -source=("https://github.com/downloads/evgeni/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") -md5sums=('63c683415c764568f6bf17c7eabe4752') - -build() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" - - sed -ri -e "s/^(KVER\s*:=).*$/\1 ${_kernver}/" \ - -e "s#^(KBASE\s*:=).*\$#\1 /usr/lib/modules/${_kernver}#" Makefile - - make HDAPS=1 -} - -package() { - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" - - # Actually install - make -C "/usr/lib/modules/${_kernver}/build" \ - INSTALL_MOD_PATH="${pkgdir}/usr" \ - M="${srcdir}/${_pkgname}-${pkgver}" modules_install - - cd "${pkgdir}/usr/lib/modules" - mv "${_kernver}/extra" "${_extramodules}" - rmdir "${_kernver}" - - # compress kernel modules - find "${pkgdir}" -name "*.ko" -exec gzip -9 {} + - - # load module on startup - install -dm 755 "${pkgdir}/usr/lib/modules-load.d" - echo ${_pkgname} > "${pkgdir}/usr/lib/modules-load.d/${_pkgname}${_kernelname}.conf" - - # 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}" -} diff --git a/libre/tp_smapi-parabola/kmod.install b/libre/tp_smapi-parabola/kmod.install deleted file mode 100644 index 40caa464f..000000000 --- a/libre/tp_smapi-parabola/kmod.install +++ /dev/null @@ -1,14 +0,0 @@ -_EXTRAMODULES= - -post_install() { - echo ">>> Updating module dependencies. Please wait ..." - depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} diff --git a/libre/tp_smapi/PKGBUILD b/libre/tp_smapi/PKGBUILD new file mode 100644 index 000000000..d14d7c91e --- /dev/null +++ b/libre/tp_smapi/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer (Arch): Lukas Fleischer +# Contributor (Arch): xduugu +# Contributor (Arch): nh2 +# Contributor (Arch): Steven Davidovitz +# Contributor (Arch): Nick B +# Contributor (Arch): Christof Musik +# Contributor (Arch): Stefan Rupp +# Contributor (Arch): Ignas Anikevicius +# Maintainer: André Silva +# Contributor: Luke Shumaker +# Contributor: Márcio Silva + +_kernelname= +_basekernel=3.16 +_parabolarel=1 + +if [[ ${_kernelname} == "" ]]; then + _basekernel=${_basekernel} + _archrel=52 + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts ]]; then + _basekernel=3.14 + _archrel=29 + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -grsec ]]; then + _basekernel=3.15 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-grsec ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-knock ]]; then + _basekernel=3.10 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -rt ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -pae ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -xen ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +fi + +_pkgname=tp_smapi +pkgname=${_pkgname}${_kernelname} +pkgver=0.41 +pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel} +_extramodules=extramodules-${_basekernel}${_kernelname} +pkgdesc="Modules for ThinkPad's SMAPI functionality (built for the linux-libre${_kernelname} kernel package)" +arch=('i686' 'x86_64' 'mips64el') +url='https://github.com/evgeni/tp_smapi' +license=('GPL') + +# Generic (you shouldn't have to modify any of these variables) +_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) +depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") +makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") + +replaces=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") +conflicts=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") + +install='kmod.install' +source=("https://github.com/downloads/evgeni/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") +md5sums=('63c683415c764568f6bf17c7eabe4752') + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + + sed -ri -e "s/^(KVER\s*:=).*$/\1 ${_kernver}/" \ + -e "s#^(KBASE\s*:=).*\$#\1 /usr/lib/modules/${_kernver}#" Makefile + + make HDAPS=1 +} + +package() { + _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + + # Actually install + make -C "/usr/lib/modules/${_kernver}/build" \ + INSTALL_MOD_PATH="${pkgdir}/usr" \ + M="${srcdir}/${_pkgname}-${pkgver}" modules_install + + cd "${pkgdir}/usr/lib/modules" + mv "${_kernver}/extra" "${_extramodules}" + rmdir "${_kernver}" + + # compress kernel modules + find "${pkgdir}" -name "*.ko" -exec gzip -9 {} + + + # load module on startup + install -dm 755 "${pkgdir}/usr/lib/modules-load.d" + echo ${_pkgname} > "${pkgdir}/usr/lib/modules-load.d/${_pkgname}${_kernelname}.conf" + + # 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}" +} diff --git a/libre/tp_smapi/kmod.install b/libre/tp_smapi/kmod.install new file mode 100644 index 000000000..40caa464f --- /dev/null +++ b/libre/tp_smapi/kmod.install @@ -0,0 +1,14 @@ +_EXTRAMODULES= + +post_install() { + echo ">>> Updating module dependencies. Please wait ..." + depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/libre/vhba-module-parabola/60-vhba.rules b/libre/vhba-module-parabola/60-vhba.rules deleted file mode 100644 index 39ae3a4ec..000000000 --- a/libre/vhba-module-parabola/60-vhba.rules +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", KERNEL=="vhba_ctl", NAME="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdemu", TAG+="uaccess" diff --git a/libre/vhba-module-parabola/PKGBUILD b/libre/vhba-module-parabola/PKGBUILD deleted file mode 100644 index 18e863bf6..000000000 --- a/libre/vhba-module-parabola/PKGBUILD +++ /dev/null @@ -1,82 +0,0 @@ -# Maintainer (Arch): Ray Rashif -# Contributor (Arch): Mateusz Herych -# Contributor (Arch): Charles Lindsay -# Maintainer: André Silva -# Contributor: Luke Shumaker -# Contributor: Márcio Silva - -_kernelname= -_basekernel=3.16 -_pkgrel=6.2 - -if [[ ${_kernelname} == "" ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -lts ]]; then - _basekernel=3.14 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -grsec ]]; then - _basekernel=3.15 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -lts-knock ]]; then - _basekernel=3.10 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -rt ]]; then - _basekernel=3.14 - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -pae ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -elif [[ ${_kernelname} == -xen ]]; then - _basekernel=${_basekernel} - _pkgrel=${_pkgrel} -fi - -_pkgname=vhba-module -pkgname=${_pkgname}${_kernelname}-parabola -pkgver=20140629 -pkgrel=${_pkgrel} -_extramodules=extramodules-${_basekernel}${_kernelname} -pkgdesc="Kernel module that emulates SCSI devices (built for the linux-libre${_kernelname} kernel package)" -arch=('i686' 'x86_64' 'mips64el') -url="http://cdemu.sourceforge.net/" -license=('GPL') - -# Generic (you shouldn't have to modify any of these variables) -_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) -depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") -makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") - -replaces=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") -conflicts=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") -provides=("${_pkgname}${_kernelname}=${pkgver}") - -options=(!makeflags) -install='kmod.install' -source=("http://downloads.sourceforge.net/cdemu/$_pkgname-$pkgver.tar.bz2" - '60-vhba.rules') -md5sums=('6b307a80df9c163768cc7ecb3ccebb71' - '4dc37dc348b5a2c83585829bde790dcc') - -build() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" - - make KDIR=/usr/lib/modules/$_kernver/build -} - -package() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - # Actually install - install -Dm644 vhba.ko "$pkgdir/usr/lib/modules/$_extramodules/vhba.ko" - install -Dm644 ../60-vhba.rules "$pkgdir/usr/lib/udev/rules.d/60-vhba.rules" - - # 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}" -} - -# vim:set ts=2 sw=2 et: diff --git a/libre/vhba-module-parabola/kmod.install b/libre/vhba-module-parabola/kmod.install deleted file mode 100644 index 08ecfbfba..000000000 --- a/libre/vhba-module-parabola/kmod.install +++ /dev/null @@ -1,20 +0,0 @@ -_EXTRAMODULES= - -_post_install() { - echo ">>> Updating module dependencies. Please wait ..." - depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 -} - -post_install() { - _post_install - getent group cdemu &>/dev/null || groupadd -r cdemu -} - -post_upgrade() { - post_install -} - -post_remove() { - _post_install - groupdel cdemu -} diff --git a/libre/vhba-module/60-vhba.rules b/libre/vhba-module/60-vhba.rules new file mode 100644 index 000000000..39ae3a4ec --- /dev/null +++ b/libre/vhba-module/60-vhba.rules @@ -0,0 +1 @@ +ACTION=="add", KERNEL=="vhba_ctl", NAME="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdemu", TAG+="uaccess" diff --git a/libre/vhba-module/PKGBUILD b/libre/vhba-module/PKGBUILD new file mode 100644 index 000000000..d14218281 --- /dev/null +++ b/libre/vhba-module/PKGBUILD @@ -0,0 +1,93 @@ +# Maintainer (Arch): Ray Rashif +# Contributor (Arch): Mateusz Herych +# Contributor (Arch): Charles Lindsay +# Maintainer: André Silva +# Contributor: Luke Shumaker +# Contributor: Márcio Silva + +_kernelname= +_basekernel=3.16 +_archrel=6 +_parabolarel=1 + +if [[ ${_kernelname} == "" ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -grsec ]]; then + _basekernel=3.15 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-grsec ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -lts-knock ]]; then + _basekernel=3.10 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -rt ]]; then + _basekernel=3.14 + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -pae ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +elif [[ ${_kernelname} == -xen ]]; then + _basekernel=${_basekernel} + _archrel=${_archrel} + _parabolarel=${_parabolarel} +fi + +_pkgname=vhba-module +pkgname=${_pkgname}${_kernelname} +pkgver=20140629 +pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel} +_extramodules=extramodules-${_basekernel}${_kernelname} +pkgdesc="Kernel module that emulates SCSI devices (built for the linux-libre${_kernelname} kernel package)" +arch=('i686' 'x86_64' 'mips64el') +url="http://cdemu.sourceforge.net/" +license=('GPL') + +# Generic (you shouldn't have to modify any of these variables) +_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1))) +depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}") +makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}") + +replaces=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") +conflicts=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}") + +options=(!makeflags) +install='kmod.install' +source=("http://downloads.sourceforge.net/cdemu/$_pkgname-$pkgver.tar.bz2" + '60-vhba.rules') +md5sums=('6b307a80df9c163768cc7ecb3ccebb71' + '4dc37dc348b5a2c83585829bde790dcc') + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" + + make KDIR=/usr/lib/modules/$_kernver/build +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + # Actually install + install -Dm644 vhba.ko "$pkgdir/usr/lib/modules/$_extramodules/vhba.ko" + install -Dm644 ../60-vhba.rules "$pkgdir/usr/lib/udev/rules.d/60-vhba.rules" + + # 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}" +} + +# vim:set ts=2 sw=2 et: diff --git a/libre/vhba-module/kmod.install b/libre/vhba-module/kmod.install new file mode 100644 index 000000000..08ecfbfba --- /dev/null +++ b/libre/vhba-module/kmod.install @@ -0,0 +1,20 @@ +_EXTRAMODULES= + +_post_install() { + echo ">>> Updating module dependencies. Please wait ..." + depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1 +} + +post_install() { + _post_install + getent group cdemu &>/dev/null || groupadd -r cdemu +} + +post_upgrade() { + post_install +} + +post_remove() { + _post_install + groupdel cdemu +} -- cgit v1.2.3