summaryrefslogtreecommitdiff
path: root/src/xbs-abs/Makefile
blob: 907b3d08a5bf6d658b3c058a4cdc8d37d5ed1656 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk

libretools.pkg = xbs
pkgconfdir = $(sysconfdir)/xbs
pkglibexecdir = $(libexecdir)/xbs

_helpers                 = archrelease commitpkg

libretools.pots         += $(_helpers)
libretools.src.devtools += $(addsuffix .in,$(_helpers)) valid-tags.sh

libretools.out.bins      =
libretools.out.libexecs  = helper-abs
libretools.out.libs      = valid-tags.sh

files.out.xbs           += $(_helpers)
files.sys.xbs           += $(addprefix $(pkglibexecdir)/helper-abs.d/,$(_helpers))

$(outdir)/commitpkg: $(srcdir)/commitpkg.in
	@echo "OUT $@"
	@{ \
		echo '#!/usr/bin/env bash'; \
		echo '. "$$(librelib common)"'; \
		echo '. ./PKGBUILD'; \
		echo 'repo=$$1; arch=$$2;'; \
		sed -n "/== 'any'/,\$$p" $<; \
	} | install -Dm755 /dev/stdin $@

$(DESTDIR)$(pkglibexecdir)/helper-abs.d/%: $(srcdir)/%
	install -Dm755 '$<' '$@'

include $(topsrcdir)/build-aux/Makefile.tail.mk