]> git.saurik.com Git - apt.git/blob - debian/rules
*** empty log message ***
[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.11 1999/03/21 12:43:43 doogie Exp $
6
7 DEB_BUILD_PROG:=debuild
8 APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
9 APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in)
10
11 ifneq ($(APT_DEBVER),$(APT_CONFVER))
12 .PHONY: configure.in
13 configure.in:
14 sed -e 's/$(APT_CONFVER)/$(APT_DEBVER)/' $@ > $@.$$$$;mv $@.$$$$ $@
15 else
16 configure.in:
17 endif
18
19 # Uncomment this to turn on verbose mode.
20 #export DH_VERBOSE=1
21
22 # Find the libapt-pkg major version for use in other control files
23 export LIBAPT_MAJOR:=$(shell egrep '^MAJOR=' apt-pkg/makefile |cut -d '=' -f 2)
24 debian/shlibs.local:
25 rm $@
26 echo "libapt-pkg $(LIBAPT_MAJOR) libapt-pkg$(LIBAPT_MAJOR)" >> $@
27
28 build: build-stamp
29 build-stamp: configure
30 dh_testdir
31 -mkdir build
32 (cd build; ../configure)
33 # cd build && CXXFLAGS="-g -Wall -D_POSIX_C_SOURCE=199309" ../configure --disable-nls --disable-static --prefix=/usr
34 # cd build && make all-hdr
35 # cd build && make -s
36
37 # Add here commands to compile the package.
38 make
39 touch build-stamp
40
41 clean:
42 dh_testdir
43 # dh_testroot
44 rm -f build-stamp
45 rm -rf build
46
47 # Add here commands to clean up after the build process.
48 -$(MAKE) clean
49 -$(MAKE) distclean
50 dh_clean
51
52 binary-indep: libapt-pkg-doc
53 # Build architecture-independent files here.
54 libapt-pkg-doc: build debian/shlibs.local
55 dh_testdir -p$@
56 dh_testroot -p$@
57 dh_clean -p$@ -k
58 dh_installdirs -p$@
59 #
60 # libapt-pkg-doc install
61 #
62 cp -a build/docs/cache* build/docs/design* build/docs/dpkg-tech* \
63 build/docs/files* build/docs/method* debian/libapt-pkg-doc/usr/doc/apt/
64 cp -a debian/libapt-pkg-doc.dhelp debian/libapt-pkg-doc/usr/doc/libapt-pkg-doc/.dhelp
65 dh_installdocs -p$@
66 dh_installexamples -p$@
67 # dh_installmenu -p$@
68 # dh_installinit -p$@
69 # dh_installcron -p$@
70 dh_installmanpages -p$@
71
72 # dh_undocumented -p$@
73 dh_installchangelogs -p$@
74 dh_strip -p$@
75 dh_compress -p$@
76 dh_fixperms -p$@
77 # dh_suidregister -p$@
78 dh_installdeb -p$@
79 dh_gencontrol -p$@ -u -Vlibapt-pkg:major=${LIBAPT_MAJOR}
80 dh_md5sums -p$@
81 dh_builddeb -p$@
82
83
84 # Build architecture-dependent files here.
85
86 binary-arch: apt libapt-pkg-dev
87 apt: build debian/shlibs.local
88 dh_testdir -p$@
89 dh_testroot -p$@
90 dh_clean -p$@ -k
91 dh_installdirs -p$@
92 #
93 # apt install
94 #
95 cp build/bin/apt-* debian/tmp/usr/bin/
96
97 # install the shared libs
98 find build/bin/ -type f -name "libapt-pkg.so.*" -exec cp -a "{}" debian/tmp/usr/lib/ \;
99 find build/bin/ -type l -name "libapt-pkg.so.*" -exec cp -a "{}" debian/tmp/usr/lib/ \;
100
101 cp build/bin/methods/* debian/tmp/usr/lib/apt/methods/
102
103 cp build/scripts/dselect/* debian/tmp/usr/lib/dpkg/methods/apt/
104 # cp debian/sources.list debian/tmp/etc/apt/
105
106 # Copy the users guide
107 cp build/docs/guide.text debian/tmp/usr/doc/apt/users-guide.txt
108 cp -a build/docs/guide.html/* debian/tmp/usr/doc/apt/users-guide.html/
109
110 # Copy the offline guide
111 cp build/docs/offline.text debian/tmp/usr/doc/apt/offline.txt
112 cp -a build/docs/offline.html/* debian/tmp/usr/doc/apt/offline.html/
113
114 cp -a debian/dhelp debian/tmp/usr/doc/apt/.dhelp
115
116 # head -n 500 ChangeLog > debian/ChangeLog
117
118
119
120 dh_installdocs -p$@
121 dh_installexamples -papt build/docs/examples/*
122 # dh_installmenu -papt
123 # dh_installinit -papt
124 # dh_installcron -papt
125 dh_installmanpages -p$@
126
127 # dh_undocumented -papt
128 dh_installchangelogs -p$@
129 dh_strip -p$@
130 dh_compress -p$@
131 dh_fixperms -p$@
132 # dh_suidregister -p$@
133 dh_installdeb -p$@
134 LD_LIBRARY_PATH=`pwd`/debian/tmp/usr/lib dh_shlibdeps -papt
135 dh_gencontrol -p$@ -u -Vlibapt-pkg:major=${LIBAPT_MAJOR}
136 dh_makeshlibs -m${LIBAPT_MAJOR} -Vlibapt-pkg${LIBAPT_MAJOR} -papt
137 dh_md5sums -p$@
138 dh_builddeb -p$@
139
140 libapt-pkg-dev: build debian/shlibs.local
141 dh_testdir -p$@
142 dh_testroot -p$@
143 dh_clean -p$@ -k
144 dh_installdirs -p$@
145 #
146 # libapt-pkg-dev install
147 #
148 ln -s libapt-pkg.so.${LIBAPT_MAJOR} debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
149 cp build/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/
150
151 dh_installdocs -p$@
152 # dh_installmenu -papt
153 # dh_installinit -papt
154 # dh_installcron -papt
155 dh_installmanpages -p$@
156
157 dh_installchangelogs -p$@
158 dh_strip -p$@
159 dh_compress -p$@
160 dh_fixperms -p$@
161 # dh_suidregister -p$@
162 dh_installdeb -p$@
163 dh_gencontrol -p$@ -u -Vlibapt-pkg:major=${LIBAPT_MAJOR}
164 dh_md5sums -p$@
165 dh_builddeb -p$@
166
167 source diff:
168 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
169
170 # Update from CVS
171 l33ch: really-clean
172 cvs update
173 buildlib/mkChangeLog
174
175 # Update from CVS and then configure for build
176 super-l33ch: l33ch Makefile.in
177
178 configure:
179 make configure
180
181 l33ch-stamp: super-l33ch
182 touch l33ch-stamp
183
184 really-clean: clean
185 -find -name Makefile.in -print0 | xargs -0r rm -f
186 find -name ChangeLog | xargs rm -f
187 rm -f l33ch-stamp
188
189 binary: binary-indep binary-arch
190 .PHONY: build clean binary-indep binary-arch binary debian/shlibs.local
191
192
193 # Done by the uploader.
194 #cvs update..
195 #edit debian/changelog
196 # configure.in has the version automatically updated now.
197 # edit configure.in
198 # debian/rules cvs-build
199
200 cvs-build:
201 rm -rf debian/cvs-build
202 cvs update
203 buildlib/mkChangeLog
204 make startup
205 make doc
206 tar c --exclude CVS --exclude debian/cvs-build . |\
207 (mkdir -p debian/cvs-build/apt-$(APT_DEBVER);cd debian/cvs-build/apt-$(APT_DEBVER);tar x)
208 # The next line isn't needed, as debuild will make the .tar.gz for us.
209 # (cd debian/cvs-build;tar zcf apt_$(APT_DEBVER).tar.gz apt-$(APT_DEBVER))
210 (cd debian/cvs-build/apt-$(APT_DEBVER);$(DEB_BUILD_PROG) -us -uc)