genwebgallery

changeset 2:abe1e48e0708

CHANGELOG gets generated now; reviewed Makefile
author meillo@marmaro.de
date Thu, 22 Nov 2007 21:36:20 +0100
parents 0947e06af4c4
children 737fe869e278
files .hgignore Makefile debian/docs genwebgallery
diffstat 4 files changed, 29 insertions(+), 19 deletions(-) [+]
line diff
     1.1 --- a/.hgignore	Thu Nov 22 21:13:35 2007 +0100
     1.2 +++ b/.hgignore	Thu Nov 22 21:36:20 2007 +0100
     1.3 @@ -4,3 +4,4 @@
     1.4  
     1.5  Packages
     1.6  *.tar.gz
     1.7 +CHANGELOG
     2.1 --- a/Makefile	Thu Nov 22 21:13:35 2007 +0100
     2.2 +++ b/Makefile	Thu Nov 22 21:36:20 2007 +0100
     2.3 @@ -4,6 +4,8 @@
     2.4  NAME=genwebgallery
     2.5  VERSION = 0.3
     2.6  NV=${NAME}-${VERSION}
     2.7 +
     2.8 +DOCS=COPYRIGHT CHANGELOG TODO
     2.9   
    2.10  # paths 
    2.11  PREFIX = /usr
    2.12 @@ -16,12 +18,28 @@
    2.13  build:
    2.14  	@echo build unneeded
    2.15  
    2.16 -dist:
    2.17 +dist: changelog
    2.18  	@mkdir ${NV}
    2.19 -	@cp -f ${NAME} ${NAME}.1 Makefile TODO COPYRIGHT ${NV}
    2.20 +	@cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV}
    2.21  	@tar -czhof ${NV}.tar.gz ${NV}
    2.22  	@rm -rf ${NV}
    2.23  
    2.24 +deb: dist
    2.25 +	@mkdir -p Packages
    2.26 +	@cp ${NV}.tar.gz Packages/
    2.27 +	( \
    2.28 +		cd Packages/ ;\
    2.29 +		tar -xzf ${NV}.tar.gz ;\
    2.30 +		mv ${NV}.tar.gz ${NAME}_${VERSION}.orig.tar.gz ;\
    2.31 +		cd ${NV}/ ;\
    2.32 +		cp -r ../../debian/ . ;\
    2.33 +		debuild ;\
    2.34 +	 )
    2.35 +
    2.36 +changelog:
    2.37 +	@echo generating changelog from mercurial log
    2.38 +	@hg log -v --style changelog > CHANGELOG
    2.39 +
    2.40  install:
    2.41  	@echo installing executable file to ${DESTDIR}${BINDIR}
    2.42  	@mkdir -p ${DESTDIR}${BINDIR}
    2.43 @@ -38,26 +56,14 @@
    2.44  	@echo removing manual page from ${DESTDIR}${MANDIR}/man1
    2.45  	@rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1
    2.46  
    2.47 -deb: dist
    2.48 -	@mkdir -p Packages
    2.49 -	@cp ${NV}.tar.gz Packages/
    2.50 -	( \
    2.51 -		cd Packages/ ;\
    2.52 -		tar -xzf ${NV}.tar.gz ;\
    2.53 -		mv ${NV}.tar.gz ${NAME}_${VERSION}.orig.tar.gz ;\
    2.54 -		cd ${NV}/ ;\
    2.55 -		cp -r ../../debian/ . ;\
    2.56 -		debuild ;\
    2.57 -	 )
    2.58 -
    2.59  clean:
    2.60  	@echo clean unneeded
    2.61  
    2.62  distclean: clean
    2.63 -	@rm -f ${NAME}-*.tar.gz
    2.64 +	@rm -f ${NAME}-*.tar.gz CHANGELOG
    2.65  
    2.66 -debclean:
    2.67 +debclean: distclean
    2.68  	@cd Packages/${NV}/ ; debuild clean ;
    2.69  
    2.70  
    2.71 -.PHONY: all clean build install uninstall
    2.72 +.PHONY: all dist deb changelog clean distclean debclean build install uninstall
     3.1 --- a/debian/docs	Thu Nov 22 21:13:35 2007 +0100
     3.2 +++ b/debian/docs	Thu Nov 22 21:36:20 2007 +0100
     3.3 @@ -1,2 +1,3 @@
     3.4 +COPYRIGHT
     3.5 +CHANGELOG
     3.6  TODO
     3.7 -COPYRIGHT
     4.1 --- a/genwebgallery	Thu Nov 22 21:13:35 2007 +0100
     4.2 +++ b/genwebgallery	Thu Nov 22 21:36:20 2007 +0100
     4.3 @@ -7,6 +7,8 @@
     4.4  #
     4.5  
     4.6  
     4.7 +VERSION=0.3
     4.8 +
     4.9  targetDir="web"
    4.10  index="index.htm"
    4.11  sizePic=640
    4.12 @@ -93,7 +95,7 @@
    4.13  while [  "$#" -ge 1  -a  "${1:0:1}" = '-'  ] ; do
    4.14  	case $1 in
    4.15  		'--version')
    4.16 -			echo "genwebgallery version 0.3"
    4.17 +			echo "genwebgallery version $VERSION"
    4.18  			exit 0
    4.19  			;;
    4.20  		'--help')