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
35fc83ce7d
.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
142b032212
commit
46c4def073
|
@ -1,2 +1,15 @@
|
|||
*~
|
||||
devtools-*.tar.gz
|
||||
archbuild
|
||||
archco
|
||||
archrelease
|
||||
archrm
|
||||
bash_completion
|
||||
checkpkg
|
||||
commitpkg
|
||||
finddeps
|
||||
lddd
|
||||
makechrootpkg
|
||||
mkarchroot
|
||||
rebuildpkgs
|
||||
zsh_completion
|
||||
|
|
8
Makefile
8
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue