vwprintw -> vw_printw as the former is deprecated.
[dhcpcd-ui] / Makefile
1 PROG=           dhcpcd-ui
2 VERSION=        0.7.7
3
4 TOPDIR=         .
5 include ${TOPDIR}/iconfig.mk
6 include ${MKDIR}/subdir.mk
7
8 .PHONY:         icons
9
10 SUBDIR=         src ${MKICONS}
11
12 GITREF?=        HEAD
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
19 PGP?=           netpgp
20
21 CLEANFILES+=    ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}
22
23 _SNAP_SH=       date -u +%Y%m%d%H%M
24 _SNAP!=         ${_SNAP_SH}
25 SNAP=           ${_SNAP}$(shell ${_SNAP_SH})
26 SNAPDIR=        ${DISTPREFIX}-${SNAP}
27 SNAPFILE=       ${SNAPDIR}.tar.xz
28
29 dist:
30         git archive --prefix=${DISTPREFIX}/ -o /tmp/${DISTFILETAR} ${GITREF}
31         tar -xpf /tmp/${DISTFILETAR} -C /tmp
32         (cd /tmp/${DISTPREFIX}; make icons)
33         rm -rf /tmp/${DISTPREFIX}/doc
34         tar -cvJpf ${DISTFILE} -C /tmp ${DISTPREFIX}
35         rm -rf /tmp/${DISTPREFIX} /tmp/${DISTFILETAR}
36
37 distinfo: dist
38         rm -f ${DISTINFO} ${DISTINFOSIGN}
39         ${CKSUM} ${DISTFILE} >${DISTINFO}
40         #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO}
41         ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO}
42         chmod 644 ${DISTINFOSIGN}
43         ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}
44
45 distclean:
46         (cd src; make clean)
47         rm -f config.h config.mk config.log
48
49 snapshot: icons
50         mkdir /tmp/${SNAPDIR}
51         cp -RPp * /tmp/${SNAPDIR}
52         (cd /tmp/${SNAPDIR}; make clean; rm config.h config.mk)
53         find /tmp/${SNAPDIR} -name .gitignore -delete
54         tar -cvJpf ${SNAPFILE} -C /tmp ${SNAPDIR}
55         rm -rf /tmp/${SNAPDIR}
56         ls -l ${SNAPFILE}
57
58 snap: snapshot
59
60 icons:
61         ${MAKE} -C icons