Set wpa expander state on profile editor create
[wifi-radar.git] / Makefile
blob2cfd5b063f549cc2d17c68086a5183cb33177955
2 # Makefile for WiFi Radar
5 SHELL = /bin/sh
8 # These settings are what I would expect for most modern Linux distros,
9 # and are what work for me unmodified on Ubuntu. -BEF-
11 package = wifi-radar
12 sbindir = $(DESTDIR)/sbin
13 initdir = $(DESTDIR)/etc/init.d
14 sysconfdir = $(DESTDIR)/etc/
15 mandir = $(DESTDIR)/share/man
16 pixmapsdir = $(DESTDIR)/share/pixmaps
17 appsdir = $(DESTDIR)/share/applications
19 srcdir = .
20 top_srcdir = .
21 top_builddir = .
23 VERSION = $(shell cat $(srcdir)/docs/VERSION)
25 BRANCH = $(shell echo v$(shell cat $(srcdir)/docs/VERSION | cut -d. -f1-2).x)
27 TOPDIR := $(CURDIR)
30 .PHONY: all install tarball dev-docs changelog clean distclean
32 all: wifi-radar.localized
34 install: all
35 test -d ${sysconfdir} || install -d -m 755 ${sysconfdir}
37 test -d ${sbindir} || install -d -m 755 ${sbindir}
38 install -m 755 wifi-radar.localized ${sbindir}/wifi-radar
40 test -d ${mandir}/man1 || install -d -m 755 ${mandir}/man1
41 install -m 644 man/man1/wifi-radar.1 ${mandir}/man1
43 test -d ${mandir}/man5 || install -d -m 755 ${mandir}/man5
44 install -m 644 man/man5/wifi-radar.conf.5 ${mandir}/man5
46 test -d ${pixmapsdir} || install -d -m 755 ${pixmapsdir}
47 install -m 644 pixmaps/wifi-radar.svg ${pixmapsdir}
48 install -m 644 pixmaps/wifi-radar.png ${pixmapsdir}
50 test -d ${appsdir} || install -d -m 755 ${appsdir}
51 install -m 644 wifi-radar.desktop ${appsdir}
54 wifi-radar.localized: wifi-radar
55 cp wifi-radar wifi-radar.tmp
56 perl -pi -e 's#^CONF_FILE\s+=.*#CONF_FILE = "${sysconfdir}/wifi-radar.conf"#' wifi-radar.tmp
57 mv wifi-radar.tmp wifi-radar.localized
59 tarball: $(TOPDIR)/tmp/${package}-$(VERSION).tar.bz2.sign $(TOPDIR)/tmp/${package}-$(VERSION).tar.bz2.sha256
61 $(TOPDIR)/tmp/${package}-$(VERSION).tar.bz2.sign: $(TOPDIR)/tmp/${package}-$(VERSION).tar.bz2
62 cd $(TOPDIR)/tmp && gpg --detach-sign -a --output ${package}-$(VERSION).tar.bz2.asc ${package}-$(VERSION).tar.bz2
63 cd $(TOPDIR)/tmp && chmod 644 ${package}-$(VERSION).tar.bz2.asc
64 cd $(TOPDIR)/tmp && gpg --verify ${package}-$(VERSION).tar.bz2.asc
66 $(TOPDIR)/tmp/${package}-$(VERSION).tar.bz2.sha256:
67 cd $(TOPDIR)/tmp && sha256sum ${package}-$(VERSION).tar.bz2 > ${package}-$(VERSION).tar.bz2.sha256
69 $(TOPDIR)/tmp/${package}-$(VERSION).tar.bz2:
70 rm -fr $(TOPDIR)/tmp
71 mkdir -p $(TOPDIR)/tmp/
72 git archive --format=tar --prefix=${package}-$(VERSION)/ $(BRANCH) | (cd $(TOPDIR)/tmp/ && tar xf -)
73 find $(TOPDIR)/tmp/${package}-$(VERSION) -type f -exec chmod ug+r {} \;
74 find $(TOPDIR)/tmp/${package}-$(VERSION) -type d -exec chmod ug+rx {} \;
75 perl -pi -e 's#^WIFI_RADAR_VERSION\s+=.*#WIFI_RADAR_VERSION = "${VERSION}"#' $(TOPDIR)/tmp/${package}-$(VERSION)/wifi-radar
76 chmod 755 $(TOPDIR)/tmp/${package}-$(VERSION)/wifi-radar
77 cd $(TOPDIR)/tmp && tar -ch ${package}-$(VERSION) | bzip2 > ${package}-$(VERSION).tar.bz2
78 cd $(TOPDIR)/tmp && chmod 644 ${package}-$(VERSION).tar.bz2
79 ls -l $(TOPDIR)/tmp/
81 dev-docs:
82 ~/inprogress/HappyDoc3-r3_1/happydoc -d docs/developer/ wifi-radar.py
84 changelog:
85 mkdir -p $(TOPDIR)/tmp/
86 git log | perl -pi -e 's/</&lt;/g; s/>/&gt;/g; s/@/@<!-- com.com -->/g;' > $(TOPDIR)/tmp/CHANGELOG
88 clean:
89 rm -f wifi-radar.localized
90 rm -fr tmp/
92 distclean: clean