blob: 5be375a2bd89e1f7a4969a1963761d435ea1b172 [file] [log] [blame]
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +00001#! /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
13DEB_BUILD_ARCH := $(shell dpkg --print-architecture)
14DEB_BUILD_GNU_TYPE := $(shell ./config.guess)
15ifndef DEB_HOST_ARCH
16 DEB_HOST_ARCH := ${DEB_BUILD_ARCH}
17endif
18DEB_HOST_GNU_CPU := $(patsubst hurd-%,%,$(DEB_HOST_ARCH))
19ifeq ($(filter-out hurd-%,${DEB_HOST_ARCH}),)
20 DEB_HOST_GNU_SYSTEM := gnu
21else
Theodore Ts'oe5b16432002-08-17 21:11:29 -040022# FIXME: we won't have always just Hurd and Linux
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000023 DEB_HOST_GNU_SYSTEM := linux
24endif
25DEB_HOST_GNU_TYPE := ${DEB_HOST_GNU_CPU}-${DEB_HOST_GNU_SYSTEM}
26
27
28# find the version for the main package, from changelog file
29MAIN_VERSION = $(shell head -1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
Theodore Ts'oe5b16432002-08-17 21:11:29 -040030# find versions for libraries going into their own packages, from their Makefile.in's,
31# and sonames for all libs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000032COMERR_VERSION = $(shell grep ELF_VERSION lib/et/Makefile.in | cut '-d ' -f3)
Theodore Ts'oe5b16432002-08-17 21:11:29 -040033COMERR_SOVERSION = $(shell grep ELF_SO_VERSION lib/et/Makefile.in | cut '-d ' -f3)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000034SS_VERSION = $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
Theodore Ts'oe5b16432002-08-17 21:11:29 -040035SS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000036UUID_VERSION = $(shell grep ELF_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
Theodore Ts'oe5b16432002-08-17 21:11:29 -040037UUID_SOVERSION = $(shell grep ELF_SO_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
38EXT2FS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3)
39E2P_SOVERSION = $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000040
41package=e2fsprogs
42
43topdir=$(shell pwd)
44debdir=${topdir}/debian
Theodore Ts'ob90b8262001-06-15 22:54:34 +000045tmpdir=${debdir}/tmp
Theodore Ts'o79786212001-06-22 23:05:23 -040046bfdir=${debdir}/e2fsprogs-bf
Theodore Ts'odd198d62002-10-31 03:44:35 -050047udebdir=${debdir}/e2fsprogs-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +000048maindir=${debdir}/e2fsprogs
Theodore Ts'o79786212001-06-22 23:05:23 -040049stdbuilddir=${debdir}/BUILD-STD
50bfbuilddir=${debdir}/BUILD-BF
Theodore Ts'oe5b16432002-08-17 21:11:29 -040051mipsbuilddir=${debdir}/BUILD-MIPS
Theodore Ts'ob90b8262001-06-15 22:54:34 +000052# docdir=${maindir}/usr/share/doc/${package}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000053MANDIR=/usr/share/man
Theodore Ts'ob90b8262001-06-15 22:54:34 +000054mandir=${tmpdir}${MANDIR}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000055
Theodore Ts'odd198d62002-10-31 03:44:35 -050056UDEB_NAME = $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
57UDEB_PRIORITY = $(shell grep '^Package: e2fsprogs-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
58
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000059SUBPACKAGES_DIRS = tmp e2fslibs-dev comerr-dev ss-dev
60
Theodore Ts'o541d1732002-02-23 21:23:26 -050061STAMPSDIR=debian/stampdir
62CFGSTDSTAMP=${STAMPSDIR}/configure-std-stamp
63CFGBFSTAMP=${STAMPSDIR}/configure-bf-stamp
64BUILDSTDSTAMP=${STAMPSDIR}/build-std-stamp
65BUILDBFSTAMP=${STAMPSDIR}/build-bf-stamp
66
Theodore Ts'o1893e712001-05-21 02:48:41 +000067CCOPTS = -O2 -fsigned-char
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000068LIBC-DEV = libc6-dev
69
Theodore Ts'o1893e712001-05-21 02:48:41 +000070INSTALL = install
71INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
72
73ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
74CCOPTS += -g -O1
75endif
76ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
77INSTALL_PROGRAM += -s
78endif
79
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000080ifeq (${DEB_HOST_ARCH},alpha)
81CCOPTS += -DHAVE_NETINET_IN_H
82LIBC-DEV = libc6.1-dev
83else
84CCOPTS += -D__NO_STRING_INLINES
85endif
86
Theodore Ts'o79786212001-06-22 23:05:23 -040087BF_CCOPTS = -Os -fomit-frame-pointer
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000088
Theodore Ts'o79786212001-06-22 23:05:23 -040089COMMON_CONF_FLAGS = \
90 --enable-elf-shlibs --enable-dynamic-e2fsck \
91 --enable-nls \
Theodore Ts'oe5b16432002-08-17 21:11:29 -040092 --infodir=/usr/share/info
Theodore Ts'o79786212001-06-22 23:05:23 -040093
94STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
95
96BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
97 --disable-swapfs --disable-imager \
98 --disable-resizer --disable-debugfs
99
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400100MIPS_NOPIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
101 --disable-nls \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400102 --disable-swapfs --disable-imager \
Theodore Ts'odd198d62002-10-31 03:44:35 -0500103 --disable-resizer # --disable-debugfs
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400104# we can't use those flags at configure time
105MIPS_CFLAGS= -G 0 -fno-pic -mno-abicalls
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400106
107ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
108ifneq (,$(findstring $(DEB_BUILD_ARCH),mips mipsel))
109ismips=ismips
110endif
111endif
112
Theodore Ts'o541d1732002-02-23 21:23:26 -0500113${CFGSTDSTAMP}:
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000114 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500115
Theodore Ts'o79786212001-06-22 23:05:23 -0400116 mkdir -p ${stdbuilddir}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000117ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400118 cd ${stdbuilddir} && \
Theodore Ts'o79786212001-06-22 23:05:23 -0400119 ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000120else
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400121 cd ${stdbuilddir} && CC="${DEB_HOST_GNU_TYPE}-gcc" \
Theodore Ts'o79786212001-06-22 23:05:23 -0400122 ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000123 --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
124endif
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400125
126 # specially-built MIPS lib
127 if [ ismips = "${ismips}" ]; then \
128 mkdir -p ${mipsbuilddir} ; \
129 cd ${mipsbuilddir} && \
130 ${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS} ; \
131 fi
132
Theodore Ts'o541d1732002-02-23 21:23:26 -0500133 mkdir -p ${STAMPSDIR}
134 touch ${CFGSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400135
Theodore Ts'o541d1732002-02-23 21:23:26 -0500136${CFGBFSTAMP}:
Theodore Ts'o79786212001-06-22 23:05:23 -0400137 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500138 rm -f config.cache
139
Theodore Ts'o79786212001-06-22 23:05:23 -0400140 mkdir -p ${bfbuilddir}
141ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400142 cd ${bfbuilddir} && \
Theodore Ts'o79786212001-06-22 23:05:23 -0400143 ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS}
144else
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400145 cd ${bfbuilddir} && CC="${DEB_HOST_GNU_TYPE}-gcc" \
Theodore Ts'o79786212001-06-22 23:05:23 -0400146 ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
147 --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
148endif
Theodore Ts'o541d1732002-02-23 21:23:26 -0500149 mkdir -p ${STAMPSDIR}
150 touch ${CFGBFSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400151
152build: build-std build-bf
153
Theodore Ts'o541d1732002-02-23 21:23:26 -0500154build-std: ${BUILDSTDSTAMP}
155${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400156 dh_testdir
157 make -C ${stdbuilddir} all
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400158
Theodore Ts'o79786212001-06-22 23:05:23 -0400159 ( cd ${stdbuilddir}/doc && \
160 texi2html -split_chapter ${topdir}/doc/libext2fs.texinfo )
161 ( cd ${stdbuilddir}/lib/et && make com_err.info && \
162 texi2html -split_chapter -expandinfo ${topdir}/lib/et/com_err.texinfo )
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400163
164 # specially-built MIPS lib
165 if [ ismips = "${ismips}" ]; then \
166 make -C ${mipsbuilddir}/util ; \
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400167 make -C ${mipsbuilddir} libs \
168 CFLAGS="${CCOPTS} ${MIPS_CFLAGS}" \
169 LIB_SUBDIRS="lib/et lib/ext2fs" ; \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400170 fi
171
Theodore Ts'o541d1732002-02-23 21:23:26 -0500172 touch ${BUILDSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400173
Theodore Ts'o541d1732002-02-23 21:23:26 -0500174build-bf: ${BUILDBFSTAMP}
175${BUILDBFSTAMP}: ${CFGBFSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400176 dh_testdir
177 make -C ${bfbuilddir} all
Theodore Ts'o541d1732002-02-23 21:23:26 -0500178 touch ${BUILDBFSTAMP}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000179
180clean:
181 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500182 rm -rf ${STAMPSDIR}
Theodore Ts'o79786212001-06-22 23:05:23 -0400183 -make -C ${stdbuilddir} -i distclean
184 -make -C ${bfbuilddir} -i distclean
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400185 rm -rf ${stdbuilddir} ${bfbuilddir} ${mipsbuilddir}
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000186 rm -f doc/libext2fs_*.html lib/et/com_err_*.html debian/*.substvars
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000187 dh_clean
188
Theodore Ts'o79786212001-06-22 23:05:23 -0400189install: cleanup install-std install-bf
190
191# This rule allows to factorize the dh_clean between the 2 install rules
192# This must be launched before install-* (if launching them by hand, for
193# exemple) or results are unpredictable
194cleanup:
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000195 dh_testdir
196 dh_testroot
197 dh_clean -k
Theodore Ts'o79786212001-06-22 23:05:23 -0400198
199install-std: DH_OPTIONS=
200install-std: build
201 dh_testdir
202 dh_testroot
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000203 dh_installdirs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000204
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000205 mkdir -p ${tmpdir}/sbin
Theodore Ts'o79786212001-06-22 23:05:23 -0400206 make -C ${stdbuilddir} install DESTDIR=${tmpdir} \
207 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
208 # static libs and .h files
209 make -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000210
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400211 # remove FSIM for now.
212 rm ${tmpdir}/lib/evms/libe2fsim.1.1.1.so
213
Theodore Ts'o1893e712001-05-21 02:48:41 +0000214 # statically-linked fsck
Theodore Ts'o79786212001-06-22 23:05:23 -0400215 ${INSTALL_PROGRAM} ${stdbuilddir}/e2fsck/e2fsck.static ${tmpdir}/sbin
Theodore Ts'o1893e712001-05-21 02:48:41 +0000216 ln -s e2fsck.8.gz ${mandir}/man8/e2fsck.static.8.gz
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000217
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400218 dh_movefiles
219 test -z `find ${tmpdir} -type f`
220
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400221 # specially-built MIPS lib
222 if [ ismips = "${ismips}" ]; then \
223 cp ${mipsbuilddir}/lib/libext2fs.a \
224 ${debdir}/e2fslibs-dev/usr/lib/libext2fs-nopic.a ; \
225 fi
226
Theodore Ts'o79786212001-06-22 23:05:23 -0400227install-bf: DH_OPTIONS=
228install-bf: build
229 dh_testdir
230 dh_testroot
231 dh_installdirs
232
233 mkdir -p ${bfdir}/sbin
234 make -C ${bfbuilddir} install DESTDIR=${bfdir} \
235 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
236 rm -rf ${bfdir}/usr/share ${bfdir}/usr/lib
237 cd ${bfdir}/sbin && rm -f e2label
238 cd ${bfdir}/usr/bin && rm -f uuidgen
239
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400240 # remove FSIM for now.
241 rm ${bfdir}/lib/evms/libe2fsim.1.1.1.so
242
Theodore Ts'odd198d62002-10-31 03:44:35 -0500243install-udeb: install-bf
244 dh_testdir
245 dh_testroot
246 dh_installdirs
247
248 cp -a ${bfdir}/lib ${udebdir}/
249 mkdir -p ${udebdir}/sbin
250 cp -a ${bfdir}/sbin/mke2fs ${udebdir}/sbin/
251 ln -s mke2fs ${udebdir}/sbin/mkfs.ext2
252 ln -s mke2fs ${udebdir}/sbin/mkfs.ext3
253 cp -a ${bfdir}/sbin/e2fsck ${udebdir}/sbin/
254 ln -s e2fsck ${udebdir}/sbin/fsck.ext2
255 ln -s e2fsck ${udebdir}/sbin/fsck.ext3
Theodore Ts'o79786212001-06-22 23:05:23 -0400256
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000257binary-indep:
258 # no arch-independant debs.
259
260binary-arch: DH_OPTIONS= -a
Theodore Ts'odd198d62002-10-31 03:44:35 -0500261binary-arch: install install-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000262 dh_testdir
263 dh_testroot
264
Theodore Ts'o541d1732002-02-23 21:23:26 -0500265 # remove obsolete maint-scripts provided by 1.26 upstream
266 cd debian && rm -f comerr-dev.postinst e2fslibs-dev.postinst \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400267 e2fsprogs.postinst e2fsprogs.shlibs e2fsprogs.shlibs.in
Theodore Ts'o541d1732002-02-23 21:23:26 -0500268
269 # lintian overrides
270 for i in $$(cd debian && echo *.lintian-overrides); do \
271 pkg=$${i%.lintian-overrides} ;\
272 install -m644 -D -p debian/$$i ${debdir}/$${pkg}/usr/share/lintian/overrides/$${pkg} ;\
273 done
Theodore Ts'o79786212001-06-22 23:05:23 -0400274
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400275 # mkinitrd script
Theodore Ts'odd198d62002-10-31 03:44:35 -0500276 mkdir -p debian/e2fsprogs/etc/mkinitrd/scripts
277 install -m755 debian/e2fsprogs.mkinitrd \
278 debian/e2fsprogs/etc/mkinitrd/scripts/e2fsprogs
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400279
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000280 # symlinks to prepare dh_installdocs run
281 mkdir -p ${debdir}/e2fsck-static/usr/share/doc/
282 ln -sf e2fsprogs ${debdir}/e2fsck-static/usr/share/doc/e2fsck-static
283
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000284 mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc/e2fsprogs
285 ln -sf e2fsprogs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
286
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000287 mkdir -p ${debdir}/uuid-dev/usr/share/doc/e2fsprogs
288 ln -sf e2fsprogs ${debdir}/uuid-dev/usr/share/doc/uuid-dev
Theodore Ts'o1893e712001-05-21 02:48:41 +0000289
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000290 # comerr and ss have their own copyright notices
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400291 mkdir -p ${maindir}/usr/share/doc/libcomerr${COMERR_SOVERSION}
292 mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}
293 ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000294
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400295 mkdir -p ${maindir}/usr/share/doc/libss${SS_SOVERSION}
296 mkdir -p ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}
297 ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000298
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400299 for i in libcomerr${COMERR_SOVERSION} libss${SS_SOVERSION}; do \
Theodore Ts'o79786212001-06-22 23:05:23 -0400300 install -m 644 debian/$$i.copyright \
301 ${maindir}/usr/share/doc/$$i/copyright ; \
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000302 done
303
Theodore Ts'odd198d62002-10-31 03:44:35 -0500304 dh_installdocs -Ne2fsprogs-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000305
Theodore Ts'o79786212001-06-22 23:05:23 -0400306 install -m 644 debian/e2fsprogs.copyright \
307 ${bfdir}/usr/share/doc/e2fsprogs-bf/copyright
308
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000309 # HTML docs
310 install -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev/html-info/
Theodore Ts'o79786212001-06-22 23:05:23 -0400311 install -p ${stdbuilddir}/doc/libext2fs_*.html \
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000312 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev/html-info/
313 install -d ${debdir}/comerr-dev/usr/share/doc/comerr-dev/html-info/
Theodore Ts'o79786212001-06-22 23:05:23 -0400314 install -p ${stdbuilddir}/lib/et/com_err_*.html \
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000315 ${debdir}/comerr-dev/usr/share/doc/comerr-dev/html-info/
316
317 # texinfo docs
318 install -p ${topdir}/doc/libext2fs.texinfo \
319 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev/libext2fs.texi
320 install -p ${topdir}/lib/et/com_err.texinfo \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400321 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000322
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000323 dh_installexamples
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000324
Theodore Ts'o541d1732002-02-23 21:23:26 -0500325 dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info
Theodore Ts'o79786212001-06-22 23:05:23 -0400326 dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000327
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000328 dh_undocumented
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000329
Theodore Ts'o79786212001-06-22 23:05:23 -0400330 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -pe2fsprogs-bf ChangeLog
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000331
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400332 for i in libcomerr${COMERR_SOVERSION} libss${SS_SOVERSION} ; do \
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000333 mkdir -p ${maindir}/usr/share/doc/$$i ; \
334 ln -s ../e2fsprogs/changelog.Debian.gz ${maindir}/usr/share/doc/$$i/ ; \
335 ln -s ../e2fsprogs/changelog.gz ${maindir}/usr/share/doc/$$i/ ; \
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000336 done
337
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000338 dh_strip
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000339
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000340 dh_compress
341 dh_fixperms
342
343 echo "libcdev:Depends=${LIBC-DEV}" > debian/comerr-dev.substvars
344 echo "libcdev:Depends=${LIBC-DEV}" > debian/ss-dev.substvars
345 echo "libcdev:Depends=${LIBC-DEV}" > debian/uuid-dev.substvars
346 echo "libcdev:Depends=${LIBC-DEV}" > debian/e2fslibs-dev.substvars
347
Theodore Ts'o541d1732002-02-23 21:23:26 -0500348# Call this mostly to get the maintainer-script snippets
349 dh_makeshlibs -pe2fsprogs
350# We overwrite the shlibs by hand because of virtual packages used
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400351 : > debian/e2fsprogs/DEBIAN/shlibs
352 echo "libext2fs ${EXT2FS_SOVERSION} libext2fs${EXT2FS_SOVERSION}" \
353 >> debian/e2fsprogs/DEBIAN/shlibs
354 echo "libe2p ${E2P_SOVERSION} libe2p${E2P_SOVERSION}" \
355 >> debian/e2fsprogs/DEBIAN/shlibs
356 echo "libuuid ${UUID_SOVERSION} libuuid${UUID_SOVERSION}" \
357 >> debian/e2fsprogs/DEBIAN/shlibs
358 echo "libcom_err ${COMERR_SOVERSION} libcomerr${COMERR_SOVERSION}" \
359 >> debian/e2fsprogs/DEBIAN/shlibs
360 echo "libss ${SS_SOVERSION} libss${SS_SOVERSION}" \
361 >> debian/e2fsprogs/DEBIAN/shlibs
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000362
363 dh_installdeb
Theodore Ts'o79786212001-06-22 23:05:23 -0400364 dh_shlibdeps -l${stdbuilddir}/lib
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000365
Theodore Ts'odd198d62002-10-31 03:44:35 -0500366 dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev -Ne2fsprogs-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000367 DH_OPTIONS= dh_gencontrol -pcomerr-dev \
368 -u '-v${COMERR_VERSION}-${MAIN_VERSION}'
369 DH_OPTIONS= dh_gencontrol -pss-dev \
370 -u '-v${SS_VERSION}-${MAIN_VERSION}'
371 DH_OPTIONS= dh_gencontrol -puuid-dev \
372 -u '-v${UUID_VERSION}-${MAIN_VERSION}'
373
Theodore Ts'odd198d62002-10-31 03:44:35 -0500374 dh_md5sums -Ne2fsprogs-udeb
375 dh_builddeb -Ne2fsprogs-udeb
376
377 # udeb stuff
378 dh_gencontrol -pe2fsprogs-udeb -- -fdebian/files~
379 dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
380 dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000381
382binary: binary-indep binary-arch
383
384.PHONY: binary binary-arch binary-indep clean checkroot