• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /usr/bin/make -f
2# -*- makefile -*-
3#
4# Invoke each target with `./debian/rules <target>'.  All targets should be
5# invoked with the package root as the current directory.
6#
7# The `binary' target must be run as root, as it needs to install files with
8# specific ownerships.
9
10# be paranoid
11export LC_ALL=C
12
13# These are used for cross-compiling and for saving the configure script
14# from having to guess our platform (since we know it already)
15DEB_HOST_ARCH   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
16DEB_BUILD_ARCH   ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
17DEB_HOST_OS   ?= $(shell dpkg-architecture -qDEB_HOST_OS)
18DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
19DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
20
21# find the version for the main package, from changelog file
22MAIN_VERSION = $(shell head -n 1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
23# find versions for libraries going into their own packages, from their Makefile.in's,
24# and sonames for all libs
25COMERR_VERSION = $(shell grep ELF_VERSION lib/et/Makefile.in | cut '-d ' -f3)
26COMERR_SOVERSION = $(shell grep ELF_SO_VERSION lib/et/Makefile.in | cut '-d ' -f3)
27SS_VERSION = $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
28SS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
29UUID_VERSION = $(shell grep ELF_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
30UUID_SOVERSION = $(shell grep ELF_SO_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
31BLKID_VERSION = $(shell grep ELF_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
32BLKID_SOVERSION = $(shell grep ELF_SO_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
33EXT2FS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3)
34E2P_SOVERSION = $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3)
35
36package=e2fsprogs
37
38topdir=$(shell pwd)
39debdir=${topdir}/debian
40tmpdir=${debdir}/tmp
41udebdir=${debdir}/e2fsprogs-udeb
42blkidudebdir=${debdir}/libblkid1-udeb
43uuidudebdir=${debdir}/libuuid1-udeb
44maindir=${debdir}/e2fsprogs
45stdbuilddir=${debdir}/BUILD-STD
46bfbuilddir=${debdir}/BUILD-BF
47staticbuilddir=${debdir}/BUILD-STATIC
48mipsbuilddir=${debdir}/BUILD-MIPS
49mipsbuilddir64=${debdir}/BUILD-MIPS-64
50# docdir=${maindir}/usr/share/doc/${package}
51MANDIR=/usr/share/man
52mandir=${tmpdir}${MANDIR}
53
54UDEB_NAME = $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
55UDEB_PRIORITY = $(shell grep '^Package: e2fsprogs-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
56
57BLKID_UDEB_NAME = libblkid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
58BLKID_UDEB_PRIORITY = $(shell grep '^Package: libblkid1-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
59
60UUID_UDEB_NAME = libuuid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
61UUID_UDEB_PRIORITY = $(shell grep '^Package: libuuid1-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
62
63STAMPSDIR=debian/stampdir
64CFGSTDSTAMP=${STAMPSDIR}/configure-std-stamp
65CFGBFSTAMP=${STAMPSDIR}/configure-bf-stamp
66CFGSTATICSTAMP=${STAMPSDIR}/configure-static-stamp
67BUILDSTDSTAMP=${STAMPSDIR}/build-std-stamp
68BUILDBFSTAMP=${STAMPSDIR}/build-bf-stamp
69BUILDSTATICSTAMP=${STAMPSDIR}/build-static-stamp
70
71CCOPTS = -g
72
73INSTALL = install
74INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 0755
75
76ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
77CCOPTS += -O2
78endif
79ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
80INSTALL_PROGRAM += -s
81endif
82
83ifeq (${DEB_HOST_ARCH},alpha)
84CCOPTS += -DHAVE_NETINET_IN_H
85else
86CCOPTS += -D__NO_STRING_INLINES
87endif
88
89ifeq (${DEB_HOST_ARCH_OS},linux)
90DEVMAPPER = --enable-blkid-devmapper
91BUILD_STATIC = build-static
92E2FSCK_STATIC = ${staticbuilddir}/e2fsck/e2fsck.static
93else
94E2FSCK_STATIC = ${stdbuilddir}/e2fsck/e2fsck.static
95endif
96
97BF_CCOPTS = -Os -fomit-frame-pointer
98
99COMMON_CONF_FLAGS =  \
100                --enable-elf-shlibs --infodir=/usr/share/info --enable-fsck
101
102STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression \
103		${DEVMAPPER}
104
105BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
106	--disable-nls --disable-swapfs --disable-imager \
107	--disable-uuidd --disable-tls \
108	--disable-debugfs  --disable-e2initrd-helper
109
110STATIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
111	--disable-nls --disable-imager \
112	--disable-uuidd --disable-tls \
113	--disable-e2initrd-helper \
114	--with-ccopts=-fno-stack-protector
115
116MIPS_NOPIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
117	--disable-nls \
118	--disable-swapfs --disable-imager \
119	--disable-uuidd --disable-tls \
120        --disable-resizer # --disable-debugfs
121
122# we can't use those flags at configure time
123MIPS_CFLAGS= -G 0 -fno-pic -mno-abicalls
124MIPS_CFLAGS_64= -mabi=64 -G 0 -fno-pic -mno-abicalls
125
126ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
127ifneq (,$(findstring $(DEB_BUILD_ARCH),mips mipsel))
128ismips=ismips
129endif
130endif
131
132${CFGSTDSTAMP}:
133	dh_testdir
134
135	# Make sure we don't try to rebuild the configure scripts
136	find . -name configure | xargs touch
137
138	mkdir -p ${stdbuilddir}
139ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
140	cd ${stdbuilddir} && AWK=/usr/bin/awk \
141		${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS}
142else
143	cd ${stdbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
144		${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
145		--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
146endif
147
148  # specially-built MIPS libs
149ifneq ($(ismips),)
150	mkdir -p ${mipsbuilddir} ${mipsbuilddir64}
151	cd ${mipsbuilddir} && AWK=/usr/bin/awk \
152		${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS}
153	cd ${mipsbuilddir64} && AWK=/usr/bin/awk \
154		${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS}
155endif
156
157	mkdir -p ${STAMPSDIR}
158	touch ${CFGSTDSTAMP}
159
160${CFGBFSTAMP}:
161	dh_testdir
162	rm -f config.cache
163
164	mkdir -p ${bfbuilddir}
165ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
166	cd ${bfbuilddir} && AWK=/usr/bin/awk \
167		${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS}
168else
169	cd ${bfbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
170		${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
171		--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
172endif
173	mkdir -p ${STAMPSDIR}
174	touch ${CFGBFSTAMP}
175
176${CFGSTATICSTAMP}:
177	dh_testdir
178	rm -f config.cache
179
180	mkdir -p ${staticbuilddir}
181ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
182	if type diet > /dev/null  2>&1 ; then \
183		STATIC_CONF_FLAGS="$STATIC_CONF_FLAGS --with-diet-libc"; \
184	fi
185	cd ${staticbuilddir} && AWK=/usr/bin/awk \
186		${topdir}/configure ${STATIC_CONF_FLAGS}
187else
188	cd ${staticbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
189		${topdir}/configure ${COMMON_CONF_FLAGS} ${STATIC_CONF_FLAGS} \
190		--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
191endif
192	mkdir -p ${STAMPSDIR}
193	touch ${CFGSTATICSTAMP}
194
195build: build-std build-bf $(BUILD_STATIC)
196
197build-std: ${BUILDSTDSTAMP}
198${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
199	dh_testdir
200	$(MAKE) -C ${stdbuilddir} all
201	$(MAKE) -C ${stdbuilddir}/e2fsck e2fsck.static
202
203	( cd ${stdbuilddir}/doc && \
204	  texi2html -split_chapter ${topdir}/doc/libext2fs.texinfo )
205	( cd ${stdbuilddir}/lib/et && $(MAKE) com_err.info && \
206	  texi2html -split_chapter -expandinfo ${topdir}/lib/et/com_err.texinfo )
207
208  # specially-built MIPS libs
209ifneq ($(ismips),)
210	$(MAKE) -C ${mipsbuilddir}/util
211	$(MAKE) -C ${mipsbuilddir} \
212		CFLAGS="${CCOPTS} ${MIPS_CFLAGS}" \
213		LIB_SUBDIRS="lib/et lib/ext2fs" libs
214	$(MAKE) -C ${mipsbuilddir64}/util
215	$(MAKE) -C ${mipsbuilddir64} \
216		CFLAGS="${CCOPTS} ${MIPS_CFLAGS_64}" \
217		LIB_SUBDIRS="lib/et lib/ext2fs" libs
218endif
219
220	touch ${BUILDSTDSTAMP}
221
222build-bf: ${BUILDBFSTAMP}
223${BUILDBFSTAMP}: ${CFGBFSTAMP}
224	dh_testdir
225	$(MAKE) -C ${bfbuilddir} libs
226	$(MAKE) -C ${bfbuilddir}/e2fsck all
227	$(MAKE) -C ${bfbuilddir}/misc all
228	touch ${BUILDBFSTAMP}
229
230build-static: ${BUILDSTATICSTAMP}
231${BUILDSTATICSTAMP}: ${CFGSTATICSTAMP}
232	dh_testdir
233	$(MAKE) -C ${staticbuilddir} libs
234	$(MAKE) -C ${staticbuilddir}/e2fsck all e2fsck.static
235	touch ${BUILDSTATICSTAMP}
236
237clean:
238	dh_testdir
239	rm -rf ${STAMPSDIR}
240	[ ! -f ${stdbuilddir}/Makefile ] || $(MAKE) -C ${stdbuilddir} distclean
241	[ ! -f ${bfbuilddir}/Makefile ] || $(MAKE) -C ${bfbuilddir} distclean
242	[ ! -f ${staticbuilddir}/Makefile ] || $(MAKE) -C ${staticbuilddir} distclean
243	rm -rf ${stdbuilddir} ${bfbuilddir} ${staticbuilddir} ${mipsbuilddir} ${mipsbuilddir64}
244	rm -f doc/libext2fs/*.html lib/et/com_err/*.html debian/*.substvars
245	dh_clean
246
247install: cleanup install-std
248
249# This rule allows to factorize the dh_clean between the 2 install rules
250# This must be launched before install-* (if launching them by hand, for
251# exemple) or results are unpredictable
252cleanup:
253	dh_testdir
254	dh_testroot
255	dh_clean -k
256
257install-std: DH_OPTIONS=
258install-std: build
259	dh_testdir
260	dh_testroot
261	dh_installdirs
262
263	mkdir -p ${tmpdir}/sbin
264	$(MAKE) -C ${stdbuilddir} install DESTDIR=${tmpdir} \
265		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
266  # static libs and .h files
267	$(MAKE) -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
268
269  # statically-linked fsck
270	${INSTALL_PROGRAM} $(E2FSCK_STATIC) ${tmpdir}/sbin
271	cp ${mandir}/man8/e2fsck.8 ${mandir}/man8/e2fsck.static.8
272
273	ln -s et/com_err.h ${tmpdir}/usr/include
274
275	dh_movefiles
276	test -z `find ${tmpdir} -type f`
277
278  # specially-built MIPS libs
279ifneq ($(ismips),)
280	$(INSTALL) -p -m 0644 ${mipsbuilddir}/lib/libext2fs.a \
281		${debdir}/e2fslibs-dev/usr/lib/libext2fs-nopic.a
282	$(INSTALL) -p -m 0644 ${mipsbuilddir64}/lib/libext2fs.a \
283		${debdir}/e2fslibs-dev/usr/lib/lib64ext2fs-nopic.a
284endif
285
286install-udeb: DH_OPTIONS=
287install-udeb: build
288	dh_testdir
289	dh_testroot
290
291	$(MAKE) -C ${bfbuilddir} install-shlibs-libs-recursive DESTDIR=${udebdir} \
292		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
293	$(MAKE) -C ${bfbuilddir}/e2fsck install DESTDIR=${udebdir} \
294		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
295	$(MAKE) -C ${bfbuilddir}/misc install DESTDIR=${udebdir} \
296		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
297	$(MAKE) -C ${bfbuilddir}/resize install DESTDIR=${udebdir} \
298		INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
299
300	rm -rf ${udebdir}/usr
301	find ${udebdir}/sbin -type f -a ! -name e2fsck \
302		-a ! -name mke2fs -a ! -name tune2fs \
303		-a ! -name resize2fs -a ! -name badblocks -print | xargs rm
304
305	(cd ${udebdir}/sbin; ln -s e2fsck fsck.ext2 ; \
306		ln -s e2fsck fsck.ext3 ; ln -s mke2fs mkfs.ext2 ; \
307		ln -s mke2fs mkfs.ext3)
308
309	mkdir -p ${blkidudebdir}/lib
310	mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib
311
312	mkdir -p ${uuidudebdir}/lib
313	mv ${udebdir}/lib/libuuid.* ${uuidudebdir}/lib
314
315binary-indep:
316  # no arch-independant debs.
317
318binary-arch: DH_OPTIONS= -a
319binary-arch: install install-udeb
320	dh_testdir
321	dh_testroot
322
323  # lintian overrides
324	for i in $$(cd debian && echo *.lintian-overrides); do \
325		pkg=$${i%.lintian-overrides} ;\
326		$(INSTALL) -m 0644 -D -p debian/$$i ${debdir}/$${pkg}/usr/share/lintian/overrides/$${pkg} ;\
327	done
328
329  # mkinitrd script
330	mkdir -p debian/e2fsprogs/usr/share/initrd-tools/scripts
331	$(INSTALL) -p -o root -g root -m 0755 debian/initrd-tools.e2fsprogs \
332		debian/e2fsprogs/usr/share/initrd-tools/scripts/e2fsprogs
333
334  # initrd script
335	mkdir -p debian/e2fsprogs/usr/share/e2fsprogs
336	$(INSTALL) -p -o root -g root -m 0755 debian/initrd.ext3-add-journal \
337		debian/e2fsprogs/usr/share/e2fsprogs/initrd.ext3-add-journal
338
339
340  # symlinks to prepare dh_installdocs run
341
342	mkdir -p ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}
343	mkdir -p ${debdir}/libblkid-dev/usr/share/doc
344	ln -sf libblkid${BLKID_SOVERSION} ${debdir}/libblkid-dev/usr/share/doc/libblkid-dev
345
346	mkdir -p ${debdir}/libss${SS_SOVERSION}/usr/share/doc/libss${SS_SOVERSION}
347	mkdir -p ${debdir}/ss-dev/usr/share/doc
348	ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev
349
350	mkdir -p ${debdir}/libcomerr${COMERR_SOVERSION}/usr/share/doc/libcomerr${COMERR_SOVERSION}
351	mkdir -p ${debdir}/comerr-dev/usr/share/doc
352	ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
353
354	mkdir -p ${debdir}/libuuid${UUID_SOVERSION}/usr/share/doc/libuuid${UUID_SOVERSION}
355	mkdir -p ${debdir}/uuid-dev/usr/share/doc
356#	ln -sf libuuid${UUID_SOVERSION} ${debdir}/uuid-dev/usr/share/doc/uuid-dev
357
358	mkdir -p ${debdir}/e2fslibs/usr/share/doc/e2fslibs
359	mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc
360	ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
361
362	$(INSTALL) -p -m 0644 debian/libblkid.copyright \
363		${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}/copyright
364
365	dh_installdocs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
366
367  # HTML docs
368	$(INSTALL) -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
369	$(INSTALL) -p -m 0644 ${stdbuilddir}/doc/libext2fs/*.html \
370	   ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
371	$(INSTALL) -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
372	$(INSTALL) -p -m 0644 ${stdbuilddir}/lib/et/com_err/*.html \
373	   ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
374
375  # texinfo docs
376	mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}
377	$(INSTALL) -p -m 0644 ${topdir}/doc/libext2fs.texinfo \
378	   ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/libext2fs.texi
379	$(INSTALL) -p -m 0644 ${topdir}/lib/et/com_err.texinfo \
380	   ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi
381
382	$(INSTALL) -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
383	$(INSTALL) -p -m 0644 lib/ss/ss_err.et \
384		${stdbuilddir}/lib/ext2fs/ext2_err.et \
385		${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
386	$(INSTALL) -d ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
387	$(INSTALL) -p -m 0644 debugfs/debug_cmds.ct \
388		${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
389
390	if test -f /etc/lsb-release && \
391		grep -q DISTRIB_ID=Ubuntu /etc/lsb-release; then \
392	$(INSTALL) -p -m 0644 e2fsck/e2fsck.conf.ubuntu \
393		${debdir}/e2fsprogs/etc/e2fsck.conf; \
394	fi
395
396	dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info
397	dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
398
399	DH_OPTIONS= dh_installchangelogs -pe2fsprogs \
400		-plibblkid${BLKID_SOVERSION} -plibcomerr${COMERR_SOVERSION} \
401		-plibss${SS_SOVERSION} -plibuuid${UUID_SOVERSION} \
402		-pe2fslibs -puuid-dev -puuid-runtime -pe2fsck-static
403
404	dh_fixperms
405ifneq ($(ismips),)
406	dh_strip -Xlib64ext2fs-nopic.a
407else
408	dh_strip
409endif
410
411	dh_compress
412
413	dh_makeshlibs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
414	dh_makeshlibs -plibcomerr${COMERR_SOVERSION} \
415		-V 'libcomerr2 (>= 1.33-3)'
416	dh_makeshlibs -plibblkid${BLKID_SOVERSION} -V 'libblkid1 (>= 1.39-1)'
417	echo "udeb: libblkid 1 libblkid1-udeb" >> \
418		debian/libblkid1/DEBIAN/shlibs
419	echo "udeb: libuuid 1 libuuid1-udeb" >> debian/libuuid1/DEBIAN/shlibs
420
421	dh_installdeb
422	rm debian/e2fsprogs-udeb/DEBIAN/conffiles
423	dh_shlibdeps -l${stdbuilddir}/lib
424	dh_shlibdeps -pe2fsprogs -l${stdbuilddir}/lib \
425		-u"-Ldebian/e2fsprogs.shlibs.local"
426	dh_shlibdeps -pe2fsprogs-udeb -l${stdbuilddir}/lib \
427		-u"-Ldebian/e2fsprogs-udeb.shlibs.local"
428
429	dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev \
430		-Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
431	DH_OPTIONS= dh_gencontrol -pcomerr-dev \
432	  -u '-v${COMERR_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
433	DH_OPTIONS= dh_gencontrol -pss-dev \
434	  -u '-v${SS_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
435	DH_OPTIONS= dh_gencontrol -puuid-dev \
436	  -u '-v${UUID_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
437
438	dh_md5sums -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
439	dh_builddeb -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
440
441	# udeb stuff
442	dh_gencontrol	-pe2fsprogs-udeb -- -fdebian/files~
443	dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
444	dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME)
445
446	dh_gencontrol	-plibblkid1-udeb -- -fdebian/files~
447	dpkg-distaddfile $(BLKID_UDEB_NAME) debian-installer $(BLKID_UDEB_PRIORITY)
448	dh_builddeb -plibblkid1-udeb --filename=$(BLKID_UDEB_NAME)
449
450	dh_gencontrol	-plibuuid1-udeb -- -fdebian/files~
451	dpkg-distaddfile $(UUID_UDEB_NAME) debian-installer $(UUID_UDEB_PRIORITY)
452	dh_builddeb -plibuuid1-udeb --filename=$(UUID_UDEB_NAME)
453
454binary: binary-indep binary-arch
455
456.PHONY: binary binary-arch binary-indep clean checkroot
457