summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-06-25 19:21:40 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-06-25 19:21:40 (GMT)
commit87611d97377d907d115afd3721dabd5abbbf0e26 (patch)
tree193a0a933102f23c179553132ccc925941a65721
parentb81be3bdd0fabeb448da988c92743b8cb8b9073b (diff)
downloadswift-87611d97377d907d115afd3721dabd5abbbf0e26.zip
swift-87611d97377d907d115afd3721dabd5abbbf0e26.tar.bz2
Adding support for deb packaging.
-rw-r--r--Makefile2
-rwxr-xr-xSwift/Packaging/Debian/Makefile.inc24
-rw-r--r--Swift/Packaging/Debian/control10
3 files changed, 35 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4434a2e..9c71c56 100644
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ ifeq ($(BUILD_SWIFT),yes)
include Swift/Makefile.inc
endif
include QA/Makefile.inc
-
+include Swift/Packaging/Debian/Makefile.inc
################################################################################
# Main targets
################################################################################
diff --git a/Swift/Packaging/Debian/Makefile.inc b/Swift/Packaging/Debian/Makefile.inc
new file mode 100755
index 0000000..b54a9f1
--- /dev/null
+++ b/Swift/Packaging/Debian/Makefile.inc
@@ -0,0 +1,24 @@
+DATE=`date +%Y%m%d`
+SIZE=`du -s tmpusr/usr | awk '{print $1}'`
+VERSION=0.3.$DATE
+ARCH=amd64
+DEBPATH=Swift/Packaging/Debian
+DEBNAME=swift-preview_$(VERSION)-$(ARCH).deb
+$(DEBPATH)/$(DEBNAME): all
+ echo "Removing old package files"
+ rm -rf $(DEBPATH)/tmpusr
+ mkdir -p $(DEBPATH)/tmpusr/usr/bin
+ mkdir $(DEBPATH)/tmpusr/DEBIAN
+
+ echo "Building fake filesystem"
+ cp Swift/QtUI/swift $(DEBPATH)/tmpusr/usr/bin
+
+ echo "Populating debian control scripts"
+ cat $(DEBPATH)/control | sed -e"s/\%ARCH\%/$ARCH/" -e"s/\%VERSION\%/$VERSION/" -e"s/\%SIZE\%/$SIZE/" > $(DEBPATH)/tmpusr/DEBIAN/control
+
+ echo "Building package"
+ dpkg -b $(DEBPATH)tmpusr $(DEBPATH)/$(DEBNAME)
+
+deb: $(DEBPATH)/$(DEBNAME)
+
+.PHONY: deb
diff --git a/Swift/Packaging/Debian/control b/Swift/Packaging/Debian/control
new file mode 100644
index 0000000..b30ae9e
--- /dev/null
+++ b/Swift/Packaging/Debian/control
@@ -0,0 +1,10 @@
+Package: swift
+Version: %VERSION%
+Section: network
+Priority: optional
+Architecture: %ARCH%
+Depends: libqt4-webkit, libqt4-core, libqt4-gui
+Installed-Size: %SIZE%
+Maintainer: Swift [http://swift.im]
+Provides: swift
+Description: XMPP Client