4 | 4 |
# Uncomment this to turn on verbose mode.
|
5 | 5 |
#export DH_VERBOSE=1
|
6 | 6 |
|
7 | |
topdir=$(shell pwd)
|
8 | |
udebbuild=$(topdir)/debian/build-udeb
|
9 | |
debbuild=$(topdir)/debian/build
|
|
7 |
debbuild=debian/build-deb
|
|
8 |
udebbuild=debian/build-udeb
|
10 | 9 |
|
11 | 10 |
DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
|
12 | 11 |
CONFFILE=/etc/cdebconf.conf
|
|
15 | 14 |
LIBDEBCONFDEV=libdebconfclient0-dev
|
16 | 15 |
LIBDEBCONF=libdebconfclient0
|
17 | 16 |
|
18 | |
FRONTENDS=text newt
|
|
17 |
DEB_FRONTENDS=text newt
|
19 | 18 |
UDEB_FRONTENDS=text newt
|
20 | 19 |
|
21 | 20 |
SIZEOPTFLAG=-Os
|
|
28 | 27 |
DEBUG_CONFIGURE_OPT=--with-debug=yes
|
29 | 28 |
endif
|
30 | 29 |
|
|
30 |
build: build-deb build-udeb
|
|
31 |
|
|
32 |
$(debbuild)/config.status:
|
|
33 |
[ -d $(debbuild) ] || mkdir -p $(debbuild)
|
|
34 |
cd $(debbuild); \
|
|
35 |
CFLAGS="$(CFLAGS) $(SPEEDOPTFLAG)" \
|
|
36 |
../../configure \
|
|
37 |
--prefix=/usr \
|
|
38 |
--sysconfdir=/etc \
|
|
39 |
--without-rpath \
|
|
40 |
--with-db="textdb rfc822db" \
|
|
41 |
--with-frontend="$(DEB_FRONTENDS)" \
|
|
42 |
--with-textwrap \
|
|
43 |
--with-conffile=$(CONFFILE) \
|
|
44 |
$(DEBUG_CONFIGURE_OPT)
|
|
45 |
|
|
46 |
build-deb: build-deb-stamp
|
|
47 |
build-deb-stamp: $(debbuild)/config.status
|
|
48 |
dh_testdir
|
|
49 |
$(MAKE) -C $(debbuild)
|
|
50 |
touch $@
|
|
51 |
|
|
52 |
$(udebbuild)/config.status:
|
|
53 |
[ -d $(udebbuild) ] || mkdir -p $(udebbuild)
|
|
54 |
cd $(udebbuild); \
|
|
55 |
CFLAGS="$(CFLAGS) $(SIZEOPTFLAG) -fomit-frame-pointer" \
|
|
56 |
../../configure \
|
|
57 |
--prefix=/usr \
|
|
58 |
--sysconfdir=/etc \
|
|
59 |
--enable-d-i \
|
|
60 |
--without-rpath --with-db="rfc822db" \
|
|
61 |
--with-frontend="$(UDEB_FRONTENDS)" \
|
|
62 |
--with-default-frontend=newt \
|
|
63 |
--with-syslog-logging \
|
|
64 |
--with-textwrap \
|
|
65 |
--with-conffile=$(CONFFILE) \
|
|
66 |
$(DEBUG_CONFIGURE_OPT)
|
|
67 |
|
|
68 |
build-udeb: build-udeb-stamp
|
|
69 |
build-udeb-stamp: $(udebbuild)/config.status
|
|
70 |
dh_testdir
|
|
71 |
$(MAKE) -C $(udebbuild)
|
|
72 |
touch $@
|
|
73 |
|
31 | 74 |
clean:
|
32 | 75 |
dh_testdir
|
33 | 76 |
dh_testroot
|
34 | 77 |
rm -f *-stamp
|
35 | |
-$(MAKE) distclean
|
36 | |
-rm -rf $(udebbuild)
|
37 | |
-rm -rf $(debbuild)
|
|
78 |
-rm -rf $(debbuild) $(udebbuild)
|
38 | 79 |
dh_clean
|
39 | 80 |
|
40 | |
build-udeb: build-udeb-stamp
|
41 | |
build-udeb-stamp:
|
42 | |
dh_testdir
|
43 | |
[ -d $(udebbuild) ] || mkdir -p $(udebbuild)
|
44 | |
(cd $(udebbuild); CFLAGS="$(CFLAGS) $(SIZEOPTFLAG) -fomit-frame-pointer" \
|
45 | |
$(topdir)/configure --prefix=/usr --sysconfdir=/etc \
|
46 | |
--enable-d-i \
|
47 | |
--without-rpath --with-db="rfc822db" \
|
48 | |
--with-frontend="$(UDEB_FRONTENDS)" $(DEBUG_CONFIGURE_OPT) \
|
49 | |
--with-default-frontend=newt \
|
50 | |
--with-syslog-logging \
|
51 | |
--with-textwrap \
|
52 | |
--with-conffile=$(CONFFILE))
|
53 | |
(cd $(udebbuild); $(MAKE) clean; $(MAKE))
|
54 | |
touch $@
|
|
81 |
install: install-arch install-indep
|
55 | 82 |
|
56 | |
build: build-stamp
|
57 | |
build-stamp:
|
58 | |
dh_testdir
|
59 | |
[ -d $(debbuild) ] || mkdir -p $(debbuild)
|
60 | |
(cd $(debbuild); CFLAGS="$(CFLAGS) $(SPEEDOPTFLAG)" \
|
61 | |
$(topdir)/configure --prefix=/usr --sysconfdir=/etc \
|
62 | |
--without-rpath $(DEBUG_CONFIGURE_OPT) \
|
63 | |
--with-db="textdb rfc822db" \
|
64 | |
--with-frontend="$(FRONTENDS)" \
|
65 | |
--with-textwrap \
|
66 | |
--with-conffile=$(CONFFILE))
|
67 | |
(cd $(debbuild); $(MAKE) clean; $(MAKE))
|
68 | |
touch $@
|
69 | |
|
70 | |
install-udeb: build-udeb install-dirs
|
|
83 |
install-arch: build
|
71 | 84 |
dh_testdir
|
72 | 85 |
dh_testroot
|
73 | |
dh_installdebconf -n -pcdebconf-udeb
|
74 | |
(cd $(udebbuild); \
|
75 | |
$(MAKE) install prefix=$(shell pwd)/debian/cdebconf-udeb/usr \
|
76 | |
etcdir=$(shell pwd)/debian/cdebconf-udeb/etc )
|
77 | |
rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/include
|
78 | |
rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/share/man
|
79 | |
rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/lib/cdebconf/frontend/newt.so
|
80 | |
rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/lib/cdebconf/frontend/text.so
|
81 | |
rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/lib/lib*.a
|
82 | |
rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/lib/libdebconfclient.so
|
83 | |
mv $(shell pwd)/debian/cdebconf-udeb/usr/lib/libdebconfclient.so.* \
|
84 | |
$(shell pwd)/debian/libdebconfclient0-udeb/usr/lib
|
|
86 |
dh_clean -k -a
|
|
87 |
$(MAKE) -C $(debbuild) install DESTDIR=$(CURDIR)/debian/tmp/deb
|
|
88 |
$(MAKE) -C $(udebbuild) install DESTDIR=$(CURDIR)/debian/tmp/udeb
|
|
89 |
dh_install -a --sourcedir=debian/tmp
|
85 | 90 |
|
86 | |
install-priority-udeb: build-udeb install-dirs
|
|
91 |
install-indep:
|
|
92 |
|
|
93 |
# Build architecture-independent files here.
|
|
94 |
binary-indep: install-indep
|
87 | 95 |
dh_testdir
|
88 | 96 |
dh_testroot
|
89 | |
dh_installdebconf -n -pcdebconf-priority
|
|
97 |
dh_installchangelogs -i
|
|
98 |
dh_installdocs -i
|
|
99 |
dh_installdebconf -i
|
|
100 |
dh_installdirs -i
|
|
101 |
dh_compress -i
|
|
102 |
dh_fixperms -i
|
|
103 |
dh_installdeb -i
|
|
104 |
dh_gencontrol -i
|
|
105 |
dh_builddeb -i
|
90 | 106 |
|
91 | |
install-slang-udeb: build-udeb install-dirs
|
|
107 |
# Build architecture-dependent files here.
|
|
108 |
binary-arch: install-arch
|
92 | 109 |
dh_testdir
|
93 | 110 |
dh_testroot
|
94 | |
dh_installdebconf -n -pcdebconf-slang-udeb
|
95 | |
(cd $(udebbuild)/src/modules/frontend/slang; \
|
96 | |
$(MAKE) install prefix=$(shell pwd)/debian/cdebconf-slang-udeb/usr )
|
97 | |
|
98 | |
install-newt-udeb: build-udeb install-dirs
|
99 | |
dh_testdir
|
100 | |
dh_testroot
|
101 | |
dh_installdebconf -n -pcdebconf-newt-udeb
|
102 | |
(cd $(udebbuild)/src/modules/frontend/newt; \
|
103 | |
$(MAKE) install prefix=$(shell pwd)/debian/cdebconf-newt-udeb/usr )
|
104 | |
|
105 | |
install-text-udeb: build-udeb install-dirs
|
106 | |
dh_testdir
|
107 | |
dh_testroot
|
108 | |
dh_installdebconf -n -pcdebconf-text-udeb
|
109 | |
(cd $(udebbuild)/src/modules/frontend/text; \
|
110 | |
$(MAKE) install prefix=$(shell pwd)/debian/cdebconf-text-udeb/usr )
|
111 | |
|
112 | |
install-gtk-udeb: build-udeb install-dirs
|
113 | |
dh_testdir
|
114 | |
dh_testroot
|
115 | |
dh_installdebconf -n -pcdebconf-gtk-udeb
|
116 | |
(cd $(udebbuild)/src/modules/frontend/gtk; \
|
117 | |
$(MAKE) install prefix=$(shell pwd)/debian/cdebconf-gtk-udeb/usr )
|
118 | |
|
119 | |
install: build install-dirs
|
120 | |
dh_testdir
|
121 | |
dh_testroot
|
122 | |
(cd $(debbuild); \
|
123 | |
$(MAKE) install prefix=$(shell pwd)/debian/cdebconf/usr \
|
124 | |
etcdir=$(shell pwd)/debian/cdebconf/etc )
|
125 | |
|
126 | |
d-shlibmove --commit --movedev debian/cdebconf/usr/include/cdebconf \
|
127 | |
usr/include debian/cdebconf/usr/lib/lib*.so
|
128 | |
|
129 | |
|
130 | |
|
131 | |
rm -rf debian/cdebconf/usr/include
|
132 | |
|
133 | |
install-dirs: install-dirs-stamp
|
134 | |
install-dirs-stamp:
|
135 | |
dh_testdir
|
136 | |
dh_testroot
|
137 | |
dh_clean -k
|
138 | |
dh_installdirs
|
139 | |
|
140 | |
# Build architecture-independent files here.
|
141 | |
binary-indep: build install
|
142 | |
# We have nothing to do by default.
|
143 | |
|
144 | |
# Build architecture-dependent files here.
|
145 | |
#
|
146 | |
# Note that this builds a .udeb, which is not policy compliant or anything.
|
147 | |
binary-arch: cdebconf cdebconf-udeb cdebconf-priority libdebconfclient0-udeb \
|
148 | |
cdebconf-newt-udeb cdebconf-text-udeb
|
149 | |
|
150 | |
$(LIBDEBCONF): install
|
151 | |
dh_testdir
|
152 | |
dh_testroot
|
153 | |
dh_installdirs
|
154 | |
|
155 | |
dh_installdocs -p$@
|
156 | |
dh_installchangelogs -p$@
|
157 | |
dh_makeshlibs -p$@
|
158 | |
dh_strip -p$@
|
159 | |
dh_compress -p$@
|
160 | |
dh_fixperms -p$@
|
161 | |
dh_installdeb -p$@
|
162 | |
dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
163 | |
dh_gencontrol -p$@
|
164 | |
dh_md5sums -p$@
|
165 | |
dh_builddeb -p$@
|
166 | |
|
167 | |
$(LIBDEBCONFDEV): install
|
168 | |
dh_testdir
|
169 | |
dh_testroot
|
170 | |
dh_installdirs
|
171 | |
|
172 | |
dh_installdocs -p$@
|
173 | |
dh_installchangelogs -p$@
|
174 | |
#dh_strip -p$@
|
175 | |
dh_compress -p$@
|
176 | |
dh_fixperms -p$@
|
177 | |
dh_installdeb -p$@
|
178 | |
#dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
179 | |
dh_gencontrol -p$@
|
180 | |
dh_md5sums -p$@
|
181 | |
dh_builddeb -p$@
|
182 | |
|
183 | |
cdebconf: $(LIBDEBCONFDEV) $(LIBDEBCONF)
|
184 | |
@echo "Building $@"
|
185 | |
dh_testdir
|
186 | |
dh_testroot
|
187 | |
dh_installdirs
|
188 | |
|
189 | |
dh_installdocs -p$@ doc/*
|
190 | |
dh_installchangelogs -p$@
|
191 | |
dh_strip -p$@
|
192 | |
dh_compress -p$@
|
193 | |
dh_fixperms -p$@
|
194 | |
dh_makeshlibs -p$@
|
195 | |
dh_installdeb -p$@
|
196 | |
dh_shlibdeps -p$@ -ldebian/$(LIBDEBCONF)/usr/lib
|
197 | |
dh_gencontrol -p$@
|
198 | |
dh_md5sums -p$@
|
199 | |
dh_builddeb -p$@
|
200 | |
|
201 | |
|
202 | |
|
203 | |
cdebconf-udeb: install-udeb
|
204 | |
@echo "Building $@"
|
205 | |
dh_testdir
|
206 | |
dh_testroot
|
207 | |
dh_installdirs
|
208 | |
dh_strip -p$@
|
209 | |
dh_compress -p$@
|
210 | |
dh_fixperms -p$@
|
211 | |
dh_installdeb -p$@
|
212 | |
dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
213 | |
dh_gencontrol -p$@
|
214 | |
dh_builddeb -p$@
|
215 | |
|
216 | |
cdebconf-priority: install-priority-udeb
|
217 | |
@echo "Building $@"
|
218 | |
dh_testdir
|
219 | |
dh_testroot
|
220 | |
dh_installdirs
|
221 | |
dh_strip -p$@
|
222 | |
dh_compress -p$@
|
223 | |
dh_fixperms -p$@
|
224 | |
dh_installdeb -p$@
|
225 | |
dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
226 | |
dh_gencontrol -p$@
|
227 | |
dh_builddeb -p$@
|
228 | |
|
229 | |
libdebconfclient0-udeb: install-udeb
|
230 | |
@echo "Building $@"
|
231 | |
dh_testdir
|
232 | |
dh_testroot
|
233 | |
dh_strip -p$@
|
234 | |
dh_compress -p$@
|
235 | |
dh_fixperms -p$@
|
236 | |
dh_installdeb -p$@
|
237 | |
dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
238 | |
dh_gencontrol -p$@
|
239 | |
dh_builddeb -p$@
|
240 | |
|
241 | |
cdebconf-text-udeb: install-text-udeb
|
242 | |
@echo "building $@"
|
243 | |
dh_testdir
|
244 | |
dh_testroot
|
245 | |
dh_installdirs
|
246 | |
dh_strip -p$@
|
247 | |
dh_compress -p$@
|
248 | |
dh_fixperms -p$@
|
249 | |
dh_installdeb -p$@
|
250 | |
dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
251 | |
dh_gencontrol -p$@
|
252 | |
dh_builddeb -p$@
|
253 | |
|
254 | |
cdebconf-slang-udeb: install-slang-udeb
|
255 | |
@echo "building $@"
|
256 | |
dh_testdir
|
257 | |
dh_testroot
|
258 | |
dh_installdirs
|
259 | |
dh_strip -p$@
|
260 | |
dh_compress -p$@
|
261 | |
dh_fixperms -p$@
|
262 | |
dh_installdeb -p$@
|
263 | |
dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
264 | |
dh_builddeb -p$@
|
265 | |
|
266 | |
cdebconf-newt-udeb: install-newt-udeb
|
267 | |
@echo "Building $@"
|
268 | |
dh_testdir
|
269 | |
dh_testroot
|
270 | |
dh_installdirs
|
271 | |
dh_strip -p$@
|
272 | |
dh_compress -p$@
|
273 | |
dh_fixperms -p$@
|
274 | |
dh_installdeb -p$@
|
275 | |
dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
276 | |
dh_gencontrol -p$@
|
277 | |
dh_builddeb -p$@
|
278 | |
|
279 | |
cdebconf-gtk-udeb: install-gtk-udeb
|
280 | |
@echo "Building $@"
|
281 | |
dh_testdir
|
282 | |
dh_testroot
|
283 | |
dh_installdirs
|
284 | |
dh_strip -p$@
|
285 | |
dh_compress -p$@
|
286 | |
dh_fixperms -p$@
|
287 | |
dh_installdeb -p$@
|
288 | |
dh_shlibdeps -p$@ -ldebian/$@/usr/lib
|
289 | |
dh_gencontrol -p$@
|
290 | |
dh_builddeb -p$@
|
|
111 |
dh_installchangelogs -s
|
|
112 |
dh_installdocs -s
|
|
113 |
dh_installdebconf -s
|
|
114 |
dh_installdirs -s
|
|
115 |
dh_strip -s
|
|
116 |
dh_compress -s
|
|
117 |
dh_fixperms -s
|
|
118 |
dh_makeshlibs -s
|
|
119 |
dh_installdeb -s
|
|
120 |
dh_shlibdeps -s
|
|
121 |
dh_gencontrol -s
|
|
122 |
dh_builddeb -s
|
291 | 123 |
|
292 | 124 |
binary: binary-indep binary-arch
|
293 | 125 |
.PHONY: build clean binary-indep binary-arch binary install
|