1 |
#!/usr/bin/make -f |
#!/usr/bin/make -f |
2 |
# Sample debian/rules that uses debhelper. |
# Made with the aid of dh_make, by Craig Small |
3 |
# GNU copyright 1997 to 1999 by Joey Hess. |
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. |
4 |
|
# Also some stuff taken from debmake scripts, by Cristopt Lameter. |
5 |
|
|
6 |
# Uncomment this to turn on verbose mode. |
# Uncomment this to turn on verbose mode. |
7 |
export DH_VERBOSE=1 |
#export DH_VERBOSE=1 |
8 |
|
|
9 |
# This is the debhelper compatability version to use. |
export GNUEDIR=/usr/lib/gnue |
10 |
export DH_COMPAT=2 |
export GNUEBINDIR=/usr/bin |
11 |
|
export GNUEVARDIR=/var/lib/gnue |
12 |
|
export GNUEETCDIR=/etc/gnue |
13 |
|
export GNUESHAREDIR=/usr/share/gnue |
14 |
|
export GNUEDOCDIR=/usr/share/doc/gnue-common |
15 |
|
|
16 |
configure: configure-stamp |
python = python |
17 |
configure-stamp: |
d = debian/tmp |
|
dh_testdir |
|
|
# Add here commands to configure the package. |
|
|
|
|
|
touch configure-stamp |
|
18 |
|
|
19 |
build: configure-stamp build-stamp |
build: build-stamp |
20 |
build-stamp: |
build-stamp: |
21 |
dh_testdir |
dh_testdir |
22 |
|
$(python) setup.py install ##--cfg-file $(GNUEDIR)/site.cfg |
|
# Add here commands to compile the package. |
|
|
./setup.py build |
|
|
#/usr/bin/docbook-to-man debian/python-ldc-db.sgml > python-ldc-db.1 |
|
|
|
|
23 |
touch build-stamp |
touch build-stamp |
24 |
|
|
25 |
clean: |
clean: |
26 |
dh_testdir |
dh_testdir |
27 |
dh_testroot |
dh_testroot |
28 |
rm -f build-stamp configure-stamp |
rm -f build-stamp install-stamp |
|
|
|
|
./setup.py clean --all |
|
|
|
|
|
# Add here commands to clean up after the build process. |
|
29 |
|
|
30 |
|
# -$(MAKE) -C lib/python clean |
31 |
|
# -$(MAKE) -C lib/python/gnue clean |
32 |
|
# -$(MAKE) -C lib/python/gnue/common clean |
33 |
|
find . -regex ".+\.pyc" -o -regex ".+\.so" -o -regex ".+\.o" \ |
34 |
|
| xargs rm -f |
35 |
|
find lib/python -name Makefile -o -name Makefile.pre \ |
36 |
|
-o -name Makefile.pre.in \ |
37 |
|
-o -name sedscript -o -name config.c \ |
38 |
|
| xargs rm -f |
39 |
|
rm -f setup.cfg gnue_sys.py |
40 |
|
rm -rf stage |
41 |
dh_clean |
dh_clean |
42 |
|
|
43 |
install: build |
install: install-stamp |
44 |
|
install-stamp: build-stamp |
45 |
dh_testdir |
dh_testdir |
46 |
dh_testroot |
dh_testroot |
47 |
dh_clean -k |
dh_clean -k |
48 |
#dh_installdirs |
dh_installdirs |
|
|
|
|
# Add here commands to install the package into debian/tmp. |
|
|
#$(MAKE) install prefix=`pwd`/debian/tmp/usr |
|
49 |
|
|
50 |
./setup.py install --prefix=`pwd`/debian/tmp/usr |
# Installing GNUe's lib/python in the $(d) area |
51 |
-find debian/tmp -name '*.py[co]' | xargs rm -rf |
install -d $(d)$(GNUEDIR)/lib/python |
52 |
|
cp -a stage/lib/python/gnue $(d)$(GNUEDIR)/lib/python/gnue |
53 |
|
|
54 |
|
# ..system control file |
55 |
|
install site.cfg.debian $(d)$(GNUEDIR)/site.cfg |
56 |
|
|
57 |
|
# Installing translations |
58 |
|
install -d $(d)$(GNUESHAREDIR) |
59 |
|
cp -a translations $(d)$(GNUESHAREDIR)/translations |
60 |
|
|
61 |
|
# ..images |
62 |
|
cp -a stage/shared/images $(d)$(GNUESHAREDIR)/images |
63 |
|
|
64 |
|
# ..scripts |
65 |
|
## install -d $(d)$(GNUEBINDIR)/ |
66 |
|
## cp -a stage/bin/* $(d)$(GNUEBINDIR)/ |
67 |
|
|
68 |
|
# ..docs |
69 |
|
install -d $(d)$(GNUEDOCDIR)/ |
70 |
|
cp -a doc/*.txt $(d)$(GNUEBINDIR)/ |
71 |
|
## cp -a doc/*.html $(d)$(GNUEBINDIR)/ |
72 |
|
|
73 |
|
# ..etc |
74 |
|
install -d $(d)$(GNUEETCDIR)/ |
75 |
|
install etc/sample.* $(d)$(GNUEETCDIR)/ |
76 |
|
|
77 |
|
|
78 |
|
# We don't need those relicts from building GNUe |
79 |
|
find $(d)$(GNUEDIR) -name .cvsignore \ |
80 |
|
| xargs rm -f |
81 |
|
|
82 |
|
find $(d)$(GNUEDIR) -name "Makefile.*" \ |
83 |
|
-o -regex ".+\.[cho]" -o -regex ".+\.pyc" \ |
84 |
|
-o -name setup.cfg -o -name setup.cfg.in \ |
85 |
|
| xargs rm -f |
86 |
|
|
87 |
|
|
88 |
|
: # Replace all '#!' calls to python with $(python) |
89 |
|
: # and make them executable |
90 |
|
## cd debian && \ |
91 |
|
## for i in `find tmp/$(GNUEBINDIR) -type f`; do \ |
92 |
|
## sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/$(python)\1,' \ |
93 |
|
## $$i > $$i.temp; \ |
94 |
|
## if cmp --quiet $$i $$i.temp; then \ |
95 |
|
## rm -f $$i.temp; \ |
96 |
|
## else \ |
97 |
|
## mv -f $$i.temp $$i; \ |
98 |
|
## chmod 755 $$i; \ |
99 |
|
## echo "fixed interpreter: $$i"; \ |
100 |
|
## fi; \ |
101 |
|
## done |
102 |
|
|
103 |
|
touch install-stamp |
104 |
|
|
105 |
# Build architecture-independent files here. |
# Build architecture-independent files here. |
106 |
binary-indep: build install |
binary-indep: build install |
107 |
# we have nothing to do by default |
# We have nothing to do by default. |
108 |
|
|
109 |
# Build architecture-dependent files here |
# Build architecture-dependent files here. |
110 |
binary-arch: build |
binary-arch: build install |
111 |
# dh_testversion |
# dh_testversion |
112 |
dh_testdir -a |
dh_testdir |
113 |
dh_testroot -a |
dh_testroot |
114 |
dh_installdirs usr/lib/python1.5/site-packages/gnue |
##rm -f debian/*.debhelper |
115 |
dh_installdocs -a |
dh_installdocs README* debian/README* \ |
116 |
# dh_installexamples -a |
doc/*.txt \ |
117 |
dh_installmenu -a |
## doc/*.html |
118 |
# dh_installinit -a |
# dh_installmenu |
119 |
# dh_installcron -a |
# dh_installemacsen |
120 |
# dh_installmanpages -a |
# dh_installpam |
121 |
# dh_undocumented -a |
# dh_installinit |
122 |
dh_installchangelogs -a |
# dh_installcron |
123 |
dh_strip -a |
# dh_installmanpages |
124 |
dh_compress -a |
# dh_undocumented |
125 |
cp -rf `pwd`/debian/tmp/usr/lib/python1.5 `pwd`/debian/python-gnue-base/usr/lib/ |
# cat doc/CHANGES.txt doc/HISTORY.txt >ChangeLog |
126 |
dh_fixperms -a |
dh_installchangelogs ChangeLog |
127 |
# dh_suidregister -a |
dh_link |
128 |
dh_installdeb -a |
dh_strip |
129 |
dh_shlibdeps -a |
dh_compress -X.zexp |
130 |
dh_gencontrol -a |
dh_fixperms |
131 |
# dh_makeshlibs -a |
# dh_makeshlibs |
132 |
dh_md5sums -a |
dh_installdeb |
133 |
dh_builddeb -a |
dh_shlibdeps |
134 |
|
dh_gencontrol |
135 |
|
dh_md5sums |
136 |
|
dh_builddeb |
137 |
|
|
138 |
|
source diff: |
139 |
|
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false |
140 |
|
|
141 |
binary: binary-indep binary-arch |
binary: binary-indep binary-arch |
142 |
.PHONY: build clean binary-indep binary-arch binary install configure |
.PHONY: build clean binary-indep binary-arch binary install |