From 12672fc7bc0f429162248d7848455ff7387a8a33 Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Mon, 26 Sep 2022 00:08:23 +0300 Subject: [PATCH] New package: superd-0.7 --- .../patches/ignore-binaries-on-install.diff | 18 +++++++++++++++ srcpkgs/superd/template | 23 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 srcpkgs/superd/patches/ignore-binaries-on-install.diff create mode 100644 srcpkgs/superd/template diff --git a/srcpkgs/superd/patches/ignore-binaries-on-install.diff b/srcpkgs/superd/patches/ignore-binaries-on-install.diff new file mode 100644 index 000000000000..47b69733cf11 --- /dev/null +++ b/srcpkgs/superd/patches/ignore-binaries-on-install.diff @@ -0,0 +1,18 @@ +Let xbps-src handle (cross)building super{d,ctl} binaries properly with the go build-style. + +--- a/Makefile ++++ b/Makefile +@@ -58,12 +58,10 @@ doc: $(DOCS) + clean: + $(RM) $(DOCS) superd superctl + +-install: $(DOCS) superd superctl ++install: $(DOCS) + mkdir -m755 -p \ + $(DESTDIR)$(SYSCONFDIR)/superd/services \ + $(DESTDIR)$(SHAREDIR)/superd/services +- install -Dm755 superd -t $(DESTDIR)$(BINDIR)/ +- install -Dm755 superctl -t $(DESTDIR)$(BINDIR)/ + install -Dm644 superd.1 -t $(DESTDIR)$(MANDIR)/man1/ + install -Dm644 superd.service.5 -t $(DESTDIR)$(MANDIR)/man5/ + install -Dm644 superctl.1 -t $(DESTDIR)$(MANDIR)/man1/ diff --git a/srcpkgs/superd/template b/srcpkgs/superd/template new file mode 100644 index 000000000000..ec9b94dc6186 --- /dev/null +++ b/srcpkgs/superd/template @@ -0,0 +1,23 @@ +# Template file for 'superd' +pkgname=superd +version=0.7 +revision=1 +build_style=go +go_import_path="sr.ht/~craftyguy/superd" +go_package="${go_import_path}/cmd/superd ${go_import_path}/cmd/superctl" +go_ldflags="-X 'main.Version=${version}'" +hostmakedepends="scdoc" +short_desc="Lightweight user service supervising daemon" +maintainer="Jami Kettunen " +license="GPL-3.0-or-later" +homepage="https://sr.ht/~craftyguy/superd/" +distfiles="https://git.sr.ht/~craftyguy/superd/archive/${version}.tar.gz" +checksum=7563647dd5303752237e1b8453c770dd83c908a239da73f48b11e2151109586b + +do_check() { + go test ./... +} + +post_install() { + make PREFIX=/usr DESTDIR=${DESTDIR} install +}