PKGBUILDs/aur/p910nd/PKGBUILD

47 lines
1.7 KiB
Bash
Raw Normal View History

2015-08-31 00:38:44 +00:00
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Danilo Luvizotto <danilo.luvizotto@gmail.com>
2013-08-13 01:17:55 +00:00
# Contributor: Wieland Hoffmann <the_mineo@web.de>
2010-12-22 01:39:15 +00:00
# Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
pkgname=p910nd
2015-08-31 00:38:44 +00:00
pkgver=0.97
pkgrel=1
2010-12-22 01:39:15 +00:00
pkgdesc="A small printer daemon intended for diskless workstations that passes jobs directly to the printer"
2013-08-13 01:17:55 +00:00
arch=('i686' 'x86_64' 'armv5' 'armv5h' 'armv6' 'armv6h' 'armv7' 'armv7h')
2010-12-22 01:39:15 +00:00
url="http://p910nd.sourceforge.net"
license=('GPL2')
2015-08-31 00:38:44 +00:00
depends=('glibc')
2010-12-22 01:39:15 +00:00
backup=('etc/conf.d/p910nd')
2015-08-31 00:38:44 +00:00
#options=('emptydirs')
2010-12-22 01:39:15 +00:00
source=(http://downloads.sf.net/$pkgname/$pkgname-$pkgver.tar.bz2 \
2013-08-13 01:17:55 +00:00
$pkgname.service \
$pkgname.conf)
2015-08-31 00:38:44 +00:00
md5sums=('69461a6c54dca0b13ecad5b83864b43e'
'e37030a69b7bf302cfb23d88e25ebbdf'
'ea1db6d612058532c525efedd54990f2')
2013-08-13 01:17:55 +00:00
CONFIGDIR=/etc/conf.d
INITSCRIPT=""
SCRIPTDIR=""
2010-12-22 01:39:15 +00:00
build() {
2015-08-31 00:38:44 +00:00
cd "$srcdir/$pkgname-$pkgver"
# TODO: this should be in its own subdir, but needs to be created at boot
sed -i "s|/var/lock/subsys|/run/lock|" $pkgname.c
# modern linux FSH
sed -i 's|sbin|bin|' *
sed -i 's|var/lock|run/lock|' *
sed -i 's|var/run|run|' *
sed -i 's|$(INSTALL) $(INITSCRIPT) $(DESTDIR)$(SCRIPTDIR)/$(PROG)||' Makefile
2013-08-13 01:17:55 +00:00
make CONFIGDIR=$CONFIGDIR INITSCRIPT=$INITSCRIPT SCRIPTDIR=$SCRIPTDIR
2015-08-31 00:38:44 +00:00
sed -i 's|P910ND_OPTS=""|P910ND_OPTS="-f /dev/usb/lp0"|' $pkgname.conf
2013-08-13 01:17:55 +00:00
}
package() {
2015-08-31 00:38:44 +00:00
cd "$srcdir/$pkgname-$pkgver"
make CONFIGDIR=$CONFIGDIR INITSCRIPT=$INITSCRIPT SCRIPTDIR=$SCRIPTDIR DESTDIR="$pkgdir" install
#install -dm755 "$pkgdir/run/lock/$pkgname"
install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 "$srcdir/$pkgname.conf" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
2010-12-22 01:39:15 +00:00
}
2013-08-13 01:17:55 +00:00