diff options
author | Justin Davis <jrcd83@gmail.com> | 2011-10-22 00:06:47 +0200 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2011-10-22 00:06:47 +0200 |
commit | ce9d1f4c3b1c551e4d620c6b53274a747956c235 (patch) | |
tree | 448482a13340788358a7fe00fcad9656b1b47284 /Makefile | |
parent | 879bbf01560e348d93c6903786fabae0607a59e6 (diff) | |
download | genpkg-ce9d1f4c3b1c551e4d620c6b53274a747956c235.tar.gz genpkg-ce9d1f4c3b1c551e4d620c6b53274a747956c235.tar.xz |
Move main logic from Makefile to bin/genpkg.
Scripts were all reorganized and genpkg is made to be run with all scripts
installed under the users home directory. Makefile now is used to install
the scripts under the home directory.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 56 |
1 files changed, 15 insertions, 41 deletions
@@ -1,41 +1,15 @@ -TWEAKS = $(PWD)/tweaks -PKGS = $(PWD)/pkg -BIN = $(PWD)/bin -PKGVAR = $(PWD)/var - -.PHONY: prepare package tweakmeta PKGBUILD - -PKGBUILD: $(PKGS)/$(PKG)/PKGBUILD - -$(PKGS)/$(PKG)/PKGBUILD: tweakmeta - @cd '$(PKGS)/$(PKG)'; \ - TDIR='$(BIN)/templ' $(BIN)/makepkgbuild - @echo 'Built pkg/$(PKG)/PKGBUILD.' - -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; \ - echo 'Tweaked PKGMETA with tweaks/$(PKG).'; \ - fi - -$(PKGS)/$(PKG)/PKGMETA: prepare - @[ -d '$(PKGS)/$(PKG)' ] || mkdir '$(PKGS)/$(PKG)' - @cd '$(PKGS)/$(PKG)'; \ - PATH="$$PATH:$(BIN)" METABIN="$(BIN)/metas" \ - PKGVAR="$(PKGVAR)" \ - $(BIN)/makepkgmeta $(PKG) >PKGMETA - @echo 'Created pkg/$(PKG)/PKGMETA.' - -prepare: - @case '$(PKG)' in \ - '') echo 'error: Specify the package name in the PKG variable.' 1>&2 ;\ - false ;; \ - esac - @[ -d '$(PKGVAR)' ] || mkdir '$(PKGVAR)' - -package: $(PKGS)/$(PKG)/PKGBUILD - cd "$(PKGS)/$(PKG)"; makepkg --clean +usage: + @echo 'Run "make install" to install into your home directory.' + @echo 'Run "make install_tweaks" to install tweak files, too.' + +install: + mkdir -p $$HOME/bin + install -m 755 bin/makepkgbuild bin/makepkgmeta bin/genpkg \ + bin/tweakmeta $$HOME/bin + mkdir -p $$HOME/lib/genpkg/ + cp -R lib/* $$HOME/lib/genpkg/ + mkdir -p $$HOME/pkg/dest + +install_tweaks: + -mkdir $$HOME/pkg + cp -R tweaks $$HOME/pkg/ |