maemo: New upstream release.
[strongswan.git] / packages / maemo-strongswan / Makefile
1 SOURCE:=../../
2 BUILD:=build
3 VERSION:=$(shell sed -n 's/AC_INIT(.*,\s*\(.*\))/\1/p' $(SOURCE)/configure.in)
4 TARGETVERSION:=$(VERSION)
5 ORIGNAME:=strongswan-$(VERSION)
6 ORIGSRC:=$(BUILD)/strongswan_$(TARGETVERSION).orig.tar.gz
7
8 package: prepare
9 cd $(BUILD)/$(ORIGNAME) && \
10 dpkg-buildpackage -rfakeroot -sa > /dev/null
11
12 source: prepare
13 cd $(BUILD)/$(ORIGNAME) && \
14 dpkg-buildpackage -rfakeroot -sa -S > /dev/null
15
16 prepare: $(ORIGSRC)
17 rm -Rf $(BUILD)/$(ORIGNAME)
18 tar -zx -C $(BUILD) -f $(ORIGSRC)
19 debchange -b -v $(TARGETVERSION)-1
20 cp -R debian $(BUILD)/$(ORIGNAME)
21
22 $(ORIGSRC): $(SOURCE)/Makefile | $(BUILD)
23 make -j -C $(SOURCE) dist-gzip > /dev/null
24 mv $(SOURCE)/$(ORIGNAME).tar.gz $(ORIGSRC)
25
26 $(SOURCE)/Makefile: $(SOURCE)/configure
27 cd $(SOURCE) && ./configure --disable-gmp > /dev/null
28
29 $(SOURCE)/configure: $(SOURCE)/configure.in
30 cd $(SOURCE) && ./autogen.sh > /dev/null
31
32 $(BUILD):
33 mkdir -p $(BUILD)
34
35 clean:
36 rm -Rf $(BUILD)
37
38 .PHONY: package source prepare clean