[or-cvs] r23092: {arm} added: uninstaller script change: checking prereqs before in (in arm/trunk: . debian src)

Damian Johnson atagar1 at gmail.com
Mon Aug 30 16:29:04 UTC 2010


Author: atagar
Date: 2010-08-30 16:29:04 +0000 (Mon, 30 Aug 2010)
New Revision: 23092

Added:
   arm/trunk/debian/make-deb
   arm/trunk/src/uninstall
Removed:
   arm/trunk/Makefile
Modified:
   arm/trunk/arm
   arm/trunk/debian/changelog
   arm/trunk/debian/control
   arm/trunk/debian/copyright
   arm/trunk/debian/rules
   arm/trunk/install
   arm/trunk/setup.cfg
   arm/trunk/setup.py
Log:
added: uninstaller script
change: checking prereqs before installing
fix: resolved remaining lintian issues, and debs can now be generated via debian/make-deb



Deleted: arm/trunk/Makefile
===================================================================
--- arm/trunk/Makefile	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/Makefile	2010-08-30 16:29:04 UTC (rev 23092)
@@ -1,33 +0,0 @@
-PYTHON=`which python`
-DESTDIR=/
-BUILDIR=$(CURDIR)/debian/arm
-PROJECT=arm
-MANPAGE=arm.1
-
-all:
-	@echo "Nothing to see here"
-
-source:
-	$(PYTHON) setup.py sdist $(COMPILE)
-
-install:
-	$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
-	test -d $(DESTDIR)/usr/share/man/man1/ || mkdir -p $(DESTDIR)/usr/share/man/man1/
-	cp $(MANPAGE) $(DESTDIR)/usr/share/man/man1/
-
-
-deb:
-	dpkg-buildpackage -rfakeroot -us -uc -I.svn -i.svn -I.pyc -i.pyc
-
-deb-src:
-	dpkg-buildpackage -S -rfakeroot -us -uc -I.svn -i.svn -I.pyc -i.pyc
-
-deb-clean:
-	-rm -r build
-	debian/rules clean
-
-clean:
-	fakeroot $(PYTHON) setup.py clean
-	fakeroot $(MAKE) -f $(CURDIR)/debian/rules clean
-	rm -rf build/ MANIFEST
-	find . -name '*.pyc' -delete

Modified: arm/trunk/arm
===================================================================
--- arm/trunk/arm	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/arm	2010-08-30 16:29:04 UTC (rev 23092)
@@ -1,15 +1,13 @@
 #!/bin/sh
-if [ $0 = /usr/bin/arm ]
-then
-  arm_base=/usr/arm/
+if [ $0 = /usr/bin/arm ]; then
+  arm_base=/usr/lib/arm/
 else
   arm_base=src/
 fi
 
 python ${arm_base}prereq.py
 
-if [ $? = 0 ]
-then
+if [ $? = 0 ]; then
   python -W ignore::DeprecationWarning ${arm_base}starter.py $*
 fi
 

Modified: arm/trunk/debian/changelog
===================================================================
--- arm/trunk/debian/changelog	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/debian/changelog	2010-08-30 16:29:04 UTC (rev 23092)
@@ -1,5 +1,5 @@
-tor-arm (0.1) unstable; urgency=low
+tor-arm (0.3.6) unstable; urgency=low
 
-  * Initial Release.
+  * Initial release.
 
- -- Damian Johnson <atagar at torproject.org>  Wed, 09 Jun 2010 00:41:55 +0200
+ -- Damian Johnson <atagar at torproject.org>  Mon, 30 Aug 2010 08:13:43 -0700

Modified: arm/trunk/debian/control
===================================================================
--- arm/trunk/debian/control	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/debian/control	2010-08-30 16:29:04 UTC (rev 23092)
@@ -3,12 +3,12 @@
 Priority: extra
 Maintainer: Damian Johnson <atagar at torproject.org>
 Build-Depends: debhelper (>= 5), python-support (>= 0.6), cdbs (>= 0.4.49), python-dev
-Standards-Version: 3.8.4.0
+Standards-Version: 3.8.3
 Homepage: http://www.atagar.com/arm
 
 Package: tor-arm
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, python, lsb-base (>= 3.0-6)
+Depends: ${misc:Depends}, ${python:Depends}
 Suggests: tor
 Description: Terminal tor status monitor
  The anonymizing relay monitor (arm) is a terminal status monitor for Tor

Modified: arm/trunk/debian/copyright
===================================================================
--- arm/trunk/debian/copyright	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/debian/copyright	2010-08-30 16:29:04 UTC (rev 23092)
@@ -1,7 +1,7 @@
 This package was debianized by Damian Johnson <atagar at torproject.org>
 Tue, 08 Jun 2010 19:06:24 +0200
 
-It was downloaded from: https://www.torproject.org/arm/
+It was downloaded from: http://www.atagar.com/arm
 
 Upstream Authors:
                     Damian Johnson <atagar at torproject.org>
@@ -9,5 +9,19 @@
 Copyright:
     Copyright (C) 2010 by Damian Johnson <atagar at torproject.org>
 
-License:
-    GPLv3 (http://www.gnu.org/licenses/gpl.html)
+License: GPL
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 3 of the License.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, see .
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-3'.
+

Added: arm/trunk/debian/make-deb
===================================================================
--- arm/trunk/debian/make-deb	                        (rev 0)
+++ arm/trunk/debian/make-deb	2010-08-30 16:29:04 UTC (rev 23092)
@@ -0,0 +1,19 @@
+#!/bin/sh
+debuild -I.svn -i.svn -I.pyc -i.pyc
+
+# cleans up after deb build
+files="build debian/tor-arm debian/python-module-stampdir debian/tor-arm.debhelper.log debian/files debian/tor-arm.substvars"
+
+for i in $files 
+do
+  if [ -f $i -o -d $i ]; then
+    rm -rf $i
+    
+    if [ $? = 0 ]; then
+      echo "removed $i"
+    else
+      exit 1
+    fi
+  fi
+done
+


Property changes on: arm/trunk/debian/make-deb
___________________________________________________________________
Added: svn:executable
   + *

Modified: arm/trunk/debian/rules
===================================================================
--- arm/trunk/debian/rules	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/debian/rules	2010-08-30 16:29:04 UTC (rev 23092)
@@ -19,5 +19,6 @@
 binary-arch:
 	echo "nothing to binary-arch build"
 
-#clean:
-#	dh_clean $(call cdbs_add_dashx,$(DEB_CLEAN_EXCLUDE))
+clean::
+	dh_clean
+

Modified: arm/trunk/install
===================================================================
--- arm/trunk/install	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/install	2010-08-30 16:29:04 UTC (rev 23092)
@@ -1,3 +1,8 @@
 #!/bin/sh
-python setup.py install
+python src/prereq.py
 
+if [ $? = 0 ]; then
+  python setup.py install --install-purelib /usr/lib
+  rm -rf ./build
+fi
+

Modified: arm/trunk/setup.cfg
===================================================================
--- arm/trunk/setup.cfg	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/setup.cfg	2010-08-30 16:29:04 UTC (rev 23092)
@@ -1,6 +1,3 @@
 [install]
 install-purelib=/usr/lib
-install-scripts=/usr/bin
 
-[build]
-build-base=/tmp

Modified: arm/trunk/setup.py
===================================================================
--- arm/trunk/setup.py	2010-08-30 15:25:52 UTC (rev 23091)
+++ arm/trunk/setup.py	2010-08-30 16:29:04 UTC (rev 23092)
@@ -13,13 +13,16 @@
       url='http://www.atagar.com/arm/',
       packages=['arm', 'arm.interface', 'arm.interface.graphing', 'arm.util', 'arm.TorCtl'],
       package_dir={'arm': 'src'},
-      scripts=["arm"],
-      data_files=[("/usr/share/man/man1", ["arm.1"])],
+      data_files=[("/usr/share/man/man1", ["arm.1"]),
+                  ("/usr/bin", ["arm"])],
      )
 
 # Removes the egg_info file. Apparently it is not optional during setup
 # (hardcoded in distutils/command/install.py), nor are there any arguments to
 # bypass its creation.
-eggPath = '/usr/local/arm-%s.egg-info' % VERSION
-if os.path.isfile(eggPath): os.remove(eggPath)
+# TODO: not sure how to remove this from the deb build too...
+eggPath = '/usr/lib/arm-%s.egg-info' % VERSION
+if os.path.isfile(eggPath):
+  print "Removing %s" % eggPath
+  os.remove(eggPath)
 

Added: arm/trunk/src/uninstall
===================================================================
--- arm/trunk/src/uninstall	                        (rev 0)
+++ arm/trunk/src/uninstall	2010-08-30 16:29:04 UTC (rev 23092)
@@ -0,0 +1,16 @@
+#!/bin/sh
+files="/usr/bin/arm /usr/share/man/man1/arm.1 /usr/lib/arm"
+
+for i in $files 
+do
+  if [ -f $i -o -d $i ]; then
+    rm -rf $i
+    
+    if [ $? = 0 ]; then
+      echo "removed $i"
+    else
+      exit 1
+    fi
+  fi
+done
+


Property changes on: arm/trunk/src/uninstall
___________________________________________________________________
Added: svn:executable
   + *



More information about the tor-commits mailing list