# vim: set syn=sh: # Packager: Phill Watkins pkgname=lirc pkgver=0.9.0 pkgrel=$(uname -r | tr - .).1pw #arch=noarch source=("http://downloads.sourceforge.net/project/lirc/LIRC/$pkgver/lirc-$pkgver.tar.bz2") sourcetemplate=http://people.salixos.org/pwatk/packages/13.37/a/$pkgname docs=("ANNOUNCE" "AUTHORS" "ChangeLog" "COPYING" "INSTALL" "NEWS" "README" "TODO" "irxevent.keys" "lirc.hwdb") url=http://www.lirc.org/ dotnew=('etc/lircd.conf' 'etc/lircmd.conf' 'etc/lircrc' 'etc/logrotate.d/lircd') option=('noautodotnew') doinst() { if [ -x sbin/depmod ]; then sbin/depmod -a $(uname -r) > /dev/null 2>&1 fi udevadm control --reload-rules udevadm trigger --action=change } slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "lirc (Linux Infrared Remote Control)" "LIRC is a package that allows you to decode and send infra-red signals" "of many (but not all) commonly used remote controls. " ) build() { set -e cd $startdir/src/$pkgname-$pkgver ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --infodir=/usr/info \ --docdir=/usr/doc/$pkgname-$pkgver \ --build=$arch-slackware-linux \ --disable-static \ --enable-sandboxed \ --with-driver=all \ --with-transmitter # Don't duplicate drivers distributed with the kernel kermods=$(find /lib/modules/$(uname -r)/kernel/drivers -name lirc_*.ko | awk -F/ '{gsub(/.ko$/,"");print $NF}') for mod in $kermods; do sed "s/$mod//" -i Makefile drivers/Makefile drivers/*/Makefile tools/Makefile done make -j $numjobs make install DESTDIR=$startdir/pkg # html docs install -d $startdir/pkg/usr/doc/$pkgname-$pkgver/html install -m 0644 $startdir/src/$pkgname-$pkgver/doc/html/* $startdir/pkg/usr/doc/$pkgname-$pkgver/html # remote control config files install -d $startdir/pkg/usr/share/lirc cp -a remotes $startdir/pkg/usr/share/lirc/ # udev rules install -Dm 0644 contrib/lirc.rules $startdir/pkg/etc/udev/rules.d/85-lirc.rules # lirc config files install -m 0644 contrib/{lircd.conf,lircmd.conf,lircrc} $startdir/pkg/etc/ # logrotate config file install -d $startdir/pkg/etc/logrotate.d cat <<- EOF > $startdir/pkg/etc/logrotate.d/lircd /var/log/lircd { compress rotate 1 size=+1024k notifempty missingok copytruncate noolddir } EOF chmod 644 $startdir/pkg/etc/logrotate.d/lircd # pid directory install -d $startdir/pkg/var/run/lirc set +e }