genwebgallery

diff Makefile @ 0:9f4fa0bc1584

initial commit
author meillo@marmaro.de
date Thu, 22 Nov 2007 21:13:25 +0100
parents
children abe1e48e0708
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Thu Nov 22 21:13:25 2007 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +# genwebgallery by meillo@marmaro.de
     1.5 +
     1.6 +
     1.7 +NAME=genwebgallery
     1.8 +VERSION = 0.3
     1.9 +NV=${NAME}-${VERSION}
    1.10 + 
    1.11 +# paths 
    1.12 +PREFIX = /usr
    1.13 +BINDIR = ${PREFIX}/bin
    1.14 +MANDIR = ${PREFIX}/share/man
    1.15 +
    1.16 +all:
    1.17 +	@echo usage: make [un]install
    1.18 +
    1.19 +build:
    1.20 +	@echo build unneeded
    1.21 +
    1.22 +dist:
    1.23 +	@mkdir ${NV}
    1.24 +	@cp -f ${NAME} ${NAME}.1 Makefile TODO COPYRIGHT ${NV}
    1.25 +	@tar -czhof ${NV}.tar.gz ${NV}
    1.26 +	@rm -rf ${NV}
    1.27 +
    1.28 +install:
    1.29 +	@echo installing executable file to ${DESTDIR}${BINDIR}
    1.30 +	@mkdir -p ${DESTDIR}${BINDIR}
    1.31 +	@cp -f ${NAME} ${DESTDIR}${BINDIR}
    1.32 +	@chmod 755 ${DESTDIR}${BINDIR}/${NAME}
    1.33 +	@echo installing manual page to ${DESTDIR}${MANDIR}/man1
    1.34 +	@mkdir -p ${DESTDIR}${MANDIR}/man1
    1.35 +	@sed 's/VERSION/${VERSION}/g' < ${NAME}.1 > ${DESTDIR}${MANDIR}/man1/${NAME}.1
    1.36 +	@chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1
    1.37 +
    1.38 +uninstall:
    1.39 +	@echo removing executable file from ${DESTDIR}${BINDIR}
    1.40 +	@rm -f ${DESTDIR}${BINDIR}/${NAME}
    1.41 +	@echo removing manual page from ${DESTDIR}${MANDIR}/man1
    1.42 +	@rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1
    1.43 +
    1.44 +deb: dist
    1.45 +	@mkdir -p Packages
    1.46 +	@cp ${NV}.tar.gz Packages/
    1.47 +	( \
    1.48 +		cd Packages/ ;\
    1.49 +		tar -xzf ${NV}.tar.gz ;\
    1.50 +		mv ${NV}.tar.gz ${NAME}_${VERSION}.orig.tar.gz ;\
    1.51 +		cd ${NV}/ ;\
    1.52 +		cp -r ../../debian/ . ;\
    1.53 +		debuild ;\
    1.54 +	 )
    1.55 +
    1.56 +clean:
    1.57 +	@echo clean unneeded
    1.58 +
    1.59 +distclean: clean
    1.60 +	@rm -f ${NAME}-*.tar.gz
    1.61 +
    1.62 +debclean:
    1.63 +	@cd Packages/${NV}/ ; debuild clean ;
    1.64 +
    1.65 +
    1.66 +.PHONY: all clean build install uninstall