genwebgallery
view Makefile @ 10:48fa778b6faf
Added tag deb_0.4-1 for changeset 626dacb5193ece5ff1ab7484933d55f7c16a6a29
author | meillo@marmaro.de |
---|---|
date | Fri, 23 Nov 2007 23:03:16 +0100 |
parents | a963f51cfd80 |
children | 83e01434937f |
line source
1 # genwebgallery by meillo@marmaro.de
4 NAME=genwebgallery
5 VERSION = 0.4
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 -czhof ${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 ;\
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