initial import
This commit is contained in:
99
lirc/PKGBUILD
Normal file
99
lirc/PKGBUILD
Normal file
@@ -0,0 +1,99 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=lirc
|
||||
pkgver=0.10.1
|
||||
_debver=0.10.1
|
||||
_debrel=6.3
|
||||
pkgrel=2
|
||||
epoch=1
|
||||
pkgdesc='Linux Infrared Remote Control utilities'
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://www.lirc.org/"
|
||||
license=('GPL-2')
|
||||
depends=('alsa-lib' 'libx11' 'libftdi' 'libusb-compat')
|
||||
makedepends=('help2man' 'alsa-lib' 'libx11' 'libxslt' 'python' 'python-setuptools' 'quilt')
|
||||
optdepends=('python: for lirc-setup, irdb-get and pronto2lirc')
|
||||
provides=('lirc-utils')
|
||||
conflicts=('lirc-utils')
|
||||
replaces=('lirc-utils')
|
||||
backup=('etc/lirc/lirc_options.conf' 'etc/lirc/lircd.conf' 'etc/lirc/lircmd.conf')
|
||||
source=("https://prdownloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
|
||||
"https://deb.debian.org/debian/pool/main/l/lirc/lirc_$_debver-$_debrel.debian.tar.xz"
|
||||
lirc.logrotate
|
||||
lircd.confd
|
||||
irexec.confd
|
||||
lircd.initd
|
||||
irexec.initd
|
||||
lircmd.initd
|
||||
lircd.conf
|
||||
lircd.run
|
||||
irexec.conf
|
||||
irexec.run
|
||||
lircmd.run)
|
||||
sha512sums=('31c0b6ee169b302b99994a2a3fa0ebcae0e01cb83c02fe02acf1de5ba8cf77a091a0221c7d8104448c30930adafe654cd08afb7d0df6b5b7ec2d47df26e5df9d'
|
||||
'9dad10a2e3628b066ce07cfdb5a945cf5be6f8ab3908f3db235d6ff0c502c43eeacbd89ecd484983c3bfce06f2f63dcdf82248d9e8d854e6c0c102dd0875c015'
|
||||
'1a6f31df677c27fde6bebe2b4f1eec44bf4ee4ef0cd69d870c661fe1880e48b9fb0fc812fec6c99a7bb92fca8969e0a8170f9fd5dcff1ff1cf0bfa48170dc1a1'
|
||||
'1fb1778f4cc72fc9c11b13a704b3abe80bcce5b3770b69b6b6bea8571e5293adad8c6968779b812e611b67734462c9a577cc71c6b16da3a5bfe31b8007300a62'
|
||||
'2b33e1044086d11fd6e1f9a204ce925182a3a2b92ef4399610e01702f9c2c8fbc87cae52961123297171eef3d40468ac17437b4281b26a5f3b256c9cebc612ac'
|
||||
'482fccd204671f6258822029b9eb9a1e22abf02e382b3814f924f171fd1168d46560f52a90727f3de60c27a78158173a4e0c3e848d45e489471c27851c907c05'
|
||||
'2d06c0bedbd2af9120caa54c049815a2bd920054afbcbd6b0bc1a48dab479527aea5e4fc7065428742f8d46032476ee37fb075669e93e16b2df5bfb8b572f86a'
|
||||
'2f4aae24982a51c54fa59ddd8a48190c11f86ac67fc25bbb599f750be5b91e457c2f779e915943803bde2ec3e5e8988f3c0ffb9d1ea4a08c2e7f05cd3e8b75a5'
|
||||
'1fb1778f4cc72fc9c11b13a704b3abe80bcce5b3770b69b6b6bea8571e5293adad8c6968779b812e611b67734462c9a577cc71c6b16da3a5bfe31b8007300a62'
|
||||
'ae2ebcbdc957067ae142c193f7e47402fb23e78b25495bab23e052f67d19d9d104d7ac40360e2e56914b99b54205704410a113e36c53c609aff1f5b3a8704e18'
|
||||
'2b33e1044086d11fd6e1f9a204ce925182a3a2b92ef4399610e01702f9c2c8fbc87cae52961123297171eef3d40468ac17437b4281b26a5f3b256c9cebc612ac'
|
||||
'9eef38ca376dc06dc35e0216b5566f72d137ef1e3457cc5a3659e4bf5b0fdb77f2b5b93e8e82ef935847b2d5472c7fbc1cc7b8bcf12d2cf8fb824556a9d8cdd5'
|
||||
'0713cd6fa80fafbd297bf4f210543a46e61b5955e2e4aadd8d66cb9976b44e521bcd463152dd4e793f2d6a1b06a05a62eb4f5994b84f47aea362a9c3ecd497d6')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
# Doesn't apply and seems unimportant
|
||||
rm -v debian/patches/0005-systemd-support-Notify-systemd-on-successful-startup.patch || true
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
|
||||
autoreconf -fi
|
||||
automake -ac
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
HAVE_UINPUT=1 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --without-systemdsystemunitdir
|
||||
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
make DESTDIR="${pkgdir}" -j1 install
|
||||
|
||||
install -Dm644 "${srcdir}"/lirc.logrotate "${pkgdir}"/etc/logrotate.d/lirc
|
||||
|
||||
for f in lircd irexec; do
|
||||
install -Dm644 "${srcdir}"/$f.confd "${pkgdir}"/etc/conf.d/$f
|
||||
install -Dm755 "${srcdir}"/$f.initd "${pkgdir}"/etc/init.d/$f
|
||||
sed -i 's|/var/run|/run|g' "${pkgdir}"/etc/init.d/$f
|
||||
done
|
||||
install -Dm755 "${srcdir}"/lircmd.initd "${pkgdir}"/etc/init.d/lircmd
|
||||
sed -i 's|/var/run|/run|g' "${pkgdir}"/etc/init.d/lircmd
|
||||
|
||||
install -Dm 755 "$srcdir/lircd.run" "$pkgdir/etc/sv/lircd/run"
|
||||
install -Dm 755 "$srcdir/irexec.run" "$pkgdir/etc/sv/irexec/run"
|
||||
install -Dm 755 "$srcdir/lircmd.run" "$pkgdir/etc/sv/lircmd/run"
|
||||
install -Dm 644 "$srcdir/lircd.conf" "$pkgdir/etc/sv/lircd/conf"
|
||||
install -Dm 644 "$srcdir/irexec.conf" "$pkgdir/etc/sv/irexec/conf"
|
||||
|
||||
install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/$pkgname"
|
||||
rmdir "${pkgdir}"/var/{run/lirc/,run/}
|
||||
}
|
||||
9
lirc/irexec.conf
Normal file
9
lirc/irexec.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
# Options to pass to the irexec process
|
||||
IREXEC_OPTS="/etc/lircrc"
|
||||
|
||||
# User to execute irexec as.
|
||||
# Warning: Running irexec as root can open security holes
|
||||
#IREXEC_USER="root"
|
||||
|
||||
# Use this to disable the warning printed when starting irexec as root
|
||||
# IREXEC_DISABLE_ROOT_WARNING=yes
|
||||
9
lirc/irexec.confd
Normal file
9
lirc/irexec.confd
Normal file
@@ -0,0 +1,9 @@
|
||||
# Options to pass to the irexec process
|
||||
IREXEC_OPTS="/etc/lircrc"
|
||||
|
||||
# User to execute irexec as.
|
||||
# Warning: Running irexec as root can open security holes
|
||||
#IREXEC_USER="root"
|
||||
|
||||
# Use this to disable the warning printed when starting irexec as root
|
||||
# IREXEC_DISABLE_ROOT_WARNING=yes
|
||||
27
lirc/irexec.initd
Normal file
27
lirc/irexec.initd
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2003 Martin Hierling <mad@cc.fh-lippe.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
: ${IREXEC_USER:=root}
|
||||
|
||||
depend() {
|
||||
need lirc
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then
|
||||
ewarn "Warning: Running irexec as root can open security holes"
|
||||
fi
|
||||
|
||||
ebegin "Starting irexec"
|
||||
start-stop-daemon --start --chuid ${IREXEC_USER} --user ${IREXEC_USER} --chdir / \
|
||||
--exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS}
|
||||
eend $? "Failed to start irexec."
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping irexec"
|
||||
start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER}
|
||||
eend $? "Failed to stop irexec."
|
||||
}
|
||||
|
||||
3
lirc/irexec.run
Normal file
3
lirc/irexec.run
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
[ -r conf ] && . ./conf
|
||||
exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS} 2>&1
|
||||
5
lirc/lirc.logrotate
Normal file
5
lirc/lirc.logrotate
Normal file
@@ -0,0 +1,5 @@
|
||||
/var/log/lircd {
|
||||
missingok
|
||||
notifempty
|
||||
delaycompress
|
||||
}
|
||||
22
lirc/lircd.conf
Normal file
22
lirc/lircd.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
# Options to pass to the lircd process
|
||||
|
||||
# for devices with lirc-kernel-module
|
||||
#LIRCD_OPTS="-d /dev/lirc0"
|
||||
#LIRCD_OPTS="-d /dev/lirc"
|
||||
|
||||
# for devices using the input-layer
|
||||
#LIRCD_OPTS="-H devinput -d /dev/input/by-path/pci-0000:00:0a.0--event-ir"
|
||||
# This should work, Bug #235107
|
||||
#LIRCD_OPTS="-H devinput -d name=*DVB*"
|
||||
|
||||
# set default protocol to 'lirc' for in-kernel IR decoding
|
||||
# for the following entries in /sys/class/rc/
|
||||
# (space-separated list if there is more than one)
|
||||
LIRCD_SET_SYSCLASSRCS="rc0"
|
||||
|
||||
# If running mulitple instances of lircd, the following
|
||||
# can be used to override the default socket path and
|
||||
# socket symlink
|
||||
#LIRCD_SOCKET="/var/run/lirc/lircd"
|
||||
#LIRCD_SYMLINKFILE="/dev/lircd"
|
||||
|
||||
22
lirc/lircd.confd
Normal file
22
lirc/lircd.confd
Normal file
@@ -0,0 +1,22 @@
|
||||
# Options to pass to the lircd process
|
||||
|
||||
# for devices with lirc-kernel-module
|
||||
#LIRCD_OPTS="-d /dev/lirc0"
|
||||
#LIRCD_OPTS="-d /dev/lirc"
|
||||
|
||||
# for devices using the input-layer
|
||||
#LIRCD_OPTS="-H devinput -d /dev/input/by-path/pci-0000:00:0a.0--event-ir"
|
||||
# This should work, Bug #235107
|
||||
#LIRCD_OPTS="-H devinput -d name=*DVB*"
|
||||
|
||||
# set default protocol to 'lirc' for in-kernel IR decoding
|
||||
# for the following entries in /sys/class/rc/
|
||||
# (space-separated list if there is more than one)
|
||||
LIRCD_SET_SYSCLASSRCS="rc0"
|
||||
|
||||
# If running mulitple instances of lircd, the following
|
||||
# can be used to override the default socket path and
|
||||
# socket symlink
|
||||
#LIRCD_SOCKET="/var/run/lirc/lircd"
|
||||
#LIRCD_SYMLINKFILE="/dev/lircd"
|
||||
|
||||
51
lirc/lircd.initd
Normal file
51
lirc/lircd.initd
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
PIDFILE=/var/run/lirc/${SVCNAME}.pid
|
||||
: ${LIRCD_SYMLINKFILE:=/dev/lircd}
|
||||
: ${LIRCD_SOCKET:=/var/run/lirc/lircd}
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
use modules
|
||||
provide lirc
|
||||
}
|
||||
|
||||
start() {
|
||||
local retval
|
||||
|
||||
ebegin "Starting lircd"
|
||||
|
||||
for retval in ${LIRCD_SET_SYSCLASSRCS} ; do
|
||||
if [ -e /sys/class/rc/${retval}/protocols ] && \
|
||||
grep -qs 'lirc' /sys/class/rc/${retval}/protocols ; then
|
||||
einfo "Setting lirc protocol active for ${retval}"
|
||||
echo lirc >/sys/class/rc/${retval}/protocols
|
||||
fi
|
||||
done
|
||||
|
||||
checkpath -q -d -m 0755 -o root:root /var/run/lirc
|
||||
rm -Rf ${LIRCD_SOCKET} && ln -s ${LIRCD_SOCKET} ${LIRCD_SYMLINKFILE}
|
||||
if [ $? -ne 0 ]; then
|
||||
eend $? "Unable to create symbolic link ${LIRCD_SYMLINKFILE}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd -- \
|
||||
-P "${PIDFILE}" ${LIRCD_OPTS}
|
||||
retval=$?
|
||||
|
||||
if [ ${retval} -ne 0 ]; then
|
||||
rm -Rf ${LIRCD_SOCKET}
|
||||
fi
|
||||
|
||||
eend ${retval}
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping lircd"
|
||||
rm -f ${LIRCD_SYMLINKFILE}
|
||||
start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd
|
||||
eend $?
|
||||
}
|
||||
3
lirc/lircd.run
Normal file
3
lirc/lircd.run
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
[ -r conf ] && . ./conf
|
||||
exec /usr/sbin/lircd ${LIRCD_OPTS} 2>&1
|
||||
19
lirc/lircmd.initd
Normal file
19
lirc/lircmd.initd
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
depend() {
|
||||
need lircd
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting lircmd"
|
||||
start-stop-daemon --start --quiet --exec /usr/sbin/lircmd
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping lircmd"
|
||||
start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
|
||||
eend $?
|
||||
}
|
||||
2
lirc/lircmd.run
Normal file
2
lirc/lircmd.run
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /usr/sbin/lircmd 2>&1
|
||||
Reference in New Issue
Block a user