5 include ${TOPDIR}/iconfig.mk
6 include ${MKDIR}/subdir.mk
10 SUBDIR= src ${MKICONS}
13 DISTPREFIX?= ${PROG}-${VERSION}
14 DISTFILETAR?= ${DISTPREFIX}.tar
15 DISTFILE?= ${DISTFILETAR}.xz
16 DISTINFO= ${DISTFILE}.distinfo
17 DISTINFOSIGN= ${DISTINFO}.asc
18 CKSUM?= cksum -a SHA256
21 CLEANFILES+= ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}
23 _SNAP_SH= date -u +%Y%m%d%H%M
25 SNAP= ${_SNAP}$(shell ${_SNAP_SH})
26 SNAPDIR= ${DISTPREFIX}-${SNAP}
27 SNAPFILE= ${SNAPDIR}.tar.xz
30 [ -e config.mk ] || ./configure
31 git archive --prefix=${DISTPREFIX}/ -o /tmp/${DISTFILETAR} ${GITREF}
32 tar -xpf /tmp/${DISTFILETAR} -C /tmp
33 # We need config.mk to build the icons - remove it once done
34 cp config.mk /tmp/${DISTPREFIX}
35 (cd /tmp/${DISTPREFIX}; make icons)
36 rm /tmp/${DISTPREFIX}/config.mk
37 rm -rf /tmp/${DISTPREFIX}/doc
38 tar -cvJpf ${DISTFILE} -C /tmp ${DISTPREFIX}
39 rm -rf /tmp/${DISTPREFIX} /tmp/${DISTFILETAR}
42 rm -f ${DISTINFO} ${DISTINFOSIGN}
43 ${CKSUM} ${DISTFILE} >${DISTINFO}
44 #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO}
45 ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO}
46 chmod 644 ${DISTINFOSIGN}
47 ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}
51 rm -f config.h config.mk config.log
55 cp -RPp * /tmp/${SNAPDIR}
56 (cd /tmp/${SNAPDIR}; make clean; rm config.h config.mk)
57 find /tmp/${SNAPDIR} -name .gitignore -delete
58 tar -cvJpf ${SNAPFILE} -C /tmp ${SNAPDIR}
59 rm -rf /tmp/${SNAPDIR}