2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
6 # Overridable variables added to support building test .deb files
7 # as part of routine SCons builds. --SK
9 PYTHON_VERSION
=`python -V 2>&1| cut -d" " -f2 | cut -d"." -f1-2`
10 PYTHON_PATH
=/usr
/bin
/python
11 PYTHON
=$(PYTHON_PATH
)$(PYTHON_VERSION
)
14 # Uncomment this to turn on verbose mode.
17 # This is the debhelper compatability version to use.
18 configure
: configure-stamp
21 # Add here commands to configure the package.
26 build
: configure-stamp build-stamp
29 $(PYTHON
) setup.py build
35 rm -f build-stamp configure-stamp
45 # Add here commands to install the package into debian/scons.
47 @
# The SCons project uses Aegis for development, which requires
48 @
# that targets be removed explicitly before they're created.
49 @
# (They could be symlinks to checked-in read-only copies in the
50 @
# repository.) We also can't assume that the proper directories
51 @
# already exist on our non-Debian test build systems. Hence,
52 @
# we do a lot of mkdir -p and rm -f here... --SK
54 mkdir
-p debian
/scons
/usr
/lib
/python
$(PYTHON_VERSION
)/site-packages
/
55 rm -rf debian
/scons
/usr
/lib
/python
$(PYTHON_VERSION
)/site-packages
/SCons
56 cp
-r build
/lib
*/SCons debian
/scons
/usr
/lib
/python
$(PYTHON_VERSION
)/site-packages
/
58 mkdir
-p debian
/scons
/usr
/bin
/
59 rm -f debian
/scons
/usr
/bin
/scons
60 rm -f debian
/scons
/usr
/bin
/sconsign
61 ifeq ($(PYTHON
),python
)
62 cp build
/scripts
/scons debian
/scons
/usr
/bin
/scons
63 cp build
/scripts
/sconsign debian
/scons
/usr
/bin
/sconsign
65 sed
'1s|.*|#!/usr/bin/python2.2|' build
/scripts
/scons
> debian
/scons
/usr
/bin
/scons
66 sed
'1s|.*|#!/usr/bin/python2.2|' build
/scripts
/sconsign
> debian
/scons
/usr
/bin
/sconsign
68 chmod
+x debian
/scons
/usr
/bin
/scons
69 chmod
+x debian
/scons
/usr
/bin
/sconsign
71 mkdir
-p debian
/scons
/usr
/share
/man
/man1
/
72 rm -f debian
/scons
/usr
/share
/man
/man1
/scons
.1
73 rm -f debian
/scons
/usr
/share
/man
/man1
/sconsign
.1
74 cp scons
.1 debian
/scons
/usr
/share
/man
/man1
/
75 cp sconsign
.1 debian
/scons
/usr
/share
/man
/man1
/
77 mkdir
-p debian
/scons
/usr
/share
/doc
/scons
78 rm -f debian
/scons
/usr
/share
/doc
/scons
/changelog
79 rm -f debian
/scons
/usr
/share
/doc
/scons
/README.txt
80 rm -f debian
/scons
/usr
/share
/doc
/scons
/CHANGES.txt
81 rm -f debian
/scons
/usr
/share
/doc
/scons
/*.gz
82 rm -f debian
/scons
/usr
/share
/doc
/scons
/copyright
84 cp README.txt debian
/scons
/usr
/share
/doc
/scons
/
85 cp CHANGES.txt debian
/scons
/usr
/share
/doc
/scons
/
87 gzip
-9 debian
/scons
/usr
/share
/doc
/scons
/*
89 cp debian
/changelog debian
/scons
/usr
/share
/doc
/scons
/changelog
91 cp debian
/copyright debian
/scons
/usr
/share
/doc
/scons
/
93 # Build architecture-independent files here.
94 binary-indep
: build
install
107 dh_builddeb
$(BUILDDEB_OPTIONS
)
109 # Build architecture-dependent files here.
110 binary-arch
: build
install
112 binary
: binary-indep binary-arch
113 .PHONY
: build
clean binary-indep binary-arch binary
install configure