Rework Debian packaging ito incorporate changes from Moshe Zadka, official Debian...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 24 Apr 2002 12:51:00 +0000 (12:51 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 24 Apr 2002 12:51:00 +0000 (12:51 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@345 fdb21ef1-2011-0410-befe-b5e4ea1792b1

18 files changed:
HOWTO/release.txt
SConstruct
debian/changelog
debian/control
debian/copyright
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/postinst [new file with mode: 0644]
debian/prerm [new file with mode: 0644]
debian/python-scons.postinst [deleted file]
debian/python-scons.prerm [deleted file]
debian/python2-scons.postinst [deleted file]
debian/python2-scons.prerm [deleted file]
debian/rules
debian/scons.postinst [deleted file]
debian/scons.prerm [deleted file]
runtest.py
src/CHANGES.txt

index 6e1eaac916b3cb9c6b6337b45ef75bef47547a97..7c37637eedf4ec7a124d09342d810bf8fb49c495 100644 (file)
@@ -83,9 +83,9 @@ Things to do to release a new version of SCons:
 
                # Change the hard-coded package version numbers
                # in the following files.
-               aecp README SConstruct debian/changelog rpm/scons.spec
+               aecp README SConstruct debian/changelog debian/files rpm/scons.spec
 
-               vi README SConstruct debian/changelog rpm/scons.spec
+               vi README SConstruct debian/changelog debian/files rpm/scons.spec
 
                # Optionally, do the same in the following:
                [optional] aecp HOWTO/change.txt
index 4d91bb3d528c5cee340a22b9cfcff246f68bf242..8e56006b18d61c0bdfa9e9abdf6eaa4d10982434 100644 (file)
@@ -71,13 +71,6 @@ rpm = whereis('rpm')
 unzip = whereis('unzip')
 zip = whereis('zip')
 
-# My installation on Red Hat doesn't like any debhelper version
-# beyond 2, so let's use 2 as the default on any non-Debian build.
-if os.path.isfile('/etc/debian_version'):
-    dh_compat = 3
-else:
-    dh_compat = 2
-
 #
 # Now grab the information that we "build" into the files (using sed).
 #
@@ -252,7 +245,7 @@ env = Environment(
                    DEVELOPER           = developer,
                    REVISION            = revision,
                    VERSION             = version,
-                   DH_COMPAT           = dh_compat,
+                   DH_COMPAT           = 2,
 
                    TAR_HFLAG           = tar_hflag,
 
@@ -298,12 +291,14 @@ python_scons = {
         'inst_subdir'   : os.path.join('lib', 'python1.5', 'site-packages'),
 
         'debian_deps'   : [
-                            'debian/rules',
-                            'debian/control',
                             'debian/changelog',
+                            'debian/control',
                             'debian/copyright',
-                            'debian/python-scons.postinst',
-                            'debian/python-scons.prerm',
+                            'debian/dirs',
+                            'debian/docs',
+                            'debian/postinst',
+                            'debian/prerm',
+                            'debian/rules',
                           ],
 
         'files'         : [ 'LICENSE.txt',
@@ -331,12 +326,14 @@ python_scons = {
 #        'inst_subdir'  : os.path.join('lib', 'python2.1', 'site-packages'),
 #
 #        'debian_deps'  : [
-#                           'debian/rules',
-#                           'debian/control',
-#                           'debian/changelog',
-#                           'debian/copyright',
-#                           'debian/python2-scons.postinst',
-#                           'debian/python2-scons.prerm',
+#                            'debian/changelog',
+#                            'debian/control',
+#                            'debian/copyright',
+#                            'debian/dirs',
+#                            'debian/docs',
+#                            'debian/postinst',
+#                            'debian/prerm',
+#                            'debian/rules',
 #                          ],
 #
 #        'files'        : [
@@ -357,12 +354,14 @@ scons_script = {
         'inst_subdir'   : 'bin',
 
         'debian_deps'   : [
-                            'debian/rules',
-                            'debian/control',
                             'debian/changelog',
+                            'debian/control',
                             'debian/copyright',
-                            'debian/python-scons.postinst',
-                            'debian/python-scons.prerm',
+                            'debian/dirs',
+                            'debian/docs',
+                            'debian/postinst',
+                            'debian/prerm',
+                            'debian/rules',
                           ],
 
         'files'         : [
@@ -382,12 +381,14 @@ scons = {
         'pkg'           : project,
 
         'debian_deps'   : [ 
-                            'debian/rules',
-                            'debian/control',
                             'debian/changelog',
+                            'debian/control',
                             'debian/copyright',
-                            'debian/scons.postinst',
-                            'debian/scons.prerm',
+                            'debian/dirs',
+                            'debian/docs',
+                            'debian/postinst',
+                            'debian/prerm',
+                            'debian/rules',
                           ],
 
         'files'         : [ 
@@ -661,14 +662,21 @@ for p in [ scons ]:
         # Our Debian packaging builds directly into build/dist,
         # so we don't need to add the .debs to install_targets.
         deb = os.path.join('build', 'dist', "%s_%s-1_all.deb" % (pkg, version))
+        for d in p['debian_deps']:
+            b = env.SCons_revision(os.path.join(build, d), d)
+            env.Depends(deb, b)
         env.Command(deb, build_src_files, [
-            "fakeroot make -f debian/rules VERSION=$VERSION DH_COMPAT=$DH_COMPAT ENVOKED_BY_CONSTRUCT=1 binary-$PKG",
-            "env DH_COMPAT=$DH_COMPAT dh_clean"
+            "cd %s && fakeroot make -f debian/rules PYTHON=python BUILDDEB_OPTIONS=--destdir=../../build/dist binary" % build,
                     ])
-        env.Depends(deb, p['debian_deps'])
 
-        dfiles = map(lambda x, d=test_deb_dir: os.path.join(d, 'usr', x),
-                     dst_files)
+        old = os.path.join('lib', 'scons', '')
+        new = os.path.join('lib', 'python2.1', 'site-packages', '')
+        def xxx(s, old=old, new=new):
+            if s[:len(old)] == old:
+                s = new + s[len(old):]
+            return os.path.join('usr', s)
+        dfiles = map(lambda x, t=test_deb_dir: os.path.join(t, x),
+                     map(xxx, dst_files))
         env.Command(dfiles,
                     deb,
                     "dpkg --fsys-tarfile $SOURCES | (cd $TEST_DEB_DIR && tar -xf -)")
index 8e330bde029197845df6736ff427c5116d2b8994..ef0eb561245a6b523479feb9cc5ca5c60086572e 100644 (file)
@@ -1,8 +1,15 @@
 scons (0.07-1) unstable; urgency=low
 
-  * Seventh Release.
+  * Folding uploaded Debian build into SCons source
 
- -- Steven Knight <knight@baldmt.com>  Thu, 28 Mar 2002 01:24:29 -0600
+ -- Steven Knight <knight@baldmt.com>  Tue, 23 Apr 2002 07:04:54 -0500
+
+
+scons (0.05-1) unstable; urgency=low
+
+  * First upload (closes: #140128)
+
+ -- Moshe Zadka <moshez@debian.org>  Wed, 27 Mar 2002 10:40:42 +0200
 
 
 scons (0.06-1) unstable; urgency=low
index e6286888205a6c8707b9c090796db77d9f14dbd3..b5ecaff3dbf9775223452e2184c3872b4fb0f7d5 100644 (file)
@@ -1,39 +1,13 @@
 Source: scons
 Section: devel
-Priority: extra
-Maintainer: Anthony Roach <aroach@electriceyeball.com>
-Standards-Version: 3.5.6.0
-Build-Depends: debhelper
+Priority: optional
+Maintainer: Moshe Zadka <moshez@debian.org>
+Build-Depends-Indep: debhelper (>> 2.0.0), python2.1
+Standards-Version: 3.2.1
 
 Package: scons
 Architecture: all
-Depends: python-base(>=1.5.2)|python2-base
-Description: An Open Source software construction tool
- SCons is an Open Source software construction tool--that is, a build tool; an
- improved substitute for the classic Make utility; a better way to build
- software.
-
-Package: python-scons
-Architecture: all
-Depends: python-base(<<2.0), python-base(>=1.5.2)
-Description: SCons Python 1.5.2 extension modules
- SCons is an Open Source software construction tool--that is, a build tool; an
- improved substitute for the classic Make utility; a better way to build
- software.
-
-Package: python2-scons
-Architecture: all
-Depends: python2-base(<<2.1), python2-base(>=2.0)
-Description: SCons Python 2.0 extension modules
- SCons is an Open Source software construction tool--that is, a build tool; an
- improved substitute for the classic Make utility; a better way to build
- software.
-
-Package: scons-script
-Architecture: all
-Depends: python-scons|python2-scons,python-base(>=1.5.2)|python2-base
-Suggests: python-scons, python2-scons
-Description: An Open Source software construction tool script
- SCons is an Open Source software construction tool--that is, a build tool; an
- improved substitute for the classic Make utility; a better way to build
- software.
+Depends: python2.1
+Description: A replacement for Make
+ Scons is able to build files from other files, based on the
+ dependency DAG.
index 612fa8626c2061bef74f61ee12518c4f5df9033c..0c394f48a95d93b45ac6104dd13e47fa0f70a72c 100644 (file)
@@ -1,3 +1,41 @@
+This package was debianized by Moshe Zadka <moshez@zadka.site.co.il> on
+Wed, 27 Mar 2002 10:40:28 +0200.
+
+Upstream Author(s): 
+Steven Knight
+knight at baldmt dot com
+http://www.baldmt.com/~knight/
+
+With plenty of help from the SCons Development team:
+        Chad Austin
+        Charles Crain
+        Steve Leblanc
+        Anthony Roach
+
+
+Copyright: 
+
+The software comes with the following notice in the file LICENSE.txt:
+Copyright (c) 2001, 2002 Steven Knight
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 This package was debianized by Anthony Roach <aroach@electriceyeball.com>
 
 The package source can be downloaded from http://www.scons.org/
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..cb88363
--- /dev/null
@@ -0,0 +1,4 @@
+usr/bin
+usr/lib/python2.1/site-packages
+usr/share/doc/scons
+usr/share/man/man1
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..09547ff
--- /dev/null
@@ -0,0 +1 @@
+usr/share/doc/scons/*
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..1e05a5d
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -e
+if [ "$1" = "configure" ]; then
+       if [ -d /usr/doc -a ! -e /usr/doc/scons -a -d /usr/share/doc/scons ]; then
+               ln -sf ../share/doc/scons /usr/doc/scons
+       fi
+fi
+
+NAME=scons
+case "$1" in
+        configure|abort-upgrade|abort-remove|abort-deconfigure)
+                dpkg --listfiles $NAME | grep '\.py$' | \
+                     xargs -n 1 /usr/bin/python -c 'import py_compile,sys;py_compile.compile(sys.argv[1])'
+                dpkg --listfiles $NAME | grep '\.py$' | \
+                     xargs -n 1 /usr/bin/python -O -c 'import py_compile,sys;py_compile.compile(sys.argv[1])'
+        ;;
+esac
diff --git a/debian/prerm b/debian/prerm
new file mode 100644 (file)
index 0000000..62531a3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+NAME=scons
+
+dpkg --listfiles $NAME |
+        awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
+        xargs rm -f >&2
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/scons ]; then
+       rm -f /usr/doc/scons
+fi
diff --git a/debian/python-scons.postinst b/debian/python-scons.postinst
deleted file mode 100644 (file)
index 362860a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh -e
-#
-# postinst script for Debian python2 packages.
-# Written 1998 by Gregor Hoffleit <flight@debian.org>.
-# Modified for SCons 2001 by Anthony Roach <aroach@electriceyeball.com>.
-#
-
-PACKAGE=python-scons
-DIRLIST="/usr/lib/python1.5/site-packages/SCons"
-
-case "$1" in
-    configure|abort-upgrade|abort-remove|abort-deconfigure)
-        for i in $DIRLIST ; do
-            python2 -O /usr/lib/python1.5/compileall.py -q $i
-            python2 /usr/lib/python1.5/compileall.py -q $i
-        done
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/python-scons.prerm b/debian/python-scons.prerm
deleted file mode 100644 (file)
index 24e558c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh -e
-#
-# sample prerm script for Debian python2 packages.
-# Written 1998 by Gregor Hoffleit <flight@debian.org>.
-# Modified for SCons 2001 by Anthony Roach <aroach@electriceyeball.com>.
-#
-
-PACKAGE=python-scons
-
-dpkg --listfiles $PACKAGE |
-       awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
-       xargs rm -f >&2
-
-#DEBHELPER#
diff --git a/debian/python2-scons.postinst b/debian/python2-scons.postinst
deleted file mode 100644 (file)
index eedb8ab..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh -e
-#
-# postinst script for Debian python2 packages.
-# Written 1998 by Gregor Hoffleit <flight@debian.org>.
-# Modified for SCons 2001 by Anthony Roach <aroach@electriceyeball.com>.
-#
-
-PACKAGE=python2-scons
-DIRLIST="/usr/lib/python2.0/site-packages/SCons"
-
-case "$1" in
-    configure|abort-upgrade|abort-remove|abort-deconfigure)
-        for i in $DIRLIST ; do
-            python2 -O /usr/lib/python2.0/compileall.py -q $i
-            python2 /usr/lib/python2.0/compileall.py -q $i
-        done
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/python2-scons.prerm b/debian/python2-scons.prerm
deleted file mode 100644 (file)
index 2bc8081..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh -e
-#
-# sample prerm script for Debian python2 packages.
-# Written 1998 by Gregor Hoffleit <flight@debian.org>.
-# Modified for SCons 2001 by Anthony Roach <aroach@electriceyeball.com>.
-#
-
-PACKAGE=python2-scons
-
-dpkg --listfiles $PACKAGE |
-       awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
-       xargs rm -f >&2
-
-#DEBHELPER#
index e3b0e069d1e02b86b509c8528be04a730bdd293e..2b3b36c899f2f7bcaf9d345daffbfdd874ea8b5e 100644 (file)
 #!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
 
-#
-# This file is more complex than it needs to be to just build binary packages,
-# because it satisfies the relevant Debian policies. See ../README for more
-# information.
-#
+########
+# Overridable variables added to support building test .deb files
+# as part of routine SCons builds.  --SK
+BUILDDEB_OPTIONS=
+PYTHON=/usr/bin/python2.1
+#######
 
 # Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
 
 # This is the debhelper compatability version to use.
-# We expect this to be provided by the calling build script:
-export DH_COMPAT
-# Here's the previous/"normal" Debian value (?), but it breaks on a
-# converted Red Hat debhelper installation:
-#export DH_COMPAT=3
+export DH_COMPAT=2
 
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       
 
-ifeq ($(ENVOKED_BY_CONSTRUCT),1)
-BUILDDEB_OPTIONS=--destdir=build/dist
-endif
+       touch configure-stamp
 
-build: build-stamp
+build: configure-stamp build-stamp
 build-stamp:
-ifneq ($(ENVOKED_BY_CONSTRUCT),1)
        dh_testdir
-       cons
+       $(PYTHON) setup.py build
        touch build-stamp
-endif
 
 clean:
        dh_testdir
        dh_testroot
-       rm -f build-stamp configure-stamp install-common-stamp
-       rm -rf build
-       find -name .construct -exec rm "{}" ";"
+       rm -f build-stamp configure-stamp
+       rm -rf build/
        dh_clean
 
-install-common: install-common-stamp
-install-common-stamp: DH_OPTIONS=
-install-common-stamp:
+install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs
-       touch install-common-stamp
 
-install-scons: build install-common
-       python build/scons/setup.py install \
---install-scripts=`pwd`/debian/scons/usr/bin \
---install-purelib=`pwd`/debian/scons/usr/lib/scons --no-compile
-# Here's how we'd install the build engine in a version-specific directory.
-#--install-purelib=`pwd`/debian/scons/usr/lib/scons-$VERSION --no-compile
+       # Add here commands to install the package into debian/scons.
+       @########
+       @# The SCons project uses Aegis for development, which requires
+       @# that targets be removed explicitly before they're created.
+       @# (They could be symlinks to checked-in read-only copies in the
+       @# repository.)  We also can't assume that the proper directories
+       @# already exist on our non-Debian test build systems.  Hence,
+       @# we do a lot of mkdir -p and rm -f here...  --SK
+       @########
+       mkdir -p debian/scons/usr/lib/python2.1/site-packages/
+       rm -rf debian/scons/usr/lib/python2.1/site-packages/SCons
+       cp -r build/lib/SCons debian/scons/usr/lib/python2.1/site-packages/
+
+       mkdir -p debian/scons/usr/bin/
+       rm -f debian/scons/usr/bin/scons
+ifeq ($(PYTHON),python)
+       cp build/scripts/scons debian/scons/usr/bin/scons
+else
+       sed '1s|.*|#!/usr/bin/python2.1|' build/scripts/scons > debian/scons/usr/bin/scons
+endif
+       chmod +x debian/scons/usr/bin/scons
+
+       mkdir -p debian/scons/usr/share/man/man1/
+       rm -f debian/scons/usr/share/man/man1/scons.1
+       cp scons.1 debian/scons/usr/share/man/man1/
+
+       mkdir -p debian/scons/usr/share/doc/scons
+       rm -f debian/scons/usr/share/doc/scons/changelog
+       rm -f debian/scons/usr/share/doc/scons/README.txt
+       rm -f debian/scons/usr/share/doc/scons/*.gz
+       rm -f debian/scons/usr/share/doc/scons/copyright
 
-install-python-scons: build install-common
-       python build/python-scons/setup.py install \
---install-purelib=`pwd`/debian/python-scons/usr/lib/python1.5/site-packages --no-compile
+       cp README.txt debian/scons/usr/share/doc/scons/
 
-install-python2-scons: build install-common
-       python build/python2-scons/setup.py install \
---install-purelib=`pwd`/debian/python2-scons/usr/lib/python2.0/site-packages --no-compile
+       gzip -9 debian/scons/usr/share/doc/scons/*
 
-install-scons-script: build install-common
-       python build/scons-script/setup.py install \
---install-scripts=`pwd`/debian/scons/usr/bin --no-compile
+       cp debian/changelog debian/scons/usr/share/doc/scons/changelog
 
+       cp debian/copyright debian/scons/usr/share/doc/scons/
 
-# This single target is used to build all the packages, all at once, or
-# one at a time. So keep in mind: any options passed to commands here will
-# affect _all_ packages. Anything you want to only affect one package
-# should be put in another target, such as the install target.
-binary-common:
+# Build architecture-independent files here.
+binary-indep: build install
        dh_testdir
        dh_testroot
-       dh_installdocs
-       dh_installexamples
-       dh_installmanpages
+       #dh_installdocs
        dh_installchangelogs 
+       dh_link
+       dh_strip
        dh_compress
        dh_fixperms
        dh_installdeb
+       dh_shlibdeps
        dh_gencontrol
        dh_md5sums
-       dh_builddeb $(BUILDDEB_OPTIONS)
-
-# Build architecture independant packages using the common target.
-binary-indep: build install
-       $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules DH_OPTIONS=-i binary-common
+       DH_COMPAT=$(DH_COMPAT) dh_builddeb $(BUILDDEB_OPTIONS)
 
-# Build architecture dependant packages using the common target.
+# Build architecture-dependent files here.
 binary-arch: build install
 
-# Any other binary targets build just one binary package at a time.
-binary-scons: build install-scons
-       $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-pscons
-
-binary-python-scons: build install-python-scons
-       $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-ppython-scons
-
-binary-python2-scons: build install-python2-scons
-       $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-ppython2-scons
-
-binary-scons-script: build install-scons-script
-       $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-pscons-script
-
 binary: binary-indep binary-arch
-
-.PHONY: build clean binary-indep binary-arch binary install binary-scons binary-python-scons binary-python2-scons binary-scons-script install-scons install-python-scons install-python2-scons install-scons-script
-
-
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/debian/scons.postinst b/debian/scons.postinst
deleted file mode 100644 (file)
index 7dd248d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh -e
-#
-# postinst script for Debian python2 packages.
-# Written 1998 by Gregor Hoffleit <flight@debian.org>.
-# Modified for SCons 2001 by Anthony Roach <aroach@electriceyeball.com>.
-#
-
-PACKAGE=scons
-DIRLIST="/usr/lib/scons-0.07"
-
-case "$1" in
-    configure|abort-upgrade|abort-remove|abort-deconfigure)
-        for i in $DIRLIST ; do
-            python2 -O /usr/lib/python1.5/compileall.py -q $i
-            python2 /usr/lib/python1.5/compileall.py -q $i
-        done
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/scons.prerm b/debian/scons.prerm
deleted file mode 100644 (file)
index 0b62083..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh -e
-#
-# sample prerm script for Debian python2 packages.
-# Written 1998 by Gregor Hoffleit <flight@debian.org>.
-# Modified for SCons 2001 by Anthony Roach <aroach@electriceyeball.com>.
-#
-
-PACKAGE=scons
-
-dpkg --listfiles $PACKAGE |
-       awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
-       xargs rm -f >&2
-
-#DEBHELPER#
index 400f84cb9404d017a23d73a16799a0d4695e8951..b894a7fe9e7fd964f5ae11ed5dafd341fbe70049 100644 (file)
@@ -93,6 +93,10 @@ if package:
         'zip'        : '',
     }
 
+    lib = {
+        'deb'        : os.path.join('python2.1', 'site-packages')
+    }
+
     if not dir.has_key(package):
         sys.stderr.write("Unknown package '%s'\n" % package)
         sys.exit(2)
@@ -104,7 +108,8 @@ if package:
         lib_dir = os.path.join(test_dir, dir[package])
     else:
         scons_dir = os.path.join(test_dir, dir[package], 'bin')
-        lib_dir = os.path.join(test_dir, dir[package], 'lib', 'scons')
+        l = lib.get(package, 'scons')
+        lib_dir = os.path.join(test_dir, dir[package], 'lib', l)
 
 else:
 
index 999b2c57c3824dd61469c937226dd981f432427f..41b58992bc108a92c008455bd25c4b8e7e3972fc 100644 (file)
@@ -122,6 +122,10 @@ RELEASE 0.07 -
   - Fixed use of sys.path so Python modules can be imported from
     the SConscript directory.
 
+  From Moshe Zadka:
+  
+  - Changes for official Debian packaging.
+
 
 
 RELEASE 0.06 - Thu, 28 Mar 2002 01:24:29 -0600