summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-09-21 22:36:24 +0200
committerJustin Davis <jrcd83@gmail.com>2011-09-21 22:36:24 +0200
commitc3f405c8f1af4a06661584e12f8449e86389a772 (patch)
tree655dae6d10f0c45210efb24bf243b0a31a90dad0 /Makefile
parent12d97a22d1d03c01367096db4bdfff66afa2b5c3 (diff)
downloadgenpkg-c3f405c8f1af4a06661584e12f8449e86389a772.tar.gz
genpkg-c3f405c8f1af4a06661584e12f8449e86389a772.tar.xz
Add PKGMETA tweaking to Makefile. Update newly named tweakmeta script.
The process of reading "tweak" files is now much simpler. The Makefile merely looks to see if a package we are building has an entry in our "tweaks" directory. If so, it tweaks the PKGMETA file. Sort of like a patch only much simpler.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d5a0b19..068c845 100644
--- a/Makefile
+++ b/Makefile
@@ -11,18 +11,26 @@ package: $(PKGS)/$(PKG)/PKGBUILD
$(PKGS)/$(PKG)/PKGBUILD: tweakmeta
tweakmeta: $(PKGS)/$(PKG)/PKGMETA
+ @if [ -r '$(TWEAKS)/$(PKG)' ]; \
+ then \
+ cd '$(PKGS)/$(PKG)'; \
+ $(BIN)/tweakmeta >PKGMETA.new <'$(TWEAKS)/$(PKG)'; \
+ mv PKGMETA PKGMETA.old; \
+ mv PKGMETA.new PKGMETA; \
+ fi
-$(PKGS)/$(PKG)/PKGMETA: checkpkgarg
+$(PKGS)/$(PKG)/PKGMETA: prepare
@rm -rf tmp
@mkdir tmp
@cd tmp; \
- PATH="$$PATH:$(BIN)" METABIN="$(BIN)/metas" PKGVAR="$(PKGVAR)" \
+ PATH="$$PATH:$(BIN)" METABIN="$(BIN)/metas" \
+ PKGVAR="$(PKGVAR)" \
$(BIN)/makepkgmeta $(PKG) >PKGMETA
@rm -rf "$(PKGS)/$(PKG)"
@mv tmp "$(PKGS)/$(PKG)"
- @echo 'Created $@.'
+ @echo 'Created pkg/$(PKG)/PKGMETA.'
-checkpkgarg:
+prepare:
.ifndef PKG
@echo 'error: Specify the package name in the PKG variable.' 1>&2
@false