1 |
|
#!/usr/bin/make -f |
2 |
|
# Sample debian/rules that uses debhelper. |
3 |
|
# GNU copyright 1997 by Joey Hess. |
4 |
|
# |
5 |
|
# This version is for a hypothetical package that builds an |
6 |
|
# architecture-dependant package, as well as an architecture-independent |
7 |
|
# package. |
8 |
|
|
9 |
|
# Uncomment this to turn on verbose mode. |
10 |
|
#export DH_VERBOSE=1 |
11 |
|
|
12 |
|
# This is the debhelper compatability version to use. |
13 |
|
export DH_COMPAT=2 |
14 |
|
|
15 |
|
configure: configure-stamp |
16 |
|
configure-stamp: |
17 |
|
dh_testdir |
18 |
|
|
19 |
|
if [ configure.in -nt configure ]; then autoconf; fi |
20 |
|
./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info |
21 |
|
|
22 |
|
touch configure-stamp |
23 |
|
|
24 |
|
build: build-stamp |
25 |
|
build-stamp: configure-stamp |
26 |
|
dh_testdir |
27 |
|
|
28 |
|
# Add here commands to compile the package. |
29 |
|
$(MAKE) OFLAG=-O4 |
30 |
|
|
31 |
|
touch build-stamp |
32 |
|
|
33 |
|
clean: |
34 |
|
dh_testdir |
35 |
|
dh_testroot |
36 |
|
rm -f build-stamp configure-stamp |
37 |
|
|
38 |
|
-$(MAKE) clean |
39 |
|
|
40 |
|
dh_clean |
41 |
|
|
42 |
|
install: DH_OPTIONS= |
43 |
|
install: build |
44 |
|
dh_testdir |
45 |
|
dh_testroot |
46 |
|
dh_clean -k |
47 |
|
dh_installdirs |
48 |
|
|
49 |
|
$(MAKE) install DESTDIR=$$(pwd)/debian/tmp |
50 |
|
|
51 |
|
rm -rf debian/tmp/usr/share |
52 |
|
mkdir -p debian/tmp/usr/share/emacs/site-lisp |
53 |
|
cp -a $$(find debian/tmp/usr/local -name site-lisp -type d) debian/tmp/usr/share/emacs/site-lisp/gcl |
54 |
|
rm -rf debian/tmp/usr/local |
55 |
|
|
56 |
|
cat debian/tmp/usr/lib/gcl-2.5.0/gcl-tk/demos/index.lsp | \ |
57 |
|
sed "s,$$(pwd)/debian/tmp,,1" >debian/foo |
58 |
|
mv debian/foo debian/tmp/usr/lib/gcl-2.5.0/gcl-tk/demos/index.lsp |
59 |
|
|
60 |
|
mkdir -p debian/tmp/usr/share/doc/gcl-doc/gcl-si.html |
61 |
|
cp info/gcl-si*html debian/tmp/usr/share/doc/gcl-doc/gcl-si.html/ |
62 |
|
mkdir -p debian/tmp/usr/share/doc/gcl-doc/gcl-tk.html |
63 |
|
cp info/gcl-tk*html debian/tmp/usr/share/doc/gcl-doc/gcl-tk.html/ |
64 |
|
|
65 |
|
rm -f debian/tmp/usr/bin/gcl.exe |
66 |
|
|
67 |
|
find debian/tmp -type f -name "*.lsp" -exec chmod -x {} \; |
68 |
|
find debian/tmp -type f -name "*.lisp" -exec chmod -x {} \; |
69 |
|
find debian/tmp -type f -name "*.el" -exec chmod -x {} \; |
70 |
|
find debian/tmp -type f -name "*.tcl" -exec chmod -x {} \; |
71 |
|
|
72 |
|
dh_movefiles |
73 |
|
|
74 |
|
# Build architecture-independent files here. |
75 |
|
# Pass -i to all debhelper commands in this target to reduce clutter. |
76 |
|
binary-indep: build install |
77 |
|
dh_testdir -i |
78 |
|
dh_testroot -i |
79 |
|
dh_installdocs -i |
80 |
|
dh_installinfo -i |
81 |
|
cat debian/gcl-doc.postinst.debhelper | \ |
82 |
|
sed -e 's/\(--quiet .*gcl-si\)/--section "GNU Common Lisp" "GNU Common Lisp" --description="GNU Common Lisp System Internals." \1/1' \ |
83 |
|
-e 's/\(--quiet .*gcl-tk\)/--section "GNU Common Lisp" "GNU Common Lisp" --description="GNU Common Lisp Tk Manual." \1/1' >debian/foo && \ |
84 |
|
mv debian/foo debian/gcl-doc.postinst.debhelper |
85 |
|
# perl -pi -e 's/--quiet .*gcl-si/--section "GNU Common Lisp" "GNU Common Lisp" --description="GNU Common Lisp System Internals." $$&/; s/--quiet .*gcl-tk/--section "GNU Common Lisp" "GNU Common Lisp" --description="GNU Common Lisp Tk Manual." $$&/' |
86 |
|
dh_installchangelogs ChangeLog -i |
87 |
|
dh_link -i |
88 |
|
dh_compress -i |
89 |
|
dh_fixperms -i |
90 |
|
dh_installdeb -i |
91 |
|
dh_gencontrol -i |
92 |
|
dh_md5sums -i |
93 |
|
dh_builddeb -i |
94 |
|
|
95 |
|
# Build architecture-dependent files here. |
96 |
|
binary-arch: build install |
97 |
|
dh_testdir -a |
98 |
|
dh_testroot -a |
99 |
|
dh_installdocs -a |
100 |
|
dh_installemacsen -a |
101 |
|
dh_installmanpages -a |
102 |
|
dh_installchangelogs ChangeLog -a |
103 |
|
dh_strip -a |
104 |
|
dh_link -a |
105 |
|
dh_compress -a |
106 |
|
dh_fixperms -a |
107 |
|
dh_installdeb -a |
108 |
|
dh_shlibdeps -a |
109 |
|
dh_gencontrol -a |
110 |
|
dh_md5sums -a |
111 |
|
dh_builddeb -a |
112 |
|
|
113 |
|
binary: binary-indep binary-arch |
114 |
|
.PHONY: build clean binary-indep binary-arch binary install configure |
115 |
|
|
116 |
|
# vim:noet:nosta:nolist: |