]> git.saurik.com Git - apt.git/blame - debian/rules
Remove make startup; make mkdir build not cause the who...
[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.
2ee6f3cb 5# $Id: rules,v 1.9 1999/03/16 19:30:31 che Exp $
2d18d44e
AL
6
7
8# Uncomment this to turn on verbose mode.
9#export DH_VERBOSE=1
10
d153f53f
AL
11# Find the libapt-pkg major version for use in other control files
12export LIBAPT_MAJOR=`egrep '^MAJOR=' apt-pkg/makefile |cut -d '=' -f 2`
13
2d18d44e
AL
14build: build-stamp
15build-stamp: configure
16 dh_testdir
2ee6f3cb 17 -mkdir build
2d18d44e
AL
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
28clean:
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.
40binary-indep: build libapt-pkg-doc
41# We have nothing to do by default.
42
43# Build architecture-dependent files here.
44binary-arch: build apt libapt-pkg-dev
45
46apt: 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/
2553a569
AL
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
2d18d44e
AL
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
fc9d4b7b 64 # Copy the users guide
2d18d44e
AL
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/
fc9d4b7b
AL
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
396f4b08
AL
74 cp -a debian/dhelp debian/tmp/usr/doc/apt/.dhelp
75
2d18d44e
AL
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
d153f53f 93 echo libapt-pkg:major=${LIBAPT_MAJOR} >> debian/substvars
2d18d44e 94 dh_gencontrol -papt
d153f53f 95 dh_makeshlibs -m${LIBAPT_MAJOR} -Vlibapt-pkg${LIBAPT_MAJOR} -papt
2d18d44e
AL
96 dh_md5sums -papt
97 dh_builddeb -papt
98
99libapt-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
d153f53f 105 ln -s libapt-pkg.so.${LIBAPT_MAJOR} debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
2d18d44e
AL
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
19fe86f1 116 echo libapt-pkg:major=${LIBAPT_MAJOR} >> debian/libapt-pkg-dev.substvars
2d18d44e
AL
117 dh_gencontrol -plibapt-pkg-dev
118 dh_md5sums -plibapt-pkg-dev
119 dh_builddeb -plibapt-pkg-dev
120
121libapt-pkg-doc: build
122 dh_testdir -plibapt-pkg-doc
123 dh_testroot -plibapt-pkg-doc
124 dh_clean -plibapt-pkg-doc -k
396f4b08 125 dh_installdirs -plibapt-pkg-doc usr/doc/apt usr/doc/libapt-pkg-doc
2d18d44e
AL
126
127 cp -a build/docs/cache* build/docs/design* build/docs/dpkg-tech* \
128 build/docs/files* build/docs/method* debian/libapt-pkg-doc/usr/doc/apt/
995246fb 129 cp -a debian/libapt-pkg-doc.dhelp debian/libapt-pkg-doc/usr/doc/libapt-pkg-doc/.dhelp
2d18d44e
AL
130
131 dh_installdocs -plibapt-pkg-doc
132 dh_installchangelogs -plibapt-pkg-doc
133 dh_strip -plibapt-pkg-doc
134 dh_compress -plibapt-pkg-doc
135 dh_fixperms -plibapt-pkg-doc
136 dh_installdeb -plibapt-pkg-doc
137 dh_shlibdeps -plibapt-pkg-doc
138 dh_gencontrol -plibapt-pkg-doc
139 dh_md5sums -plibapt-pkg-doc
140 dh_builddeb -plibapt-pkg-doc
141
142source diff:
143 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
144
145# Update from CVS
146l33ch: really-clean
147 cvs update
7bf6fd0c 148 buildlib/mkChangeLog
2d18d44e
AL
149
150# Update from CVS and then configure for build
151super-l33ch: l33ch Makefile.in
152
153configure:
154 make startup
155
156l33ch-stamp: super-l33ch
157 touch l33ch-stamp
158
159really-clean: clean
160 -find -name Makefile.in -print0 | xargs -0r rm -f
161 find -name ChangeLog | xargs rm -f
162 rm -f l33ch-stamp
163
164binary: binary-indep binary-arch
165.PHONY: build clean binary-indep binary-arch binary