Added debian/ directory and changelog, control, postins...
[ntk/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.
5# $Id: rules,v 1.1 1998/12/22 05:06:44 che Exp $
6
7
8# Uncomment this to turn on verbose mode.
9#export DH_VERBOSE=1
10
11build: build-stamp
12build-stamp: configure
13 dh_testdir
14 mkdir build
15 cd build; ../configure
16 cd ..
17# cd build && CXXFLAGS="-g -Wall -D_POSIX_C_SOURCE=199309" ../configure --disable-nls --disable-static --prefix=/usr
18# cd build && make all-hdr
19# cd build && make -s
20
21 # Add here commands to compile the package.
22 make
23 touch build-stamp
24
25clean:
26 dh_testdir
27# dh_testroot
28 rm -f build-stamp
29 rm -rf build
30
31 # Add here commands to clean up after the build process.
32 -$(MAKE) clean
33 -$(MAKE) distclean
34 dh_clean
35
36# Build architecture-independent files here.
37binary-indep: build libapt-pkg-doc
38# We have nothing to do by default.
39
40# Build architecture-dependent files here.
41binary-arch: build apt libapt-pkg-dev
42
43apt: build
44# dh_testversion -papt
45 dh_testdir -papt
46 dh_testroot -papt
47 dh_clean -papt -k
48 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
49
50 cp build/bin/apt-* debian/tmp/usr/bin/
51 cp build/bin/libapt-pkg.so.2.0 debian/tmp/usr/lib/
52 ln -s libapt-pkg.so.2.0 debian/tmp/usr/lib/libapt-pkg-so.2
53 cp build/bin/methods/* debian/tmp/usr/lib/apt/methods/
54
55 cp build/scripts/dselect/* debian/tmp/usr/lib/dpkg/methods/apt/
56# cp debian/sources.list debian/tmp/etc/apt/
57
58 cp build/docs/guide.text debian/tmp/usr/doc/apt/users-guide.txt
59 mkdir debian/tmp/usr/doc/apt/users-guide.html/
60 cp -a build/docs/guide.html/* debian/tmp/usr/doc/apt/users-guide.html/
61
62# head -n 500 ChangeLog > debian/ChangeLog
63
64 dh_installdocs -papt
65 dh_installexamples -papt build/docs/examples/*
66# dh_installmenu -papt
67# dh_installinit -papt
68# dh_installcron -papt
69 dh_installmanpages -papt
70
71# dh_undocumented -papt
72 dh_installchangelogs -papt
73 dh_strip -papt
74 dh_compress -papt
75 dh_fixperms -papt
76 dh_suidregister -papt
77 dh_installdeb -papt
78 LD_LIBRARY_PATH=debian/tmp/usr/lib dh_shlibdeps -papt
79 dh_gencontrol -papt
80 dh_makeshlibs -papt
81 dh_md5sums -papt
82 dh_builddeb -papt
83
84libapt-pkg-dev: build
85 dh_testdir -plibapt-pkg-dev
86 dh_testroot -plibapt-pkg-dev
87 dh_clean -plibapt-pkg-dev -k
88 dh_installdirs -plibapt-pkg-dev usr/lib usr/include/apt-pkg
89
90 ln -s libapt-pkg.so.2.0 debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
91
92 cp build/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/
93
94 dh_installdocs -plibapt-pkg-dev
95 dh_installchangelogs -plibapt-pkg-dev
96 dh_strip -plibapt-pkg-dev
97 dh_compress -plibapt-pkg-dev
98 dh_fixperms -plibapt-pkg-dev
99 dh_installdeb -plibapt-pkg-dev
100 dh_shlibdeps -plibapt-pkg-dev
101 dh_gencontrol -plibapt-pkg-dev
102 dh_md5sums -plibapt-pkg-dev
103 dh_builddeb -plibapt-pkg-dev
104
105libapt-pkg-doc: build
106 dh_testdir -plibapt-pkg-doc
107 dh_testroot -plibapt-pkg-doc
108 dh_clean -plibapt-pkg-doc -k
109 dh_installdirs -plibapt-pkg-doc usr/doc/apt
110
111 cp -a build/docs/cache* build/docs/design* build/docs/dpkg-tech* \
112 build/docs/files* build/docs/method* debian/libapt-pkg-doc/usr/doc/apt/
113
114 dh_installdocs -plibapt-pkg-doc
115 dh_installchangelogs -plibapt-pkg-doc
116 dh_strip -plibapt-pkg-doc
117 dh_compress -plibapt-pkg-doc
118 dh_fixperms -plibapt-pkg-doc
119 dh_installdeb -plibapt-pkg-doc
120 dh_shlibdeps -plibapt-pkg-doc
121 dh_gencontrol -plibapt-pkg-doc
122 dh_md5sums -plibapt-pkg-doc
123 dh_builddeb -plibapt-pkg-doc
124
125source diff:
126 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
127
128# Update from CVS
129l33ch: really-clean
130 cvs update
131 utils/mkChangeLog
132
133# Update from CVS and then configure for build
134super-l33ch: l33ch Makefile.in
135
136configure:
137 make startup
138
139l33ch-stamp: super-l33ch
140 touch l33ch-stamp
141
142really-clean: clean
143 -find -name Makefile.in -print0 | xargs -0r rm -f
144 find -name ChangeLog | xargs rm -f
145 rm -f l33ch-stamp
146
147binary: binary-indep binary-arch
148.PHONY: build clean binary-indep binary-arch binary