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