diff options
| author | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-27 12:50:20 +0100 |
|---|---|---|
| committer | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-27 12:50:20 +0100 |
| commit | 475ca77785db30a8b208f7057cf448a421d3fc13 (patch) | |
| tree | 2ce7896547198bdfdb8267d86f1adb100a87e2bd /Makefile | |
| parent | 8be53a7b5a51798e40ac75bbc1542f165d7d1ea2 (diff) | |
initial debian package version
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 52 |
1 files changed, 43 insertions, 9 deletions
@@ -1,10 +1,44 @@ -all: generate dist -generate: - ./photoalbum.sh +NAME=photoalbum +all: version documentation build +build: + test ! -d ./bin && mkdir ./bin || exit 0 + sed "s/PHOTOALBUMVERSION/$$(cat .version)/" src/$(NAME) > ./bin/$(NAME) + chmod 0755 ./bin/$(NAME) +install: + test ! -d $(DESTDIR)/usr/bin && mkdir -p $(DESTDIR)/usr/bin || exit 0 + cp ./bin/* $(DESTDIR)/usr/bin + test ! -d $(DESTDIR)/usr/share/photoalbum/templates && mkdir -p $(DESTDIR)/usr/share/photoalbum/templates || exit 0 + cp ./share/templates/* $(DESTDIR)/usr/share/photoalbum/templates + test ! -d $(DESTDIR)/etc/default && mkdir -p $(DESTDIR)/usr/etc/default || exit 0 + cp ./src/photoalbum.default.conf $(DESTDIR)/etc/default/photoalbum +deinstall: + test ! -z "$(DESTDIR)" && test -f $(DESTDIR)/usr/bin/$(NAME) && rm $(DESTDIR)/usr/bin/$(NAME) || exit 0 + test ! -z "$(DESTDIR)" && test -d $(DESTDIR)/usr/share/$(NAME) && rm -r $(DESTDIR)/usr/share/$(NAME) || exit 0 + test ! -z "$(DESTDIR)" && test -f $(DESTDIR)/etc/default/photoalbum && rm $(DESTDIR)/etc/default/photoalbum || exit 0 clean: - rm -Rf dist photos -dist: - rm -Rf dist 2>/dev/null - mkdir dist - mv thumbs html photos dist - mv index.html ./dist + test -d ./bin && rm -Rf ./bin || exit 0 + test -d ./debian/photoalbum && rm -Rf ./debian/photoalbum || exit 0 +version: + cut -d' ' -f2 debian/changelog | head -n 1 | sed 's/(//;s/)//' > .version +# Builds the documentation into a manpage +documentation: + pod2man --release="$(NAME) $$(cat .version)" \ + --center="User Commands" ./docs/$(NAME).pod > ./docs/$(NAME).1 + pod2text ./docs/$(NAME).pod > ./docs/$(NAME).txt +deb: all + dpkg-buildpackage +dch: + dch -i +dput: + dput -u wheezy-buetowdotorg ../$(NAME)_$$(cat ./.version)_amd64.changes +release: dch deb dput + bash -c "git tag $$(cat .version)" + git push --tags + git commit -a -m 'New release' + git push origin master +clean-top: + rm ../$(NAME)_*.tar.gz + rm ../$(NAME)_*.dsc + rm ../$(NAME)_*.changes + rm ../$(NAME)_*.deb + |
