[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r23827: {arm} More changes for the deb: purging egg-info from the debian b (in arm: resources resources/build/debian trunk)



Author: atagar
Date: 2010-11-18 16:21:55 +0000 (Thu, 18 Nov 2010)
New Revision: 23827

Modified:
   arm/resources/build/debian/control
   arm/resources/deb-prep.sh
   arm/trunk/setup.py
Log:
More changes for the deb:
purging egg-info from the debian build
revising path in the man page for docs to reflect debian's special location for them
upping the Standards-Version



Modified: arm/resources/build/debian/control
===================================================================
--- arm/resources/build/debian/control	2010-11-18 15:50:31 UTC (rev 23826)
+++ arm/resources/build/debian/control	2010-11-18 16:21:55 UTC (rev 23827)
@@ -3,7 +3,7 @@
 Priority: extra
 Maintainer: Damian Johnson (www.atagar.com) <atagar1@xxxxxxxxx>
 Build-Depends: debhelper (>= 5), python-support (>= 0.6), cdbs (>= 0.4.49), python
-Standards-Version: 3.8.3
+Standards-Version: 3.9.1
 Homepage: http://www.atagar.com/arm
 
 Package: tor-arm

Modified: arm/resources/deb-prep.sh
===================================================================
--- arm/resources/deb-prep.sh	2010-11-18 15:50:31 UTC (rev 23826)
+++ arm/resources/deb-prep.sh	2010-11-18 16:21:55 UTC (rev 23827)
@@ -8,6 +8,12 @@
 # tar czf tor-arm_1.3.7.orig.tar.gz --exclude-vcs --exclude="*.pyc" -v release
 
 svn export release release_build
+
+# edits the man page path for the sample armrc to reflect where it's located
+# on debian:
+# /usr/share/doc/arm/armrc.sample -> /usr/share/doc/tor-arm/armrc.sample.gz
+sed -i 's/\/usr\/share\/doc\/arm\/armrc.sample/\/usr\/share\/doc\/tor-arm\/armrc.sample.gz/g' release_build/arm.1
+
 tar czf tor-arm_1.3.7.orig.tar.gz release_build
 svn export resources/build/debian release_build/debian
 

Modified: arm/trunk/setup.py
===================================================================
--- arm/trunk/setup.py	2010-11-18 15:50:31 UTC (rev 23826)
+++ arm/trunk/setup.py	2010-11-18 16:21:55 UTC (rev 23827)
@@ -5,6 +5,13 @@
 from src.version import VERSION
 from distutils.core import setup
 
+# When we're running the install target as a deb we do the following:
+# - use 'tor-arm' instead of 'arm' in the path for the sample armrc
+# - account for the debian build prefix when removing the egg-info
+
+isDebInstall = "--install-layout=deb" in sys.argv
+docPath = "/usr/share/doc/%s" % ("tor-arm" if isDebInstall else "arm")
+
 # Provides the configuration option to install to "/usr/share" rather than as a
 # python module. Alternatives are to either provide this as an input argument
 # (not an option for deb/rpm builds) or add a setup.cfg with:
@@ -28,17 +35,13 @@
   manOutputFile.write(manContents)
   manOutputFile.close()
   
+  # places in tmp rather than a relative path to avoid having this copy appear
+  # in the deb and rpm builds
   manFilename = "/tmp/arm.1.gz"
 except IOError, exc:
   print "Unable to compress man page: %s" % exc
   manFilename = "arm.1"
 
-# if this is placing resources for debian then the sample armrc should go in
-# tor-arm instead of arm
-docPath = "/usr/share/doc/"
-if "--install-layout=deb" in sys.argv: docPath += "tor-arm"
-else: docPath += "arm"
-
 setup(name='arm',
       version=VERSION,
       description='Terminal tor status monitor',
@@ -64,6 +67,8 @@
 # bypass its creation.
 # TODO: not sure how to remove this from the deb build too...
 eggPath = '/usr/share/arm-%s.egg-info' % VERSION
+if isDebInstall: eggPath = "./debian/tor-arm" + eggPath
+
 if os.path.isfile(eggPath):
   if "-q" not in sys.argv: print "Removing %s" % eggPath
   os.remove(eggPath)