diff --git a/Makefile b/Makefile index 27807ae..9035014 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,10 @@ OBJS-abuild-fetch = abuild-fetch.o TEST_TIMEOUT = 15 -.SUFFIXES: .sh.in .in +.SUFFIXES: .conf.in .sh.in .in +%.conf: %.conf.in + ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@ + %.sh: %.sh.in ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@ ${CHMOD} +x $@ @@ -77,7 +80,7 @@ TEST_TIMEOUT = 15 P=$(PACKAGE)-$(VERSION) -all: $(USR_BIN_FILES) $(MAN_PAGES) functions.sh +all: $(USR_BIN_FILES) $(MAN_PAGES) functions.sh abuild.conf clean: @rm -f $(USR_BIN_FILES) $(MAN_PAGES) *.o functions.sh Kyuafile \ @@ -126,7 +129,7 @@ Kyuafile: tests/Kyuafile check: $(SCRIPTS) $(USR_BIN_FILES) functions.sh tests/Kyuafile Kyuafile tests/testdata/abuild.key.pub kyua test || (kyua report --verbose && exit 1) -install: $(USR_BIN_FILES) $(SAMPLES) $(MAN_PAGES) abuild.conf functions.sh +install: $(USR_BIN_FILES) $(SAMPLES) $(MAN_PAGES) default.conf abuild.conf functions.sh install -d $(DESTDIR)/$(bindir) $(DESTDIR)/$(sysconfdir) \ $(DESTDIR)/$(sharedir) $(DESTDIR)/$(mandir)/man1 \ $(DESTDIR)/$(mandir)/man5 @@ -146,9 +149,10 @@ install: $(USR_BIN_FILES) $(SAMPLES) $(MAN_PAGES) abuild.conf functions.sh if [ -n "$(DESTDIR)" ] || [ ! -f "/$(sysconfdir)"/abuild.conf ]; then\ cp abuild.conf $(DESTDIR)/$(sysconfdir)/; \ fi + cp $(SAMPLES) $(DESTDIR)/$(prefix)/share/abuild/ cp $(AUTOTOOLS_TOOLCHAIN_FILES) $(DESTDIR)/$(prefix)/share/abuild/ - cp functions.sh $(DESTDIR)/$(sharedir)/ + install -t $(DESTDIR)/$(sharedir)/ functions.sh default.conf depends depend: sudo apk --no-cache -U --virtual .abuild-depends add openssl-dev zlib-dev diff --git a/abuild.conf.in b/abuild.conf.in new file mode 100644 index 0000000..f12261c --- /dev/null +++ b/abuild.conf.in @@ -0,0 +1,26 @@ +# defaults are in @sharedir@/default.conf +# +# uncomment line below to enable colors +#USE_COLORS=1 + +# uncomment line below to enable ccache support. +#USE_CCACHE=1 + +# where downloaded files are stored +#SRCDEST=/var/cache/distfiles + +# uncomment line below to store built packages in other location +# The package will be stored as $REPODEST/$repo/$pkgname-$pkgver-r$pkgrel.apk +# where $repo is the name of the parent directory of $startdir. +#REPODEST=$HOME/packages/ + +# PACKAGER and MAINTAINER are used by newapkbuild when creating new aports for +# the APKBUILD's "Contributor:" and "Maintainer:" comments, respectively. +#PACKAGER="Your Name " +#MAINTAINER="$PACKAGER" + +# what to clean up after a successful build +#CLEANUP="srcdir bldroot pkgdir deps" + +# what to cleanup after a failed build +#ERROR_CLEANUP="bldroot deps" diff --git a/abuild.conf b/default.conf similarity index 88% rename from abuild.conf rename to default.conf index 5054ee2..305fdac 100644 --- a/abuild.conf +++ b/default.conf @@ -18,15 +18,8 @@ export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 export CARGO_PROFILE_RELEASE_LTO="true" export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse" -# remove line below to disable colors -USE_COLORS=1 - -# uncomment line below to enable ccache support. -#USE_CCACHE=1 - SRCDEST=/var/cache/distfiles -# uncomment line below to store built packages in other location # The package will be stored as $REPODEST/$repo/$pkgname-$pkgver-r$pkgrel.apk # where $repo is the name of the parent directory of $startdir. REPODEST=$HOME/packages/