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