maemo: Adding Makefiles to build Debian packages.
authorTobias Brunner <tobias@strongswan.org>
Fri, 4 Feb 2011 16:58:55 +0000 (17:58 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 4 Feb 2011 17:02:49 +0000 (18:02 +0100)
packages/maemo-applet/Makefile [new file with mode: 0644]
packages/strongswan-maemo/Makefile [new file with mode: 0644]

diff --git a/packages/maemo-applet/Makefile b/packages/maemo-applet/Makefile
new file mode 100644 (file)
index 0000000..1aa9feb
--- /dev/null
@@ -0,0 +1,31 @@
+SOURCE:=../../src/frontends/maemo
+BUILD:=build
+VERSION:=$(shell sed -n 's/AC_INIT(.*,\s*\(.*\))/\1/p' $(SOURCE)/configure.ac)
+TARGETVERSION:=$(VERSION)
+ORIGNAME:=strongswan-applet-$(VERSION)
+ORIGSRC:=$(BUILD)/strongswan-applet_$(TARGETVERSION).orig.tar.gz
+
+package: $(ORIGSRC)
+       debchange -b -v $(TARGETVERSION)-1
+       cp -R debian $(BUILD)/$(ORIGNAME)
+       cd $(BUILD)/$(ORIGNAME) && \
+       dpkg-buildpackage -rfakeroot -sa > /dev/null
+
+$(ORIGSRC): $(SOURCE)/Makefile | $(BUILD)
+       make -j -C $(SOURCE) dist-gzip > /dev/null
+       mv $(SOURCE)/$(ORIGNAME).tar.gz $(ORIGSRC)
+       tar -zx -C $(BUILD) -f $(ORIGSRC)
+
+$(SOURCE)/Makefile: $(SOURCE)/configure
+       cd $(SOURCE) && ./configure > /dev/null
+
+$(SOURCE)/configure: $(SOURCE)/configure.ac
+       cd $(SOURCE) && ./autogen.sh > /dev/null
+
+$(BUILD):
+       mkdir -p $(BUILD)
+
+clean:
+       rm -Rf $(BUILD)
+
+.PHONY:        package clean
diff --git a/packages/strongswan-maemo/Makefile b/packages/strongswan-maemo/Makefile
new file mode 100644 (file)
index 0000000..b8a8a51
--- /dev/null
@@ -0,0 +1,31 @@
+SOURCE:=../../
+BUILD:=build
+VERSION:=$(shell sed -n 's/AC_INIT(.*,\s*\(.*\))/\1/p' $(SOURCE)/configure.in)
+TARGETVERSION:=$(VERSION)
+ORIGNAME:=strongswan-$(VERSION)
+ORIGSRC:=$(BUILD)/strongswan_$(TARGETVERSION).orig.tar.gz
+
+package: $(ORIGSRC)
+       debchange -b -v $(TARGETVERSION)-1
+       cp -R debian $(BUILD)/$(ORIGNAME)
+       cd $(BUILD)/$(ORIGNAME) && \
+       dpkg-buildpackage -rfakeroot -sa > /dev/null
+
+$(ORIGSRC): $(SOURCE)/Makefile | $(BUILD)
+       make -j -C $(SOURCE) dist-gzip > /dev/null
+       mv $(SOURCE)/$(ORIGNAME).tar.gz $(ORIGSRC)
+       tar -zx -C $(BUILD) -f $(ORIGSRC)
+
+$(SOURCE)/Makefile: $(SOURCE)/configure
+       cd $(SOURCE) && ./configure --disable-gmp > /dev/null
+
+$(SOURCE)/configure: $(SOURCE)/configure.in
+       cd $(SOURCE) && ./autogen.sh > /dev/null
+
+$(BUILD):
+       mkdir -p $(BUILD)
+
+clean:
+       rm -Rf $(BUILD)
+
+.PHONY:        package clean