]> git.saurik.com Git - apt.git/blob - debian/rules
82c3b0a0c94b021962395960e95d67f25ee45dab
[apt.git] / debian / rules
1 #!/usr/bin/make -f
2 # Made with the aid of dh_make, by Craig Small
3 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4 # Some lines taken from debmake, by Christoph Lameter.
5 # $Id: rules,v 1.7 1999/03/12 22:34:34 mblevin Exp $
6
7
8 # Uncomment this to turn on verbose mode.
9 #export DH_VERBOSE=1
10
11 # Find the libapt-pkg major version for use in other control files
12 export LIBAPT_MAJOR=`egrep '^MAJOR=' apt-pkg/makefile |cut -d '=' -f 2`
13
14 build: build-stamp
15 build-stamp: configure
16 dh_testdir
17 mkdir build
18 cd build; ../configure
19 cd ..
20 # cd build && CXXFLAGS="-g -Wall -D_POSIX_C_SOURCE=199309" ../configure --disable-nls --disable-static --prefix=/usr
21 # cd build && make all-hdr
22 # cd build && make -s
23
24 # Add here commands to compile the package.
25 make
26 touch build-stamp
27
28 clean:
29 dh_testdir
30 # dh_testroot
31 rm -f build-stamp
32 rm -rf build
33
34 # Add here commands to clean up after the build process.
35 -$(MAKE) clean
36 -$(MAKE) distclean
37 dh_clean
38
39 # Build architecture-independent files here.
40 binary-indep: build libapt-pkg-doc
41 # We have nothing to do by default.
42
43 # Build architecture-dependent files here.
44 binary-arch: build apt libapt-pkg-dev
45
46 apt: build
47 # dh_testversion -papt
48 dh_testdir -papt
49 dh_testroot -papt
50 dh_clean -papt -k
51 dh_installdirs -papt usr/bin usr/lib/apt/methods usr/lib/dpkg/methods/apt etc/apt usr/doc/apt var/cache/apt/archives/partial var/state/apt/lists/partial
52
53 cp build/bin/apt-* debian/tmp/usr/bin/
54
55 # install the shared libs
56 find build/bin/ -type f -name "libapt-pkg.so.*" -exec cp -a "{}" debian/tmp/usr/lib/ \;
57 find build/bin/ -type l -name "libapt-pkg.so.*" -exec cp -a "{}" debian/tmp/usr/lib/ \;
58
59 cp build/bin/methods/* debian/tmp/usr/lib/apt/methods/
60
61 cp build/scripts/dselect/* debian/tmp/usr/lib/dpkg/methods/apt/
62 # cp debian/sources.list debian/tmp/etc/apt/
63
64 # Copy the users guide
65 cp build/docs/guide.text debian/tmp/usr/doc/apt/users-guide.txt
66 mkdir debian/tmp/usr/doc/apt/users-guide.html/
67 cp -a build/docs/guide.html/* debian/tmp/usr/doc/apt/users-guide.html/
68
69 # Copy the offline guide
70 cp build/docs/offline.text debian/tmp/usr/doc/apt/offline.txt
71 mkdir debian/tmp/usr/doc/apt/offline.html/
72 cp -a build/docs/offline.html/* debian/tmp/usr/doc/apt/offline.html/
73
74 cp -a debian/dhelp debian/tmp/usr/doc/apt/.dhelp
75
76 # head -n 500 ChangeLog > debian/ChangeLog
77
78 dh_installdocs -papt
79 dh_installexamples -papt build/docs/examples/*
80 # dh_installmenu -papt
81 # dh_installinit -papt
82 # dh_installcron -papt
83 dh_installmanpages -papt
84
85 # dh_undocumented -papt
86 dh_installchangelogs -papt
87 dh_strip -papt
88 dh_compress -papt
89 dh_fixperms -papt
90 dh_suidregister -papt
91 dh_installdeb -papt
92 LD_LIBRARY_PATH=debian/tmp/usr/lib dh_shlibdeps -papt
93 echo libapt-pkg:major=${LIBAPT_MAJOR} >> debian/substvars
94 dh_gencontrol -papt
95 dh_makeshlibs -m${LIBAPT_MAJOR} -Vlibapt-pkg${LIBAPT_MAJOR} -papt
96 dh_md5sums -papt
97 dh_builddeb -papt
98
99 libapt-pkg-dev: build
100 dh_testdir -plibapt-pkg-dev
101 dh_testroot -plibapt-pkg-dev
102 dh_clean -plibapt-pkg-dev -k
103 dh_installdirs -plibapt-pkg-dev usr/lib usr/include/apt-pkg
104
105 ln -s libapt-pkg.so.${LIBAPT_MAJOR} debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
106
107 cp build/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/
108
109 dh_installdocs -plibapt-pkg-dev
110 dh_installchangelogs -plibapt-pkg-dev
111 dh_strip -plibapt-pkg-dev
112 dh_compress -plibapt-pkg-dev
113 dh_fixperms -plibapt-pkg-dev
114 dh_installdeb -plibapt-pkg-dev
115 dh_shlibdeps -plibapt-pkg-dev
116 dh_gencontrol -plibapt-pkg-dev
117 dh_md5sums -plibapt-pkg-dev
118 dh_builddeb -plibapt-pkg-dev
119
120 libapt-pkg-doc: build
121 dh_testdir -plibapt-pkg-doc
122 dh_testroot -plibapt-pkg-doc
123 dh_clean -plibapt-pkg-doc -k
124 dh_installdirs -plibapt-pkg-doc usr/doc/apt usr/doc/libapt-pkg-doc
125
126 cp -a build/docs/cache* build/docs/design* build/docs/dpkg-tech* \
127 build/docs/files* build/docs/method* debian/libapt-pkg-doc/usr/doc/apt/
128 cp -a debian/libapt-pkg-doc.dhelp debian/libapt-pkg-doc/usr/doc/libapt-pkg-doc/.dhelp
129
130 dh_installdocs -plibapt-pkg-doc
131 dh_installchangelogs -plibapt-pkg-doc
132 dh_strip -plibapt-pkg-doc
133 dh_compress -plibapt-pkg-doc
134 dh_fixperms -plibapt-pkg-doc
135 dh_installdeb -plibapt-pkg-doc
136 dh_shlibdeps -plibapt-pkg-doc
137 dh_gencontrol -plibapt-pkg-doc
138 dh_md5sums -plibapt-pkg-doc
139 dh_builddeb -plibapt-pkg-doc
140
141 source diff:
142 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
143
144 # Update from CVS
145 l33ch: really-clean
146 cvs update
147 buildlib/mkChangeLog
148
149 # Update from CVS and then configure for build
150 super-l33ch: l33ch Makefile.in
151
152 configure:
153 make startup
154
155 l33ch-stamp: super-l33ch
156 touch l33ch-stamp
157
158 really-clean: clean
159 -find -name Makefile.in -print0 | xargs -0r rm -f
160 find -name ChangeLog | xargs rm -f
161 rm -f l33ch-stamp
162
163 binary: binary-indep binary-arch
164 .PHONY: build clean binary-indep binary-arch binary