maemo: Adding Makefiles to build Debian packages.
[strongswan.git] / packages / maemo-applet / Makefile
1 SOURCE:=../../src/frontends/maemo
2 BUILD:=build
3 VERSION:=$(shell sed -n 's/AC_INIT(.*,\s*\(.*\))/\1/p' $(SOURCE)/configure.ac)
4 TARGETVERSION:=$(VERSION)
5 ORIGNAME:=strongswan-applet-$(VERSION)
6 ORIGSRC:=$(BUILD)/strongswan-applet_$(TARGETVERSION).orig.tar.gz
7
8 package: $(ORIGSRC)
9 debchange -b -v $(TARGETVERSION)-1
10 cp -R debian $(BUILD)/$(ORIGNAME)
11 cd $(BUILD)/$(ORIGNAME) && \
12 dpkg-buildpackage -rfakeroot -sa > /dev/null
13
14 $(ORIGSRC): $(SOURCE)/Makefile | $(BUILD)
15 make -j -C $(SOURCE) dist-gzip > /dev/null
16 mv $(SOURCE)/$(ORIGNAME).tar.gz $(ORIGSRC)
17 tar -zx -C $(BUILD) -f $(ORIGSRC)
18
19 $(SOURCE)/Makefile: $(SOURCE)/configure
20 cd $(SOURCE) && ./configure > /dev/null
21
22 $(SOURCE)/configure: $(SOURCE)/configure.ac
23 cd $(SOURCE) && ./autogen.sh > /dev/null
24
25 $(BUILD):
26 mkdir -p $(BUILD)
27
28 clean:
29 rm -Rf $(BUILD)
30
31 .PHONY: package clean