Disconnect when same SSID selected (#1)
[dhcpcd-ui] / Makefile
1 PROG=           dhcpcd-ui
2 VERSION=        0.7.8
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         [ -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}
40
41 distinfo: dist
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}
48
49 distclean:
50         (cd src; make clean)
51         rm -f config.h config.mk config.log
52
53 snapshot: icons
54         mkdir /tmp/${SNAPDIR}
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}
60         ls -l ${SNAPFILE}
61
62 snap: snapshot
63
64 icons:
65         ${MAKE} -C icons