← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2291: 1. Port packaging changes from the 0.50 branch

 

------------------------------------------------------------
revno: 2291
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Sun 2010-06-13 23:28:46 +0200
message:
  1. Port packaging changes from the 0.50 branch
modified:
  debian/control-template
  debian/rules
  py/__init__.py.in
  scripts/debian-packages
  scripts/debian-prep


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'debian/control-template'
--- debian/control-template	2010-06-12 20:39:00 +0000
+++ debian/control-template	2010-06-13 21:28:46 +0000
@@ -2,7 +2,7 @@
 Section: x11
 Priority: optional
 Maintainer: Václav Šmilauer <eudoxos@xxxxxxxx>
-Build-Depends: debhelper (>= 5), scons, libqt3-mt-dev, qt3-dev-tools, freeglut3-dev, libboost-dev (>=1.35), libboost-date-time-dev (>=1.35), libboost-filesystem-dev (>=1.35), libboost-thread-dev (>=1.35), libboost-regex-dev (>=1.35), libboost-python-dev (>=1.35), libboost-iostreams-dev (>=1.35), libboost-program-options-dev, libboost-serialization-dev, liblog4cxx9-dev | liblog4cxx10-dev, docbook-to-man, ipython, libsqlite3-dev, libgts-dev, python-numpy, g++(>>4.0), libvtk5-dev, libgl1-mesa-dev, gdb, ipython, python-matplotlib, python-tk, libeigen2-dev @', libqglviewer-qt3-dev' if DISTRIBUTION!='hardy' else ''@ @', binutils-gold' if DISTRIBUTION not in ('hardy','intrepid','jaunty','lenny') else ''@ @', texlive-latex-recommended, texlive-latex-pictures, texlive-xetex, python-sphinx, python-bibtex' if DISTRIBUTION not in ('hardy','intrepid','jaunty','lenny') else ''@
+Build-Depends: debhelper (>= 5), scons, libqt3-mt-dev, qt3-dev-tools, freeglut3-dev, libboost-dev (>=1.35), libboost-date-time-dev (>=1.35), libboost-filesystem-dev (>=1.35), libboost-thread-dev (>=1.35), libboost-regex-dev (>=1.35), libboost-python-dev (>=1.35), libboost-iostreams-dev (>=1.35), libboost-program-options-dev, libboost-serialization-dev, liblog4cxx9-dev | liblog4cxx10-dev, docbook-to-man, ipython, libsqlite3-dev, libgts-dev, python-numpy, g++(>>4.0), libvtk5-dev, libgl1-mesa-dev, gdb, ipython, python-matplotlib, python-tk, libeigen2-dev @', libqglviewer-qt3-dev' if DISTRIBUTION!='hardy' else ''@ @', binutils-gold' if DISTRIBUTION not in ('hardy','intrepid','jaunty','lenny') else ''@ @', texlive-latex-recommended, texlive-latex-extra, lmodern, texlive-pictures, texlive-xetex, python-sphinx, python-bibtex' if DISTRIBUTION not in ('hardy','intrepid','jaunty','lenny') else ''@
 Standards-Version: 3.7.2
 
 Package: yade@_VERSION@

=== modified file 'debian/rules'
--- debian/rules	2010-06-12 20:39:00 +0000
+++ debian/rules	2010-06-13 21:28:46 +0000
@@ -51,7 +51,7 @@
 	###   (a) use fakeroot-tcp instead of fakeroot
 	###   (b) use just 1 job
 	#debug build
-	NO_SCONS_GET_RECENT= scons profile=deb buildPrefix=debian runtimePREFIX=/usr version=${VERSION} brief=0 chunkSize=30 jobs=3 linkStrategy=monolithic features=vtk,gts,opengl,openmp PREFIX=debian/yade${_VERSION}-dbg/usr variant=-dbg optimize=0 march= debug=1 CPPPATH=/usr/include/vtk-5.0:/usr/include/vtk-5.2:/usr/include/vtk-5.4:/usr/include/eigen2
+	NO_SCONS_GET_RECENT= scons profile=deb buildPrefix=debian runtimePREFIX=/usr version=${VERSION} brief=0 chunkSize=2 jobs=1 linkStrategy=monolithic features=vtk,gts,opengl,openmp PREFIX=debian/yade${_VERSION}-dbg/usr variant=-dbg optimize=0 march= debug=1 CPPPATH=/usr/include/vtk-5.0:/usr/include/vtk-5.2:/usr/include/vtk-5.4:/usr/include/eigen2
 	#optimized build
 	NO_SCONS_GET_RECENT= scons profile=deb PREFIX=debian/yade${_VERSION}/usr variant='' optimize=1 debug=0
 	#install platform-independent files (docs, scripts, examples)

=== modified file 'py/__init__.py.in'
--- py/__init__.py.in	2010-06-12 20:39:00 +0000
+++ py/__init__.py.in	2010-06-13 21:28:46 +0000
@@ -36,7 +36,7 @@
 import os,os.path
 import config
 libDir=(config.prefix if not os.environ.has_key('YADE_PREFIX') else os.environ['YADE_PREFIX'])+'/lib/yade'+config.suffix
-libDir=os.path.abspath(libDir) # for cases where YADE_PREFIX is relative
+libDir=os.path.abspath(libDir) # needed if YADE_PREFIX is a relative path
 # find plugins recursively
 plugins=[]
 # might add followlinks=True to os.walk, for python>=2.6

=== modified file 'scripts/debian-packages'
--- scripts/debian-packages	2010-06-06 10:23:35 +0000
+++ scripts/debian-packages	2010-06-13 21:28:46 +0000
@@ -3,21 +3,27 @@
 # copy this script to a clean directory and run
 set -e -x
 
-RELEASE="0.50rc1" # version we are preparing packages for
+RELEASE="0.50" # version we are preparing packages for
+UPDATE=.1 # empty or number such as .1, .2 (package yade-0.50, but verion 0.50.1)
 KEYID=62A21250  # key ID of the creator (password will be asked)
-DISTS="hardy karmic lucid"
+DISTS="lucid" # distributions for which packages will be built and uploaded 
+BASE="/home/vaclav/yade/yade-0.50" # base branch to clean checkout from
 
 TOP=`pwd`
-[ -d yade-$RELEASE.bzr ] || bzr co --lightweight lp:yade yade-$RELEASE.bzr
-rm -rf yade-$RELEASE; cp -r yade-$RELEASE.bzr yade-$RELEASE; rm -rf yade-$RELEASE/.bzr
-tar -c yade-$RELEASE | gzip > yade-${RELEASE}_$RELEASE.orig.tar.gz
+[ -d yade-$RELEASE.bzr ] || bzr co --lightweight $BASE yade-$RELEASE.bzr
+rm -rf yade-$RELEASE; cp -r yade-$RELEASE.bzr yade-$RELEASE; rm -rf yade-$RELEASE/.bzr yade-$RELEASE/attic
+# temporarily disabled to used downloaded .orig.tar.gz from previous upload
+# tar -c yade-$RELEASE | gzip > yade-${RELEASE}_$RELEASE$UPDATE.orig.tar.gz
 cd yade-$RELEASE
 echo $RELEASE > RELEASE
+echo $UPDATE > UPDATE
 NPKGS=0 # track number of packages; the first one will have source included
 for DIST in $DISTS; do
 	scripts/debian-prep $DIST
+	# temporary fix for debian package version update
+	perl -pi -e 's/lucid1/lucid6/g' debian/changelog
 	if [ $NPKGS -eq 0 ]; then
-		UPLOAD=-sa # the first package is uploaded with upstream source
+		UPLOAD=-sd # the first package is uploaded with upstream source
 	else
 		UPLOAD=-sd
 	fi
@@ -27,10 +33,7 @@
 
 cd $TOP
 
-for CHANGES in `ls -tr yade-${RELEASE}_$RELEASE-*_source.changes`; do
+for CHANGES in `ls -tr yade-${RELEASE}_$RELEASE$UPDATE-*_source.changes`; do
 	dput ppa:yade-users/ppa $CHANGES
 done
 
-
-
-

=== modified file 'scripts/debian-prep'
--- scripts/debian-prep	2010-06-07 14:03:19 +0000
+++ scripts/debian-prep	2010-06-13 21:28:46 +0000
@@ -4,17 +4,21 @@
 DISTRIBUTION=sys.argv[1] if len(sys.argv)>1 else 'unstable'
 if os.path.exists('RELEASE'):
 	VERSION=file('RELEASE').readline().strip()
+	UPDATE=(file('UPDATE').readline().strip() if os.path.exists('UPDATE') else '')
+	print 'UPDATE is %s'%UPDATE
 	SNAPSHOT=''
 	PRIORITY=int(10000*float(re.sub('[^0-9.]','',VERSION)))
 	if re.match('^.*beta',VERSION): PRIORITY-=100
 	if re.match('^.*rc[0-9]$',VERSION): PRIORITY-=100
+	if UPDATE: PRIORITY+=int(re.sub('[^0-9]','',UPDATE))
 elif os.path.exists('.bzr'):
 	VERSION='bzr'+os.popen("LC_ALL=C bzr revno 2>/dev/null").readlines()[0][:-1]
 	SNAPSHOT='-snapshot'
 	PRIORITY=int(re.sub('[^0-9]','',VERSION))
+	UPDATE=''
 else:
 	raise RuntimeError('Revision could not be determined (RELEASE or .bzr)')
-print 'version %s%s, priority %d'%(VERSION,SNAPSHOT,PRIORITY)
+print 'version %s%s%s, priority %d'%(VERSION,SNAPSHOT,('%s%s'%(VERSION,UPDATE) if UPDATE else ''),PRIORITY)
 open('VERSION','w').write(VERSION+'\n')
 _VERSION='-'+VERSION #used in templates
 
@@ -32,14 +36,16 @@
 	('control-template','control')]:
 		copyReplace('debian/'+f1,'debian/'+f2)
 
+# package is yade-0.50, but with UPDATE .1, it is version 0.50.1
+
 # write debian/changelog
 open('debian/changelog','w').write(
-'''yade-%s (%s-%s1) %s; urgency=low
+'''yade-%s (%s%s-%s1) %s; urgency=low
 
   * Automatic debian changelog entry for yade-%s
 
  -- Václav Šmilauer <eudoxos@xxxxxxxx>  %s
-'''%(VERSION,VERSION,DISTRIBUTION,DISTRIBUTION,VERSION,time.strftime("%a, %d %b %Y %H:%M:%S +0000",time.gmtime())))
+'''%(VERSION,VERSION,UPDATE,DISTRIBUTION,DISTRIBUTION,VERSION,time.strftime("%a, %d %b %Y %H:%M:%S +0000",time.gmtime())))
 
 # remove some generated files
 for p in ('doc/doxygen','doc/sphinx/_build','tags'):