Commit 46c4def0 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Support non-standard install locations



This build system overhaul allows for adding (define-style) macros to
our scripts. All source files are now suffixed with ".in" to clarify
that they might contain unprocessed defines. The Makefile provides a new
rule to preprocess source files and generate proper output scripts.

Also, add a "@pkgdatadir@" define (as used in GNU Autotools) and use it
instead of hardcoded paths to "/usr/share/devtools" everywhere. We
missed this when adding PREFIX support to the build system in commit
35fc83ce.

Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 142b0322
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
*~
devtools-*.tar.gz
archbuild
archco
archrelease
archrm
bash_completion
checkpkg
commitpkg
finddeps
lddd
makechrootpkg
mkarchroot
rebuildpkgs
zsh_completion
+7 −1
Original line number Diff line number Diff line
@@ -47,7 +47,13 @@ ARCHBUILD_LINKS = \
	multilib-build \
	multilib-testing-build

all:
all: $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion

%: %.in
	@echo "GEN $@"
	@sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g" "$<" >"$@"
	@chmod a-w "$@"
	@chmod +x "$@"

install:
	install -dm0755 $(DESTDIR)$(PREFIX)/bin

archbuildarchbuild.in

100755 → 100644
+2 −2
Original line number Diff line number Diff line
@@ -54,8 +54,8 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
	rm -rf "${chroots}/${repo}-${arch}"
	mkdir -p "${chroots}/${repo}-${arch}"
	setarch "${arch}" mkarchroot \
		-C "/usr/share/devtools/pacman-${repo}.conf" \
		-M "/usr/share/devtools/makepkg-${arch}.conf" \
		-C "@pkgdatadir@/pacman-${repo}.conf" \
		-M "@pkgdatadir@/makepkg-${arch}.conf" \
		"${chroots}/${repo}-${arch}/root" \
		"${base_packages[@]}"
else

archcoarchco.in

100755 → 100644
+0 −0

File moved.File mode changed from 100755 to 100644.

archreleasearchrelease.in

100755 → 100644
+0 −0

File moved.File mode changed from 100755 to 100644.

Loading