diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-20 23:13:30 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-20 23:13:30 -0400 |
commit | 5c7b1e03c1a9a3405608a78c11823048a3f3ea2f (patch) | |
tree | 357ed6eb4d8e78b6abdbcbbaedcc9e77da7344ab | |
parent | ca2b38d5ef1d6e4756b64d2b5a275c9891802f28 (diff) |
fiddle with file locations
I remember now that config.mk's change to ?= was so that xbs Makefiles
could override $(binder). That was stupid.
-rw-r--r-- | config.mk | 30 | ||||
-rw-r--r-- | src/lib/conf.sh | 8 | ||||
-rw-r--r-- | src/lib/conf.sh.3.ronn | 6 | ||||
-rw-r--r-- | src/xbs-abs/Makefile | 9 | ||||
-rw-r--r-- | src/xbs-abslibre/Makefile | 1 | ||||
-rw-r--r-- | src/xbs/Makefile | 2 | ||||
-rwxr-xr-x | src/xbs/xbs | 21 | ||||
-rwxr-xr-x | test/testenv | 8 |
8 files changed, 49 insertions, 36 deletions
@@ -4,22 +4,22 @@ # Note: In the default version of this file, commented out values indicate what # the GNU standards dictate, when our values differ. -DESTDIR ?= +DESTDIR = -#prefix ?= /usr/local -prefix ?= /usr -exec_prefix ?= $(prefix) -bindir ?= $(exec_prefix)/bin -#libexecdir ?= $(exec_prefix)/libexec -libexecdir ?= $(exec_prefix)/lib +#prefix = /usr/local +prefix = /usr +exec_prefix = $(prefix) +bindir = $(exec_prefix)/bin +#libexecdir = $(exec_prefix)/libexec +libexecdir = $(exec_prefix)/lib -datarootdir ?= $(prefix)/share -datadir ?= $(datarootdir) -#sysconfdir ?= $(prefix)/etc -sysconfdir ?= /etc +datarootdir = $(prefix)/share +datadir = $(datarootdir) +#sysconfdir = $(prefix)/etc +sysconfdir = /etc -docdir ?= $(datarootdir)/doc -mandir ?= $(datarootdir)/man +docdir = $(datarootdir)/doc +mandir = $(datarootdir)/man -devtoolsdir ?= $(topdir)/../devtools-par -RONNFLAGS ?= --manual='libretools Manual' --organization='Parabola' +devtoolsdir = $(topdir)/../devtools-par +RONNFLAGS = --manual='libretools Manual' --organization='Parabola' diff --git a/src/lib/conf.sh b/src/lib/conf.sh index 1aa7b56..df189a2 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh @@ -51,13 +51,9 @@ list_files() { echo "$LIBREHOME/.$slug.conf" fi ;; - xbs) - echo /etc/$slug.conf - echo "$XDG_CONFIG_HOME/$slug.conf" - ;; xbs*) - echo /etc/xbs.d/$slug.conf - echo "$XDG_CONFIG_HOME/xbs.d/$slug.conf" + echo /etc/xbs/$slug.conf + echo "$XDG_CONFIG_HOME/xbs/$slug.conf" ;; libretools) echo /etc/$slug.conf diff --git a/src/lib/conf.sh.3.ronn b/src/lib/conf.sh.3.ronn index 4108f9a..7a4b413 100644 --- a/src/lib/conf.sh.3.ronn +++ b/src/lib/conf.sh.3.ronn @@ -1,5 +1,5 @@ conf.sh(3) -- easy loading of configuration files -============================================== +================================================= ## SYNOPSIS @@ -104,8 +104,8 @@ These two routines deal with loading `PKGBUILD`(5) files. The differences in behavior for anything that takes a slug comes down to the differences in the output for `list_files` and `list_envvars`. -The "known" slugs are "abs", "makepkg", and "libretools". If anything -else is given, then: +The "known" slugs are "abs", "makepkg", "libretools", and anything +beginning with "xbs". If anything else is given, then: * `list_files` will give back "/etc/libretools.d/<SLUG>.conf" and "$<XDG_CONFIG_HOME>/libretools/<SLUG>.conf" diff --git a/src/xbs-abs/Makefile b/src/xbs-abs/Makefile index ed969eb..c882807 100644 --- a/src/xbs-abs/Makefile +++ b/src/xbs-abs/Makefile @@ -1,6 +1,9 @@ pkgconfdir = $(sysconfdir)/xbs -bindir = $(libexecdir)/xbs -pkglibexecdir = $(libexecdir)/xbs/helper-abs.d +pkglibexecdir = $(libexecdir)/xbs +libexecs = helper-abs copy_files = archrelease.in -libs = archrelease +install_files = $(DESTDIR)$(pkglibexecdir)/helper-abs.d/archrelease include ../../common.mk + +$(DESTDIR)$(pkglibexecdir)/helper-abs.d/archrelease: archrelease + install -Dm755 '$<' '$@' diff --git a/src/xbs-abslibre/Makefile b/src/xbs-abslibre/Makefile index 5a72444..c09224b 100644 --- a/src/xbs-abslibre/Makefile +++ b/src/xbs-abslibre/Makefile @@ -1,2 +1,3 @@ pkglibexecdir = $(libexecdir)/xbs +libexecs = helper-abslibre include ../../common.mk diff --git a/src/xbs/Makefile b/src/xbs/Makefile index fcb8ac2..ea5e924 100644 --- a/src/xbs/Makefile +++ b/src/xbs/Makefile @@ -1,2 +1,2 @@ -pkgconfdir = $(sysconfdir) +pkgconfdir = $(sysconfdir)/xbs include ../../common.mk diff --git a/src/xbs/xbs b/src/xbs/xbs index ae424af..34d8945 100755 --- a/src/xbs/xbs +++ b/src/xbs/xbs @@ -17,6 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +default_libdir=/usr/lib/xbs + . libremessages . $(librelib conf) @@ -38,7 +40,9 @@ usage() { bullet 'with the `-b` flag' prose 'Later items take precidence over earlier ones.' echo - prose 'It looks for a helper program at `/lib/xbs/helper-${BUILDSYSTEM}`.' + prose 'It looks for a helper programs named helper-${BUILDSYSTEM}, in + the directory `%q` by default, but this directory can be changed + with the environmental variable XBS_LIBDIR.' "$default_libdir" echo print 'Options:' flag "-b $(_ BUILDSYSTEM)" 'BUILDSYSTEM instead of the one configured in @@ -57,8 +61,8 @@ usage() { flag "move $(_ 'FROMREPO TOREPO PKGBASE')" \ 'Move a pkgbase from one repo to another' flag "releasepath $(_ 'PKGBASE REPO ARCH')" \ - 'Print the path to the staged version of pkgbase. Exit with a - non-zero value if PKGBASE is not staged for that REPO-ARCH' + 'Print the path to the staged version of pkgbase, or exit with + non-zero if not released' } status() { @@ -110,10 +114,17 @@ main() { if [[ -z $BUILDSYSTEM ]]; then load_files xbs || return 1 - check_vars xbs BUILDSYSTEM || return 1 + check_vars xbs BUILDSYSTEM || { + prose 'or specify the `-b` flag.' >&2 + return 1 + } fi - HELPER="/lib/xbs/helper-${BUILDSYSTEM}" + if [[ -z $XBS_LIBDIR ]]; then + export XBS_LIBDIR=$default_libdir + fi + + HELPER="${XBS_LIBDIR}/helper-${BUILDSYSTEM}" if [[ ! -x "$HELPER" ]]; then error 'No helper for build system found: %s' "$BUILDSYSTEM" return 1; diff --git a/test/testenv b/test/testenv index 847a948..dcc54fa 100755 --- a/test/testenv +++ b/test/testenv @@ -31,15 +31,17 @@ old_pwd="$(pwd)" if [[ -f $0 ]]; then cd "${0%/*}" fi -make -C .. install DESTDIR=$destdir &>/dev/null || { - echo 'error creating local install, cannot run tests' +if ! make -C .. install DESTDIR="$destdir" &>"$TMPDIR/make-output"; then + echo 'error creating local install, cannot run tests' >&2 + cat "$TMPDIR/make-output" exit 1 -} +fi cd "$old_pwd" # Set up the environment export PATH="$destdir/usr/bin:$PATH" export LIBRETOOLS_LIBDIR="$destdir/usr/lib/libretools" +export XBS_LIBDIR="$destdir/usr/lib/xbs" export HOME=$TMPDIR/home export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" |