yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #01460
[svn] r1859 - in trunk: . debian py
Author: eudoxos
Date: 2009-07-12 23:22:02 +0200 (Sun, 12 Jul 2009)
New Revision: 1859
Modified:
trunk/SConstruct
trunk/debian/control-template
trunk/debian/rules
trunk/py/SConscript
Log:
1. Various fixes related to generating debian packages
Modified: trunk/SConstruct
===================================================================
--- trunk/SConstruct 2009-07-12 08:39:34 UTC (rev 1858)
+++ trunk/SConstruct 2009-07-12 21:22:02 UTC (rev 1859)
@@ -159,6 +159,17 @@
for v in propagatedEnvVars:
if os.environ.has_key(v): env.Append(ENV={v:os.environ[v]})
+# get number of jobs from DEB_BUILD_OPTIONS if defined
+# see http://www.de.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
+if os.environ.has_key('DEB_BUILD_OPTIONS'):
+ for opt in os.environ['DEB_BUILD_OPTIONS'].split():
+ if opt.startswith('parallel='):
+ j=opt.split('=')[1]
+ print "Setting number of jobs (using DEB_BUILD_OPTIONS) to `%s'"%j
+ env['jobs']=int(j)
+
+
+
if sconsVersion>9700: opts.FormatOptionHelpText=lambda env,opt,help,default,actual,alias: "%10s: %5s [%s] (%s)\n"%(opt,actual,default,help)
else: opts.FormatOptionHelpText=lambda env,opt,help,default,actual: "%10s: %5s [%s] (%s)\n"%(opt,actual,default,help)
Help(opts.GenerateHelpText(env))
@@ -521,13 +532,16 @@
#################################################################################
## remove plugins that are in the target dir but will not be installed now
-toInstall=[str(node) for node in env.FindInstalledFiles()]
-for root,dirs,files in os.walk(env.subst('$PREFIX/lib/yade${SUFFIX}')):
- for f in files:
- ff=os.path.join(root,f)
- if ff not in toInstall and not ff.endswith('.pyo'):
- print "Deleting extra plugin", ff
- os.remove(ff)
+## only when installing without requesting special path (we would have no way
+## to know what should be installed overall.
+if not COMMAND_LINE_TARGETS:
+ toInstall=[str(node) for node in env.FindInstalledFiles()]
+ for root,dirs,files in os.walk(env.subst('$PREFIX/lib/yade${SUFFIX}')):
+ for f in files:
+ ff=os.path.join(root,f)
+ if ff not in toInstall and not ff.endswith('.pyo'):
+ print "Deleting extra plugin", ff
+ os.remove(ff)
#################################################################################
#### DOCUMENTATION
Modified: trunk/debian/control-template
===================================================================
--- trunk/debian/control-template 2009-07-12 08:39:34 UTC (rev 1858)
+++ trunk/debian/control-template 2009-07-12 21:22:02 UTC (rev 1859)
@@ -2,7 +2,7 @@
Section: x11
Priority: optional
Maintainer: Vaclav Smilauer <eudoxos@xxxxxxxx>
-Build-Depends: debhelper (>= 5), scons, libqt3-mt-dev, qt3-dev-tools, freeglut3-dev, libboost-dev (>=1.34), libboost-date-time-dev (>=1.34), libboost-filesystem-dev (>=1.34), libboost-thread-dev (>=1.34), libboost-regex-dev (>=1.34), libboost-python-dev (>=1.34), libboost-iostreams-dev (>=1.34), liblog4cxx9-dev, docbook-to-man, python-scientific, libsqlite3-dev, libgts-dev, g++(>4.0)
+Build-Depends: debhelper (>= 5), scons, libqt3-mt-dev, qt3-dev-tools, freeglut3-dev, libboost-dev (>=1.34), libboost-date-time-dev (>=1.34), libboost-filesystem-dev (>=1.34), libboost-thread-dev (>=1.34), libboost-regex-dev (>=1.34), libboost-python-dev (>=1.34), libboost-iostreams-dev (>=1.34), liblog4cxx9-dev | liblog4cxx10-dev, docbook-to-man, ipython, libsqlite3-dev, libgts-dev, python-numpy, g++(>4.0)
Standards-Version: 3.7.2
Package: yade@_VERSION@
Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules 2009-07-12 08:39:34 UTC (rev 1858)
+++ trunk/debian/rules 2009-07-12 21:22:02 UTC (rev 1859)
@@ -56,13 +56,13 @@
## files VERSION and _VERSION contain snapshot version without/with leading '-' respectively (like svn1113 and -svn1113)
### WARNING: !!!! with jobs>1, fakeroot may hang; 2 workarounds:
### (a) use fakeroot-tcp instead of fakeroot
- ### (b) say jobs=1
+ ### (b) use just 1 job
#debug build
- NO_SCONS_GET_RECENT= scons jobs=4 buildPrefix=debian runtimePREFIX=/usr version=${VERSION} features=GTS,python,log4cxx,openGL openmp=True exclude=realtime-rigidbody,mass-spring,snow,fem PREFIX=debian/yade${_VERSION}-dbg/usr variant=-dbg optimize=0 debug=1
+ NO_SCONS_GET_RECENT= scons buildPrefix=debian runtimePREFIX=/usr version=${VERSION} features=GTS,python,log4cxx,openGL openmp=True exclude=realtime-rigidbody,mass-spring,snow,fem PREFIX=debian/yade${_VERSION}-dbg/usr variant=-dbg optimize=0 debug=1
#optimized build
- NO_SCONS_GET_RECENT= scons jobs=4 PREFIX=debian/yade${_VERSION}/usr variant='' optimize=1 debug=0
+ NO_SCONS_GET_RECENT= scons PREFIX=debian/yade${_VERSION}/usr variant='' optimize=1 debug=0
#install platform-independent files (docs, scripts, examples)
- NO_SCONS_GET_RECENT= scons PREFIX=debian/yade${_VERSION}/usr debian/yade${_VERSION}/usr/share/doc/yade-${_VERSION}-doc
+ NO_SCONS_GET_RECENT= scons PREFIX=debian/yade${_VERSION}/usr debian/yade${_VERSION}/usr/share/doc/yade${_VERSION}-doc
Modified: trunk/py/SConscript
===================================================================
--- trunk/py/SConscript 2009-07-12 08:39:34 UTC (rev 1858)
+++ trunk/py/SConscript 2009-07-12 21:22:02 UTC (rev 1859)
@@ -10,9 +10,11 @@
env.SharedLibrary('_packPredicates',['_packPredicates.cpp'],SHLIBPREFIX='',
# if we compile with GTS, link to the python module, as inGtsSurface uses some of its symbols.
# because the module doesn't have the lib- suffix, we put it directly to SHLINKFLAGS
- # using the -l: syntax (see man ld) and declare the dependency below
- SHLINKFLAGS=env['SHLINKFLAGS']+(['-l:$PREFIX/lib/yade$SUFFIX/py/gts/_gts.so'] if 'GTS' in env['features'] else []),
- RPATH=env['RPATH']+(['$PREFIX/lib/yade$SUFFIX/py/gts'] if 'GTS' in env['features'] else []),
+ # using the -l: syntax (see man ld); we further have to add a special LIBDIR (for link-time lookup)
+ # and RPATH (for run-time lookup)
+ SHLINKFLAGS=env['SHLINKFLAGS']+(['-l:_gts.so'] if 'GTS' in env['features'] else []),
+ LIBPATH=env['LIBPATH']+(['$PREFIX/lib/yade$SUFFIX/py/gts'] if 'GTS' in env['features'] else []),
+ RPATH=env['RPATH']+(['$runtimePREFIX/lib/yade$SUFFIX/py/gts'] if 'GTS' in env['features'] else []),
),
env.SharedLibrary('_packSpheres',['_packSpheres.cpp'],SHLIBPREFIX='',LIBS=env['LIBS']+['Shop']),
env.File('utils.py'),