]> git.saurik.com Git - apt.git/blame - debian/rules
Added Depends: libapt-pkg2.2 to the libapt-pkg-dev
[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.
19fe86f1 5# $Id: rules,v 1.8 1999/03/16 09:43:41 mblevin 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
17 mkdir build
19fe86f1 18 make startup
2d18d44e
AL
19 cd build; ../configure
20 cd ..
21# cd build && CXXFLAGS="-g -Wall -D_POSIX_C_SOURCE=199309" ../configure --disable-nls --disable-static --prefix=/usr
22# cd build && make all-hdr
23# cd build && make -s
24
25 # Add here commands to compile the package.
26 make
27 touch build-stamp
28
29clean:
30 dh_testdir
31# dh_testroot
32 rm -f build-stamp
33 rm -rf build
34
35 # Add here commands to clean up after the build process.
36 -$(MAKE) clean
37 -$(MAKE) distclean
38 dh_clean
39
40# Build architecture-independent files here.
41binary-indep: build libapt-pkg-doc
42# We have nothing to do by default.
43
44# Build architecture-dependent files here.
45binary-arch: build apt libapt-pkg-dev
46
47apt: build
48# dh_testversion -papt
49 dh_testdir -papt
50 dh_testroot -papt
51 dh_clean -papt -k
52 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
53
54 cp build/bin/apt-* debian/tmp/usr/bin/
2553a569
AL
55
56 # install the shared libs
57 find build/bin/ -type f -name "libapt-pkg.so.*" -exec cp -a "{}" debian/tmp/usr/lib/ \;
58 find build/bin/ -type l -name "libapt-pkg.so.*" -exec cp -a "{}" debian/tmp/usr/lib/ \;
59
2d18d44e
AL
60 cp build/bin/methods/* debian/tmp/usr/lib/apt/methods/
61
62 cp build/scripts/dselect/* debian/tmp/usr/lib/dpkg/methods/apt/
63# cp debian/sources.list debian/tmp/etc/apt/
64
fc9d4b7b 65 # Copy the users guide
2d18d44e
AL
66 cp build/docs/guide.text debian/tmp/usr/doc/apt/users-guide.txt
67 mkdir debian/tmp/usr/doc/apt/users-guide.html/
68 cp -a build/docs/guide.html/* debian/tmp/usr/doc/apt/users-guide.html/
fc9d4b7b
AL
69
70 # Copy the offline guide
71 cp build/docs/offline.text debian/tmp/usr/doc/apt/offline.txt
72 mkdir debian/tmp/usr/doc/apt/offline.html/
73 cp -a build/docs/offline.html/* debian/tmp/usr/doc/apt/offline.html/
74
396f4b08
AL
75 cp -a debian/dhelp debian/tmp/usr/doc/apt/.dhelp
76
2d18d44e
AL
77# head -n 500 ChangeLog > debian/ChangeLog
78
79 dh_installdocs -papt
80 dh_installexamples -papt build/docs/examples/*
81# dh_installmenu -papt
82# dh_installinit -papt
83# dh_installcron -papt
84 dh_installmanpages -papt
85
86# dh_undocumented -papt
87 dh_installchangelogs -papt
88 dh_strip -papt
89 dh_compress -papt
90 dh_fixperms -papt
91 dh_suidregister -papt
92 dh_installdeb -papt
93 LD_LIBRARY_PATH=debian/tmp/usr/lib dh_shlibdeps -papt
d153f53f 94 echo libapt-pkg:major=${LIBAPT_MAJOR} >> debian/substvars
2d18d44e 95 dh_gencontrol -papt
d153f53f 96 dh_makeshlibs -m${LIBAPT_MAJOR} -Vlibapt-pkg${LIBAPT_MAJOR} -papt
2d18d44e
AL
97 dh_md5sums -papt
98 dh_builddeb -papt
99
100libapt-pkg-dev: build
101 dh_testdir -plibapt-pkg-dev
102 dh_testroot -plibapt-pkg-dev
103 dh_clean -plibapt-pkg-dev -k
104 dh_installdirs -plibapt-pkg-dev usr/lib usr/include/apt-pkg
105
d153f53f 106 ln -s libapt-pkg.so.${LIBAPT_MAJOR} debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
2d18d44e
AL
107
108 cp build/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/
109
110 dh_installdocs -plibapt-pkg-dev
111 dh_installchangelogs -plibapt-pkg-dev
112 dh_strip -plibapt-pkg-dev
113 dh_compress -plibapt-pkg-dev
114 dh_fixperms -plibapt-pkg-dev
115 dh_installdeb -plibapt-pkg-dev
116 dh_shlibdeps -plibapt-pkg-dev
19fe86f1 117 echo libapt-pkg:major=${LIBAPT_MAJOR} >> debian/libapt-pkg-dev.substvars
2d18d44e
AL
118 dh_gencontrol -plibapt-pkg-dev
119 dh_md5sums -plibapt-pkg-dev
120 dh_builddeb -plibapt-pkg-dev
121
122libapt-pkg-doc: build
123 dh_testdir -plibapt-pkg-doc
124 dh_testroot -plibapt-pkg-doc
125 dh_clean -plibapt-pkg-doc -k
396f4b08 126 dh_installdirs -plibapt-pkg-doc usr/doc/apt usr/doc/libapt-pkg-doc
2d18d44e
AL
127
128 cp -a build/docs/cache* build/docs/design* build/docs/dpkg-tech* \
129 build/docs/files* build/docs/method* debian/libapt-pkg-doc/usr/doc/apt/
995246fb 130 cp -a debian/libapt-pkg-doc.dhelp debian/libapt-pkg-doc/usr/doc/libapt-pkg-doc/.dhelp
2d18d44e
AL
131
132 dh_installdocs -plibapt-pkg-doc
133 dh_installchangelogs -plibapt-pkg-doc
134 dh_strip -plibapt-pkg-doc
135 dh_compress -plibapt-pkg-doc
136 dh_fixperms -plibapt-pkg-doc
137 dh_installdeb -plibapt-pkg-doc
138 dh_shlibdeps -plibapt-pkg-doc
139 dh_gencontrol -plibapt-pkg-doc
140 dh_md5sums -plibapt-pkg-doc
141 dh_builddeb -plibapt-pkg-doc
142
143source diff:
144 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
145
146# Update from CVS
147l33ch: really-clean
148 cvs update
7bf6fd0c 149 buildlib/mkChangeLog
2d18d44e
AL
150
151# Update from CVS and then configure for build
152super-l33ch: l33ch Makefile.in
153
154configure:
155 make startup
156
157l33ch-stamp: super-l33ch
158 touch l33ch-stamp
159
160really-clean: clean
161 -find -name Makefile.in -print0 | xargs -0r rm -f
162 find -name ChangeLog | xargs rm -f
163 rm -f l33ch-stamp
164
165binary: binary-indep binary-arch
166.PHONY: build clean binary-indep binary-arch binary