various tweaks for debian
Thierry Parmentelat [Wed, 16 Jan 2013 14:43:17 +0000 (15:43 +0100)]
Makefile
Makefile.debian
debian/changelog [deleted file]
debian/changelog.in [new file with mode: 0644]
debian/control
debian/copyright [new file with mode: 0644]
debian/source/format [new file with mode: 0644]
setup.py

index 013d83b..1d15c40 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,6 +64,8 @@ wsdl-clean:
 ##########
 debian: version
        $(MAKE) -f Makefile.debian
+debian.clean: 
+       $(MAKE) -f Makefile.debian clean
 
 ##########
 tests-install:
index 1a48318..0ff8bac 100644 (file)
@@ -2,37 +2,27 @@ PROJECT=sfa
 PYTHON=python
 DESTDIR=/
 SETUPOPTS=
+VERSION=$(shell python -c "from sfa.util.version import version_tag; print version_tag" | sed -e s,-,.,)
+DATE=$(shell date -u +"%a, %d %b %Y %T")
 
-all: builddeb 
+debian: sourcedeb pkgdeb
 
-source:
-       $(PYTHON) setup.py sdist $(SETUPOPTS)
-
-install:
-       $(PYTHON) setup.py install --root $(DESTDIR) $(SETUPOPTS)
-
-#buildrpm:
-#      $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
+force:
 
 # build the source package in the parent directory
 # then rename it to project_version.orig.tar.gz as expected for debian packaging
 # finally build the package
-builddeb:
-       rm -f sfaadmin sfascan sfi  
-       $(PYTHON) setup.py sdist $(SETUPOPTS)  --formats=gztar --dist-dir=../ --prune
-       rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
+sourcedeb: force
+       rm -f sfaadmin sfascan sfi
+       sed -e "s|@VERSION@|$(VERSION)|" -e "s|@DATE@|$(DATE)|" debian/changelog.in > debian/changelog
+       $(PYTHON) setup.py sdist $(SETUPOPTS) --formats=gztar --dist-dir=../ --prune
+       rename -f 's/$(PROJECT)-(.*)-(.*)\.tar\.gz/$(PROJECT)_$$1.$$2\.orig\.tar\.gz/' ../*
+
+pkgdeb:
        dpkg-buildpackage -i -I -rfakeroot
 
-clean:
-       $(PYTHON) setup.py clean
-       $(MAKE) -f $(CURDIR)/debian/rules clean
-       rm -rf build/ MANIFEST
+debian.clean clean:
+       -$(PYTHON) setup.py clean
+       $(MAKE) -f debian/rules clean
+       rm -rf build/ MANIFEST ../*.tar.gz ../*.dsc ../*.build
        find . -name '*.pyc' -delete
-
-help:
-       @echo "make source - Create source package"
-       @echo "make install - Install on local system"
-#      @echo "make buildrpm - Generate an rpm package"
-       @echo "make builddeb - Generate a deb package"
-       @echo "make clean - Get rid of scratch and byte files"
-
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644 (file)
index 5e538ac..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-sfa (0.2.0) UNRELEASED; urgency=low
-
-  * Initial release. (Closes: #XXXXXX)
-
- -- Jordan Augé <jordan.auge@lip6.fr>  Tue, 12 Jun 2012 17:22:18 +0300
diff --git a/debian/changelog.in b/debian/changelog.in
new file mode 100644 (file)
index 0000000..381dc15
--- /dev/null
@@ -0,0 +1,5 @@
+sfa (@VERSION@) UNRELEASED; urgency=low
+
+  * Initial release. 
+
+ -- Thierry Parmentelat <thierry.parmentelat@inria.fr>  @DATE@ +0000
index d6b7182..ea14718 100644 (file)
@@ -1,13 +1,11 @@
 Source: sfa
+Maintainer: Thierry Parmentelat <Thierry.Parmentelat@inria.fr>
 Section: misc
 Priority: optional
-Maintainer: Jordan Augé <jordan.auge@lip6.fr>
+Standards-Version: 3.9.2
 Build-Depends: debhelper (>=7.0.50~), debconf, dpatch
-Homepage: http://www.joomla.org
-Standards-Version: 3.9.3.1
 
 Package: sfa
-Architecture: all
+Architecture: any
 Depends: python-openssl, python-m2crypto, python-dateutil
-Description: SFA
- SFA
+Description: Slice Facility Architecture, generic implementation derived from PlanetLab
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
index e9a3429..239820d 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -48,6 +48,7 @@ packages = [
     'sfatables/processors',
     ]
 
+# need to do something about functions
 initscripts = [ 'functions', 'sfa', 'sfa-cm' ]
 
 data_files = [ ('/etc/sfa/', [ 'config/aggregates.xml',
@@ -108,5 +109,8 @@ else:
           packages = packages, 
           data_files = data_files,
           scripts = scripts,
+          url="http://svn.planet-lab.org/wiki/SFATutorial",
+          author="Thierry Parmentelat, Tony Mack, Scott Baker",
+          author_email="thierry.parmentelat@inria.fr, tmack@princeton.cs.edu, smbaker@gmail.com",
           version=version_tag)