diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2006-10-14 09:31:03 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2006-10-14 09:31:03 +0000 |
commit | ccaf94592342255f3f0692c242196fb157a48137 (patch) | |
tree | ead59f55d6eedb39843ff755962e03a25e3f78c6 /Makefile | |
download | alpine-conf-ccaf94592342255f3f0692c242196fb157a48137.tar.bz2 alpine-conf-ccaf94592342255f3f0692c242196fb157a48137.tar.xz |
intial import - version 0.6.0
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..87d1658 --- /dev/null +++ b/Makefile @@ -0,0 +1,67 @@ +V=0.6.0 +P=alpine-conf +PV=$(P)-$(V) +APKF=$(PV).apk +TARGZ=$(PV).tar.gz +PREFIX=/usr/local +TMP=$(PV) + +LIB_FILES=libalpine.sh +SBIN_FILES=lbu\ + setup-interfaces\ + setup-dns\ + setup-hostname\ + setup-alpine\ + setup-webconf\ + update-conf +EXTRA_DIST=Makefile README + +DIST_FILES=$(LIB_FILES) $(SBIN_FILES) $(EXTRA_DIST) + +DESC="Alpine configuration scripts" +WWW="http://alpinelinux.org/alpine-conf" + + +TAR=tar +DB=$(TMP)/var/db/apk/$(PV) + +.PHONY: all apk clean dist install uninstall +all: + sed -i 's|^PREFIX=.*|PREFIX=$(PREFIX)|' $(SBIN_FILES) + +apk: $(APKF) + +dist: $(TARGZ) + +$(APKF): $(SBIN_FILES) + rm -rf $(TMP) + make all PREFIX= + make install DESTDIR=$(TMP) PREFIX= + mkdir -p $(DB) + echo $(DESC) > $(DB)/DESC + cd $(TMP) && $(TAR) -czf ../$@ . + rm -rf $(TMP) + +$(TARGZ): $(DIST_FILES) + rm -rf $(TMP) + mkdir -p $(TMP) + cp $(DIST_FILES) $(TMP) + $(TAR) -czf $@ $(TMP) + +install: + install -m 755 -d $(DESTDIR)/$(PREFIX)/sbin + install -m 755 $(SBIN_FILES) $(DESTDIR)/$(PREFIX)/sbin + install -m 755 -d $(DESTDIR)/$(PREFIX)/lib + install -m 755 $(LIB_FILES) $(DESTDIR)/$(PREFIX)/lib + +uninstall: + for i in $(SBIN_FILES); do \ + rm -f "$(DESTDIR)/$(PREFIX)/sbin/$$i";\ + done + for i in $(LIB_FILES); do \ + rm -f "$(DESTDIR)/$(PREFIX)/lib/$$i";\ + done + +clean: + rm -rf $(APKF) $(TMP) $(TARGZ) + |