genwebgallery

view Makefile @ 20:332ea19d9aaf

dist tarball contains now files with root as owner
author meillo@marmaro.de
date Sat, 10 May 2008 21:47:45 +0200
parents 326bcd4e1708
children cb1f0dda49e7
line source
1 # genwebgallery by meillo@marmaro.de
4 NAME=genwebgallery
5 VERSION = 0.5
6 NV=${NAME}-${VERSION}
8 DOCS=COPYRIGHT ChangeLog TODO
10 # paths
11 PREFIX = /usr
12 BINDIR = ${PREFIX}/bin
13 MANDIR = ${PREFIX}/share/man
15 all:
16 @echo usage: make [un]install
18 build:
19 @echo build unneeded
21 dist: changelog
22 @mkdir ${NV}
23 @cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV}
24 @tar -czho --owner 0 --group 0 -f ${NV}.tar.gz ${NV}
25 @rm -rf ${NV}
27 deb: dist
28 @mkdir -p Packages
29 @cp ${NV}.tar.gz Packages/
30 @( \
31 cd Packages/ ;\
32 tar -xzf ${NV}.tar.gz ;\
33 mv ${NV}.tar.gz ${NAME}_${VERSION}.orig.tar.gz ;\
34 cd ${NV}/ ;\
35 cp -r ../../debian/ . ;\
36 debuild -as ;\
37 )
39 changelog:
40 @echo generating changelog from mercurial log
41 @hg log -v --style changelog > ChangeLog
43 install:
44 @echo installing executable file to ${DESTDIR}${BINDIR}
45 @mkdir -p ${DESTDIR}${BINDIR}
46 @cp -f ${NAME} ${DESTDIR}${BINDIR}
47 @chmod 755 ${DESTDIR}${BINDIR}/${NAME}
48 @echo installing manual page to ${DESTDIR}${MANDIR}/man1
49 @mkdir -p ${DESTDIR}${MANDIR}/man1
50 @sed 's/VERSION/${VERSION}/g' < ${NAME}.1 > ${DESTDIR}${MANDIR}/man1/${NAME}.1
51 @chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1
53 uninstall:
54 @echo removing executable file from ${DESTDIR}${BINDIR}
55 @rm -f ${DESTDIR}${BINDIR}/${NAME}
56 @echo removing manual page from ${DESTDIR}${MANDIR}/man1
57 @rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1
59 clean:
60 @echo clean unneeded
62 distclean: clean
63 @rm -f ${NAME}-*.tar.gz ChangeLog
65 debclean: distclean
66 @cd Packages/${NV}/ ; debuild clean ;
69 .PHONY: all dist deb changelog clean distclean debclean build install uninstall