summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBalló György2023-12-27 06:21:17 +0100
committerBalló György2023-12-27 06:21:17 +0100
commit42a83b2f63c0bb557e8843d8136ecdd8e38740c9 (patch)
treeed49c78b8f78c72ef4a818bca1341a1575f19b6b /PKGBUILD
parent173ee2f11e142431e6a2d8adf569bcb8d8f2d68f (diff)
downloadaur-p910nd.tar.gz
Simplify build
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD46
1 files changed, 20 insertions, 26 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9e1318380a54..a1c0197a4b2a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,37 @@
-# Maintainer: Kyle Keen <keenerd@gmail.com>
+# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: Danilo Luvizotto <danilo.luvizotto@gmail.com>
# Contributor: Wieland Hoffmann <the_mineo@web.de>
# Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
+
pkgname=p910nd
pkgver=0.97
pkgrel=1
-pkgdesc="A small printer daemon intended for diskless workstations that passes jobs directly to the printer"
-arch=('i686' 'x86_64' 'armv5' 'armv5h' 'armv6' 'armv6h' 'armv7' 'armv7h')
-url="https://github.com/kenyapcomau/p910nd/"
+pkgdesc='Small printer daemon intended for diskless workstations that passes jobs directly to the printer'
+arch=('x86_64')
+url='https://github.com/kenyapcomau/p910nd'
license=('GPL2')
depends=('glibc')
backup=('etc/conf.d/p910nd')
-#options=('emptydirs')
-source=(https://github.com/kenyapcomau/p910nd/archive/$pkgver/$pkgname-$pkgver.tar.gz \
- $pkgname.service \
- $pkgname.conf)
+source=("https://github.com/kenyapcomau/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz"
+ "$pkgname.service")
sha256sums=('a1bcc2dd75bad4e00a9de5098dbd970e8380f978fc09292bcfa15852af6a6964'
- '63ff1acd6908b2c5437ec53a959e24089366dc0e27430321862dfc77e1b3f891'
- 'c62fdc7cfdea0411ebcbc2f879fb860477bf9883b8f673c7a8ca1440544fd1c4')
+ '63ff1acd6908b2c5437ec53a959e24089366dc0e27430321862dfc77e1b3f891')
+
+prepare() {
+ cd $pkgname-$pkgver
+ sed -i 's|/var/run|/run|
+ s|/var/lock/subsys|/run/lock|' p910nd.c
+ sed -i '/INITSCRIPT/d' Makefile
+}
build() {
- 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|' Makefile $pkgname.*
- sed -i 's|var/lock|run/lock|' Makefile $pkgname.*
- sed -i 's|var/run|run|' Makefile $pkgname.*
- sed -i 's|$(INSTALL) $(INITSCRIPT) $(DESTDIR)$(SCRIPTDIR)/$(PROG)||' Makefile
- sed -i 's| $(CFLAGS)| $(CFLAGS) $(LDFLAGS)|' Makefile
- sed -i 's|P910ND_OPTS=""|P910ND_OPTS="-f /dev/usb/lp0"|' $pkgname.conf
- make
+ cd $pkgname-$pkgver
+ make LIBS="$LDFLAGS"
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
- make CONFIG='aux/p910nd.conf' CONFIGDIR='/etc/conf.d' 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"
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" BINDIR='/usr/bin' CONFIG='aux/p910nd.conf' CONFIGDIR='/etc/conf.d' SCRIPTDIR='' install
+ install -Dm644 ../$pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}