From a6f65ed444b5a7a749e8ba5173d083b487e6fab9 Mon Sep 17 00:00:00 2001 From: Ryan M Date: Thu, 31 Dec 2020 00:10:06 +0000 Subject: [PATCH] New package: xcwd-1.0 --- srcpkgs/xcwd/template | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 srcpkgs/xcwd/template diff --git a/srcpkgs/xcwd/template b/srcpkgs/xcwd/template new file mode 100644 index 00000000000..26a2e5b3f82 --- /dev/null +++ b/srcpkgs/xcwd/template @@ -0,0 +1,32 @@ +# Template file for 'xcwd' +pkgname=xcwd +version=1.0 +revision=1 +build_style=gnu-makefile +make_use_env=yes +make_install_args="prefix=\${DESTDIR}/usr" +makedepends="libX11-devel" +short_desc="Print the current working directory of the currently focused window" +maintainer="Ryan M " +license="BSD-3-Clause" +homepage="https://github.com/schischi/xcwd" +distfiles="https://github.com/schischi/xcwd/archive/v${version}.tar.gz" +checksum=2f43935ccec750abb782d21363b9e999538d901d4c451ab204097c78acd2316f + +pre_build() { + # Makefile: respect environment vars, lets us set make_use_env above + sed -i 's/^CC=/CC?=/' Makefile + sed -i 's/^CFLAGS=/CFLAGS+=/' Makefile + sed -i 's/^LDFLAGS=/LDFLAGS+=/' Makefile +} + +pre_install() { + # Makefile doesn't do this step, so if the directory $DESTDIR/usr/bin + # doesn't exist (it doesn't), the xcwd executable will be placed in /usr + # as a file called bin. + mkdir -p "${DESTDIR}/usr/bin" +} + +post_install() { + vlicense LICENSE +}