meillo@0: # genwebgallery by meillo@marmaro.de meillo@0: meillo@0: meillo@0: NAME=genwebgallery meillo@22: VERSION=$(shell sed -n '/VERSION=/ s/^.*=//p' $(NAME) ) meillo@0: NV=${NAME}-${VERSION} meillo@2: meillo@4: DOCS=COPYRIGHT ChangeLog TODO meillo@15: meillo@15: # paths meillo@22: PREFIX = /usr/local meillo@0: BINDIR = ${PREFIX}/bin meillo@0: MANDIR = ${PREFIX}/share/man meillo@0: meillo@22: meillo@0: all: meillo@0: @echo usage: make [un]install meillo@0: meillo@0: meillo@2: dist: changelog meillo@22: @echo "generating distribution tarball" meillo@0: @mkdir ${NV} meillo@2: @cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV} meillo@33: @tar -czho --owner 0 --group 0 -f ${NV}.tar.gz ${NV} meillo@0: @rm -rf ${NV} meillo@0: meillo@2: meillo@2: changelog: meillo@2: @echo generating changelog from mercurial log meillo@4: @hg log -v --style changelog > ChangeLog meillo@2: meillo@22: meillo@0: install: meillo@0: @echo installing executable file to ${DESTDIR}${BINDIR} meillo@0: @mkdir -p ${DESTDIR}${BINDIR} meillo@0: @cp -f ${NAME} ${DESTDIR}${BINDIR} meillo@0: @chmod 755 ${DESTDIR}${BINDIR}/${NAME} meillo@0: @echo installing manual page to ${DESTDIR}${MANDIR}/man1 meillo@0: @mkdir -p ${DESTDIR}${MANDIR}/man1 meillo@22: @cp -f ${NAME}.1 ${DESTDIR}${MANDIR}/man1 meillo@0: @chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1 meillo@0: meillo@22: meillo@0: uninstall: meillo@0: @echo removing executable file from ${DESTDIR}${BINDIR} meillo@0: @rm -f ${DESTDIR}${BINDIR}/${NAME} meillo@0: @echo removing manual page from ${DESTDIR}${MANDIR}/man1 meillo@0: @rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1 meillo@0: meillo@22: meillo@0: clean: meillo@22: @echo removing generated files meillo@22: @rm -f ChangeLog meillo@0: meillo@0: meillo@0: meillo@22: .PHONY: all dist changelog clean install uninstall