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:
Lukas Fleischer 2011-08-29 10:53:50 +02:00
parent 142b032212
commit 46c4def073
15 changed files with 22 additions and 3 deletions

13
.gitignore vendored
View File

@ -1,2 +1,15 @@
*~
devtools-*.tar.gz
archbuild
archco
archrelease
archrm
bash_completion
checkpkg
commitpkg
finddeps
lddd
makechrootpkg
mkarchroot
rebuildpkgs
zsh_completion

View File

@ -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

4
archbuild → archbuild.in Executable file → Normal file
View File

@ -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

0
archco → archco.in Executable file → Normal file
View File

0
archrelease → archrelease.in Executable file → Normal file
View File

0
archrm → archrm.in Executable file → Normal file
View File

0
checkpkg → checkpkg.in Executable file → Normal file
View File

0
commitpkg → commitpkg.in Executable file → Normal file
View File

0
finddeps → finddeps.in Executable file → Normal file
View File

0
lddd → lddd.in Executable file → Normal file
View File

0
makechrootpkg → makechrootpkg.in Executable file → Normal file
View File

0
mkarchroot → mkarchroot.in Executable file → Normal file
View File

0
rebuildpkgs → rebuildpkgs.in Executable file → Normal file
View File