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 35fc83ce7d8dc26cd424321f2e8638d05da0a6d4. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- .gitignore | 12 ++++++++++++ Makefile | 8 +++++++- archbuild => archbuild.in | 4 ++-- archco => archco.in | 0 archrelease => archrelease.in | 0 archrm => archrm.in | 0 bash_completion => bash_completion.in | 0 checkpkg => checkpkg.in | 0 commitpkg => commitpkg.in | 0 finddeps => finddeps.in | 0 lddd => lddd.in | 0 makechrootpkg => makechrootpkg.in | 0 mkarchroot => mkarchroot.in | 0 rebuildpkgs => rebuildpkgs.in | 0 zsh_completion => zsh_completion.in | 0 15 files changed, 21 insertions(+), 3 deletions(-) rename archbuild => archbuild.in (93%) mode change 100755 => 100644 rename archco => archco.in (100%) mode change 100755 => 100644 rename archrelease => archrelease.in (100%) mode change 100755 => 100644 rename archrm => archrm.in (100%) mode change 100755 => 100644 rename bash_completion => bash_completion.in (100%) rename checkpkg => checkpkg.in (100%) mode change 100755 => 100644 rename commitpkg => commitpkg.in (100%) mode change 100755 => 100644 rename finddeps => finddeps.in (100%) mode change 100755 => 100644 rename lddd => lddd.in (100%) mode change 100755 => 100644 rename makechrootpkg => makechrootpkg.in (100%) mode change 100755 => 100644 rename mkarchroot => mkarchroot.in (100%) mode change 100755 => 100644 rename rebuildpkgs => rebuildpkgs.in (100%) mode change 100755 => 100644 rename zsh_completion => zsh_completion.in (100%) diff --git a/.gitignore b/.gitignore index d823845..5649c00 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,14 @@ *~ devtools-*.tar.gz +archbuild +archco +archrelease +archrm +bash_completion +commitpkg +finddeps +lddd +makechrootpkg +mkarchroot +rebuildpkgs +zsh_completion diff --git a/Makefile b/Makefile index 6f7a238..47378ff 100644 --- a/Makefile +++ b/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 diff --git a/archbuild b/archbuild.in old mode 100755 new mode 100644 similarity index 93% rename from archbuild rename to archbuild.in index 5518996..92d2554 --- a/archbuild +++ b/archbuild.in @@ -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 diff --git a/archco b/archco.in old mode 100755 new mode 100644 similarity index 100% rename from archco rename to archco.in diff --git a/archrelease b/archrelease.in old mode 100755 new mode 100644 similarity index 100% rename from archrelease rename to archrelease.in diff --git a/archrm b/archrm.in old mode 100755 new mode 100644 similarity index 100% rename from archrm rename to archrm.in diff --git a/bash_completion b/bash_completion.in similarity index 100% rename from bash_completion rename to bash_completion.in diff --git a/checkpkg b/checkpkg.in old mode 100755 new mode 100644 similarity index 100% rename from checkpkg rename to checkpkg.in diff --git a/commitpkg b/commitpkg.in old mode 100755 new mode 100644 similarity index 100% rename from commitpkg rename to commitpkg.in diff --git a/finddeps b/finddeps.in old mode 100755 new mode 100644 similarity index 100% rename from finddeps rename to finddeps.in diff --git a/lddd b/lddd.in old mode 100755 new mode 100644 similarity index 100% rename from lddd rename to lddd.in diff --git a/makechrootpkg b/makechrootpkg.in old mode 100755 new mode 100644 similarity index 100% rename from makechrootpkg rename to makechrootpkg.in diff --git a/mkarchroot b/mkarchroot.in old mode 100755 new mode 100644 similarity index 100% rename from mkarchroot rename to mkarchroot.in diff --git a/rebuildpkgs b/rebuildpkgs.in old mode 100755 new mode 100644 similarity index 100% rename from rebuildpkgs rename to rebuildpkgs.in diff --git a/zsh_completion b/zsh_completion.in similarity index 100% rename from zsh_completion rename to zsh_completion.in -- 1.7.6.1