diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-08-29 10:53:50 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-10-07 21:53:02 +0200 |
commit | 46c4def0733a78ce08702d188e3e1a141fb07316 (patch) | |
tree | 69fb80eff39981680faeeba01f88be48026fc05f | |
parent | 142b032212fd94c0fde75a3dd223444c212c2eaa (diff) | |
download | devtools-46c4def0733a78ce08702d188e3e1a141fb07316.tar.gz devtools-46c4def0733a78ce08702d188e3e1a141fb07316.tar.xz |
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
35fc83ce7d8dc26cd424321f2e8638d05da0a6d4.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r-- | .gitignore | 13 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | archbuild.in (renamed from archbuild) | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | archco.in (renamed from archco) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | archrelease.in (renamed from archrelease) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | archrm.in (renamed from archrm) | 0 | ||||
-rw-r--r-- | bash_completion.in (renamed from bash_completion) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | checkpkg.in (renamed from checkpkg) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | commitpkg.in (renamed from commitpkg) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | finddeps.in (renamed from finddeps) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | lddd.in (renamed from lddd) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | makechrootpkg.in (renamed from makechrootpkg) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | mkarchroot.in (renamed from mkarchroot) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | rebuildpkgs.in (renamed from rebuildpkgs) | 0 | ||||
-rw-r--r-- | zsh_completion.in (renamed from zsh_completion) | 0 |
15 files changed, 22 insertions, 3 deletions
@@ -1,2 +1,15 @@ *~ devtools-*.tar.gz +archbuild +archco +archrelease +archrm +bash_completion +checkpkg +commitpkg +finddeps +lddd +makechrootpkg +mkarchroot +rebuildpkgs +zsh_completion @@ -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 index 5518996..92d2554 100755..100644 --- 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/archrelease b/archrelease.in index 2f6a563..2f6a563 100755..100644 --- a/archrelease +++ b/archrelease.in diff --git a/bash_completion b/bash_completion.in index cd959fc..cd959fc 100644 --- a/bash_completion +++ b/bash_completion.in diff --git a/checkpkg b/checkpkg.in index 94a7529..94a7529 100755..100644 --- a/checkpkg +++ b/checkpkg.in diff --git a/commitpkg b/commitpkg.in index 2a732b5..2a732b5 100755..100644 --- a/commitpkg +++ b/commitpkg.in diff --git a/finddeps b/finddeps.in index ded7a93..ded7a93 100755..100644 --- a/finddeps +++ b/finddeps.in diff --git a/makechrootpkg b/makechrootpkg.in index a60c9fe..a60c9fe 100755..100644 --- a/makechrootpkg +++ b/makechrootpkg.in diff --git a/mkarchroot b/mkarchroot.in index 8e74c54..8e74c54 100755..100644 --- a/mkarchroot +++ b/mkarchroot.in diff --git a/rebuildpkgs b/rebuildpkgs.in index be279bb..be279bb 100755..100644 --- a/rebuildpkgs +++ b/rebuildpkgs.in diff --git a/zsh_completion b/zsh_completion.in index d87850a..d87850a 100644 --- a/zsh_completion +++ b/zsh_completion.in |