From 3ec8cd56c1d1a90c9a548b9c3a850c0f0fe1441f Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sun, 14 Jan 2018 09:20:52 -0200 Subject: [PATCH] New package: lok-6.2. --- srcpkgs/lok/template | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 srcpkgs/lok/template diff --git a/srcpkgs/lok/template b/srcpkgs/lok/template new file mode 100644 index 00000000000..9ceec331e63 --- /dev/null +++ b/srcpkgs/lok/template @@ -0,0 +1,32 @@ +# Template file for 'lok' +pkgname=lok +version=6.2 +revision=1 +build_style=gnu-makefile +short_desc="A Linux port of OpenBSD's awk" +maintainer="maxice8 " +license="ISC" +homepage="https://github.com/dimkr/lok" +distfiles="https://github.com/dimkr/lok/archive/${version}.tar.gz" +checksum=17215d1ef5760e282562bd852abab5ac5ae136fe579c02bb8fb6f9734e2c3185 +make_build_args="PROG=lok" # Make the binary built be called lok +make_install_args="PROG=lok MANDIR=usr/share/man" + +provides="awk-0_1" +alternatives=" + awk:awk:/usr/bin/lok + awk:awk.1:/usr/share/man/man1/lok.1" + +pre_build() { + sed -i 's|^PROG=.*||g' Makefile # PROG variable is hard-defined + sed -i 's|^MANDIR=.*||g' Makefile # MANDIR variable is set wrong and hard-defined +} + +pre_install() { + mv "${wrksrc}"/{awk,lok}.1 # rename the manpage to lok +} + +post_install() { + sed -n 3,23p README.upstream > LICENSE + vlicense LICENSE +}