meillo@0: # genwebgallery by meillo@marmaro.de meillo@0: meillo@0: meillo@0: NAME=genwebgallery meillo@8: VERSION = 0.4 meillo@0: NV=${NAME}-${VERSION} meillo@2: meillo@4: DOCS=COPYRIGHT ChangeLog TODO meillo@0: meillo@0: # paths meillo@0: PREFIX = /usr meillo@0: BINDIR = ${PREFIX}/bin meillo@0: MANDIR = ${PREFIX}/share/man meillo@0: meillo@0: all: meillo@0: @echo usage: make [un]install meillo@0: meillo@0: build: meillo@0: @echo build unneeded meillo@0: meillo@2: dist: changelog meillo@0: @mkdir ${NV} meillo@2: @cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV} meillo@0: @tar -czhof ${NV}.tar.gz ${NV} meillo@0: @rm -rf ${NV} meillo@0: meillo@2: deb: dist meillo@2: @mkdir -p Packages meillo@2: @cp ${NV}.tar.gz Packages/ meillo@11: @( \ meillo@2: cd Packages/ ;\ meillo@2: tar -xzf ${NV}.tar.gz ;\ meillo@2: mv ${NV}.tar.gz ${NAME}_${VERSION}.orig.tar.gz ;\ meillo@2: cd ${NV}/ ;\ meillo@2: cp -r ../../debian/ . ;\ meillo@2: debuild ;\ meillo@2: ) meillo@2: meillo@2: changelog: meillo@2: @echo generating changelog from mercurial log meillo@4: @hg log -v --style changelog > ChangeLog meillo@2: 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@0: @sed 's/VERSION/${VERSION}/g' < ${NAME}.1 > ${DESTDIR}${MANDIR}/man1/${NAME}.1 meillo@0: @chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1 meillo@0: 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@0: clean: meillo@0: @echo clean unneeded meillo@0: meillo@0: distclean: clean meillo@5: @rm -f ${NAME}-*.tar.gz ChangeLog meillo@0: meillo@2: debclean: distclean meillo@0: @cd Packages/${NV}/ ; debuild clean ; meillo@0: meillo@0: meillo@2: .PHONY: all dist deb changelog clean distclean debclean build install uninstall