blob: 45c6167d5730ef994770a62ece3fc1214bdc8fda [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
Theodore Ts'of85cc2a2003-07-26 00:48:08 -040013# 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_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
18DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000019
20# find the version for the main package, from changelog file
21MAIN_VERSION = $(shell head -1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
Theodore Ts'oe5b16432002-08-17 21:11:29 -040022# find versions for libraries going into their own packages, from their Makefile.in's,
23# and sonames for all libs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000024COMERR_VERSION = $(shell grep ELF_VERSION lib/et/Makefile.in | cut '-d ' -f3)
Theodore Ts'oe5b16432002-08-17 21:11:29 -040025COMERR_SOVERSION = $(shell grep ELF_SO_VERSION lib/et/Makefile.in | cut '-d ' -f3)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000026SS_VERSION = $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
Theodore Ts'oe5b16432002-08-17 21:11:29 -040027SS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000028UUID_VERSION = $(shell grep ELF_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
Theodore Ts'oe5b16432002-08-17 21:11:29 -040029UUID_SOVERSION = $(shell grep ELF_SO_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
Theodore Ts'o6fe7d112003-03-16 19:58:25 -050030BLKID_VERSION = $(shell grep ELF_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
31BLKID_SOVERSION = $(shell grep ELF_SO_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
Theodore Ts'oe5b16432002-08-17 21:11:29 -040032EXT2FS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3)
33E2P_SOVERSION = $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000034
35package=e2fsprogs
36
37topdir=$(shell pwd)
38debdir=${topdir}/debian
Theodore Ts'ob90b8262001-06-15 22:54:34 +000039tmpdir=${debdir}/tmp
Theodore Ts'odd198d62002-10-31 03:44:35 -050040udebdir=${debdir}/e2fsprogs-udeb
Theodore Ts'o417781a2003-04-10 00:18:56 -040041blkidudebdir=${debdir}/libblkid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +000042maindir=${debdir}/e2fsprogs
Theodore Ts'o79786212001-06-22 23:05:23 -040043stdbuilddir=${debdir}/BUILD-STD
44bfbuilddir=${debdir}/BUILD-BF
Theodore Ts'oe5b16432002-08-17 21:11:29 -040045mipsbuilddir=${debdir}/BUILD-MIPS
Theodore Ts'ob90b8262001-06-15 22:54:34 +000046# docdir=${maindir}/usr/share/doc/${package}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000047MANDIR=/usr/share/man
Theodore Ts'ob90b8262001-06-15 22:54:34 +000048mandir=${tmpdir}${MANDIR}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000049
Theodore Ts'odd198d62002-10-31 03:44:35 -050050UDEB_NAME = $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
51UDEB_PRIORITY = $(shell grep '^Package: e2fsprogs-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
52
Theodore Ts'o417781a2003-04-10 00:18:56 -040053BLKID_UDEB_NAME = libblkid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
54BLKID_UDEB_PRIORITY = $(shell grep '^Package: libblkid1-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
55
Theodore Ts'o541d1732002-02-23 21:23:26 -050056STAMPSDIR=debian/stampdir
57CFGSTDSTAMP=${STAMPSDIR}/configure-std-stamp
58CFGBFSTAMP=${STAMPSDIR}/configure-bf-stamp
59BUILDSTDSTAMP=${STAMPSDIR}/build-std-stamp
60BUILDBFSTAMP=${STAMPSDIR}/build-bf-stamp
61
Theodore Ts'o1893e712001-05-21 02:48:41 +000062CCOPTS = -O2 -fsigned-char
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000063
Theodore Ts'o1893e712001-05-21 02:48:41 +000064INSTALL = install
65INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
66
67ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
68CCOPTS += -g -O1
69endif
70ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
71INSTALL_PROGRAM += -s
72endif
73
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000074ifeq (${DEB_HOST_ARCH},alpha)
75CCOPTS += -DHAVE_NETINET_IN_H
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000076else
77CCOPTS += -D__NO_STRING_INLINES
78endif
79
Theodore Ts'o79786212001-06-22 23:05:23 -040080BF_CCOPTS = -Os -fomit-frame-pointer
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000081
Theodore Ts'o79786212001-06-22 23:05:23 -040082COMMON_CONF_FLAGS = \
Theodore Ts'o62775dc2003-05-08 10:39:50 -040083 --enable-elf-shlibs --enable-dynamic-e2fsck --disable-evms \
Theodore Ts'oe5b16432002-08-17 21:11:29 -040084 --infodir=/usr/share/info
Theodore Ts'o79786212001-06-22 23:05:23 -040085
Theodore Ts'o62775dc2003-05-08 10:39:50 -040086STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
Theodore Ts'o79786212001-06-22 23:05:23 -040087
88BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
Theodore Ts'o62775dc2003-05-08 10:39:50 -040089 --disable-nls --disable-swapfs --disable-imager \
Theodore Ts'o79786212001-06-22 23:05:23 -040090 --disable-resizer --disable-debugfs
91
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -040092MIPS_NOPIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
93 --disable-nls \
Theodore Ts'oe5b16432002-08-17 21:11:29 -040094 --disable-swapfs --disable-imager \
Theodore Ts'odd198d62002-10-31 03:44:35 -050095 --disable-resizer # --disable-debugfs
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -040096# we can't use those flags at configure time
97MIPS_CFLAGS= -G 0 -fno-pic -mno-abicalls
Theodore Ts'oe5b16432002-08-17 21:11:29 -040098
99ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
100ifneq (,$(findstring $(DEB_BUILD_ARCH),mips mipsel))
101ismips=ismips
102endif
103endif
104
Theodore Ts'o541d1732002-02-23 21:23:26 -0500105${CFGSTDSTAMP}:
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000106 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500107
Theodore Ts'o79786212001-06-22 23:05:23 -0400108 mkdir -p ${stdbuilddir}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000109ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400110 cd ${stdbuilddir} && \
Theodore Ts'o79786212001-06-22 23:05:23 -0400111 ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000112else
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400113 cd ${stdbuilddir} && CC="${DEB_HOST_GNU_TYPE}-gcc" \
Theodore Ts'o79786212001-06-22 23:05:23 -0400114 ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000115 --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
116endif
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400117
118 # specially-built MIPS lib
119 if [ ismips = "${ismips}" ]; then \
120 mkdir -p ${mipsbuilddir} ; \
121 cd ${mipsbuilddir} && \
122 ${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS} ; \
123 fi
124
Theodore Ts'o541d1732002-02-23 21:23:26 -0500125 mkdir -p ${STAMPSDIR}
126 touch ${CFGSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400127
Theodore Ts'o541d1732002-02-23 21:23:26 -0500128${CFGBFSTAMP}:
Theodore Ts'o79786212001-06-22 23:05:23 -0400129 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500130 rm -f config.cache
131
Theodore Ts'o79786212001-06-22 23:05:23 -0400132 mkdir -p ${bfbuilddir}
133ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400134 cd ${bfbuilddir} && \
Theodore Ts'o79786212001-06-22 23:05:23 -0400135 ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS}
136else
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400137 cd ${bfbuilddir} && CC="${DEB_HOST_GNU_TYPE}-gcc" \
Theodore Ts'o79786212001-06-22 23:05:23 -0400138 ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
139 --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
140endif
Theodore Ts'o541d1732002-02-23 21:23:26 -0500141 mkdir -p ${STAMPSDIR}
142 touch ${CFGBFSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400143
144build: build-std build-bf
145
Theodore Ts'o541d1732002-02-23 21:23:26 -0500146build-std: ${BUILDSTDSTAMP}
147${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400148 dh_testdir
149 make -C ${stdbuilddir} all
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400150
Theodore Ts'o79786212001-06-22 23:05:23 -0400151 ( cd ${stdbuilddir}/doc && \
152 texi2html -split_chapter ${topdir}/doc/libext2fs.texinfo )
153 ( cd ${stdbuilddir}/lib/et && make com_err.info && \
154 texi2html -split_chapter -expandinfo ${topdir}/lib/et/com_err.texinfo )
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400155
156 # specially-built MIPS lib
157 if [ ismips = "${ismips}" ]; then \
158 make -C ${mipsbuilddir}/util ; \
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400159 make -C ${mipsbuilddir} libs \
160 CFLAGS="${CCOPTS} ${MIPS_CFLAGS}" \
161 LIB_SUBDIRS="lib/et lib/ext2fs" ; \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400162 fi
163
Theodore Ts'o541d1732002-02-23 21:23:26 -0500164 touch ${BUILDSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400165
Theodore Ts'o541d1732002-02-23 21:23:26 -0500166build-bf: ${BUILDBFSTAMP}
167${BUILDBFSTAMP}: ${CFGBFSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400168 dh_testdir
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400169 make -C ${bfbuilddir} libs
170 make -C ${bfbuilddir}/e2fsck all
171 make -C ${bfbuilddir}/misc all
Theodore Ts'o541d1732002-02-23 21:23:26 -0500172 touch ${BUILDBFSTAMP}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000173
174clean:
175 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500176 rm -rf ${STAMPSDIR}
Theodore Ts'o79786212001-06-22 23:05:23 -0400177 -make -C ${stdbuilddir} -i distclean
178 -make -C ${bfbuilddir} -i distclean
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400179 rm -rf ${stdbuilddir} ${bfbuilddir} ${mipsbuilddir}
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000180 rm -f doc/libext2fs_*.html lib/et/com_err_*.html debian/*.substvars
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000181 dh_clean
182
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400183install: cleanup install-std
Theodore Ts'o79786212001-06-22 23:05:23 -0400184
185# This rule allows to factorize the dh_clean between the 2 install rules
186# This must be launched before install-* (if launching them by hand, for
187# exemple) or results are unpredictable
188cleanup:
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000189 dh_testdir
190 dh_testroot
191 dh_clean -k
Theodore Ts'o79786212001-06-22 23:05:23 -0400192
193install-std: DH_OPTIONS=
194install-std: build
195 dh_testdir
196 dh_testroot
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000197 dh_installdirs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000198
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000199 mkdir -p ${tmpdir}/sbin
Theodore Ts'o79786212001-06-22 23:05:23 -0400200 make -C ${stdbuilddir} install DESTDIR=${tmpdir} \
201 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
202 # static libs and .h files
203 make -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000204
Theodore Ts'o1893e712001-05-21 02:48:41 +0000205 # statically-linked fsck
Theodore Ts'o79786212001-06-22 23:05:23 -0400206 ${INSTALL_PROGRAM} ${stdbuilddir}/e2fsck/e2fsck.static ${tmpdir}/sbin
Theodore Ts'o1893e712001-05-21 02:48:41 +0000207 ln -s e2fsck.8.gz ${mandir}/man8/e2fsck.static.8.gz
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000208
Theodore Ts'o020c5472003-04-10 00:01:19 -0400209 ln -s et/com_err.h ${tmpdir}/usr/include
210
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400211 dh_movefiles
212 test -z `find ${tmpdir} -type f`
213
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400214 # specially-built MIPS lib
215 if [ ismips = "${ismips}" ]; then \
216 cp ${mipsbuilddir}/lib/libext2fs.a \
217 ${debdir}/e2fslibs-dev/usr/lib/libext2fs-nopic.a ; \
218 fi
219
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400220install-udeb: DH_OPTIONS=
221install-udeb: build
Theodore Ts'o79786212001-06-22 23:05:23 -0400222 dh_testdir
223 dh_testroot
Theodore Ts'o79786212001-06-22 23:05:23 -0400224
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400225 make -C ${bfbuilddir} install-shlibs-libs-recursive DESTDIR=${udebdir} \
Theodore Ts'o79786212001-06-22 23:05:23 -0400226 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400227 make -C ${bfbuilddir}/e2fsck install DESTDIR=${udebdir} \
228 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
229 make -C ${bfbuilddir}/misc install DESTDIR=${udebdir} \
230 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
Theodore Ts'o79786212001-06-22 23:05:23 -0400231
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400232 rm -rf ${udebdir}/usr
Theodore Ts'oe3075ae2003-07-12 16:28:09 -0400233 find ${udebdir}/sbin -type f -a ! -name e2fsck \
234 -a ! -name mke2fs -print | xargs rm
235
236 (cd ${udebdir}/sbin; ln -s e2fsck fsck.ext2 ; \
237 ln -s e2fsck fsck.ext3 ; ln -s mke2fs mkfs.ext2 ; \
238 ln -s mke2fs mkfs.ext3)
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400239
Theodore Ts'o417781a2003-04-10 00:18:56 -0400240 mkdir -p ${blkidudebdir}/lib
241 mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib
Theodore Ts'o79786212001-06-22 23:05:23 -0400242
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000243binary-indep:
244 # no arch-independant debs.
245
246binary-arch: DH_OPTIONS= -a
Theodore Ts'odd198d62002-10-31 03:44:35 -0500247binary-arch: install install-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000248 dh_testdir
249 dh_testroot
250
Theodore Ts'o541d1732002-02-23 21:23:26 -0500251 # lintian overrides
252 for i in $$(cd debian && echo *.lintian-overrides); do \
253 pkg=$${i%.lintian-overrides} ;\
254 install -m644 -D -p debian/$$i ${debdir}/$${pkg}/usr/share/lintian/overrides/$${pkg} ;\
255 done
Theodore Ts'o79786212001-06-22 23:05:23 -0400256
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400257 # mkinitrd script
Theodore Ts'odd198d62002-10-31 03:44:35 -0500258 mkdir -p debian/e2fsprogs/etc/mkinitrd/scripts
259 install -m755 debian/e2fsprogs.mkinitrd \
260 debian/e2fsprogs/etc/mkinitrd/scripts/e2fsprogs
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400261
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000262 # symlinks to prepare dh_installdocs run
263 mkdir -p ${debdir}/e2fsck-static/usr/share/doc/
264 ln -sf e2fsprogs ${debdir}/e2fsck-static/usr/share/doc/e2fsck-static
265
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500266 mkdir -p ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}
267 mkdir -p ${debdir}/libblkid-dev/usr/share/doc
268 ln -sf libblkid${BLKID_SOVERSION} ${debdir}/libblkid-dev/usr/share/doc/libblkid-dev
269
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400270 mkdir -p ${debdir}/libss${SS_SOVERSION}/usr/share/doc/libss${SS_SOVERSION}
271 mkdir -p ${debdir}/ss-dev/usr/share/doc
272 ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev
273
274 mkdir -p ${debdir}/libcomerr${COMERR_SOVERSION}/usr/share/doc/libcomerr${COMERR_SOVERSION}
275 mkdir -p ${debdir}/comerr-dev/usr/share/doc
276 ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
277
278 mkdir -p ${debdir}/libuuid${UUID_SOVERSION}/usr/share/doc/libuuid${UUID_SOVERSION}
279 mkdir -p ${debdir}/uuid-dev/usr/share/doc
280 ln -sf libuuid${UUID_SOVERSION} ${debdir}/uuid-dev/usr/share/doc/uuid-dev
281
282 mkdir -p ${debdir}/e2fslibs/usr/share/doc/e2fslibs
283 mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc
284 ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000285
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500286 install -m 644 debian/libblkid.copyright \
287 ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}/copyright
288
Theodore Ts'o417781a2003-04-10 00:18:56 -0400289 dh_installdocs -Ne2fsprogs-udeb -Nlibblkid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000290
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000291 # HTML docs
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400292 install -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
Theodore Ts'o79786212001-06-22 23:05:23 -0400293 install -p ${stdbuilddir}/doc/libext2fs_*.html \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400294 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
295 install -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
Theodore Ts'o79786212001-06-22 23:05:23 -0400296 install -p ${stdbuilddir}/lib/et/com_err_*.html \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400297 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000298
299 # texinfo docs
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400300 mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000301 install -p ${topdir}/doc/libext2fs.texinfo \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400302 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/libext2fs.texi
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000303 install -p ${topdir}/lib/et/com_err.texinfo \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400304 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000305
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400306 install -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
307 install -p -m 0644 lib/ss/ss_err.et \
308 ${stdbuilddir}/lib/ext2fs/ext2_err.et \
309 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
310 install -d ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
311 install -p -m 0644 debugfs/debug_cmds.ct \
312 ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
313
314 install -d ${debdir}/uuid-dev/usr/share/doc/libuuid${UUID_SOVERSION}
315 install -p -m 0644 doc/draft-leach-uuids-guids-01.txt \
316 ${debdir}/uuid-dev/usr/share/doc/libuuid${UUID_SOVERSION}
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000317
Theodore Ts'o541d1732002-02-23 21:23:26 -0500318 dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info
Theodore Ts'o79786212001-06-22 23:05:23 -0400319 dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000320
Theodore Ts'o9bf19712003-07-23 09:55:39 -0400321 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibblkid${BLKID_SOVERSION}
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400322 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibcomerr${COMERR_SOVERSION}
323 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibss${SS_SOVERSION}
324 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibuuid${UUID_SOVERSION}
325 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -pe2fslibs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000326
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000327 dh_strip
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000328
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000329 dh_compress
330 dh_fixperms
331
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400332 dh_makeshlibs
333 dh_makeshlibs -plibcomerr${COMERR_SOVERSION} \
334 -V 'libcomerr2 (>= 1.33-3)'
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500335
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000336 dh_installdeb
Theodore Ts'o79786212001-06-22 23:05:23 -0400337 dh_shlibdeps -l${stdbuilddir}/lib
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400338 dh_shlibdeps -pe2fsprogs -l${stdbuilddir}/lib \
339 -u"-Ldebian/e2fsprogs.shlibs.local"
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000340
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400341 dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev \
342 -Ne2fsprogs-udeb -Nlibblkid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000343 DH_OPTIONS= dh_gencontrol -pcomerr-dev \
344 -u '-v${COMERR_VERSION}-${MAIN_VERSION}'
345 DH_OPTIONS= dh_gencontrol -pss-dev \
346 -u '-v${SS_VERSION}-${MAIN_VERSION}'
347 DH_OPTIONS= dh_gencontrol -puuid-dev \
348 -u '-v${UUID_VERSION}-${MAIN_VERSION}'
349
Theodore Ts'o417781a2003-04-10 00:18:56 -0400350 dh_md5sums -Ne2fsprogs-udeb -Nlibblkid1-udeb
351 dh_builddeb -Ne2fsprogs-udeb -Nlibblkid1-udeb
Theodore Ts'odd198d62002-10-31 03:44:35 -0500352
353 # udeb stuff
354 dh_gencontrol -pe2fsprogs-udeb -- -fdebian/files~
355 dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
356 dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000357
Theodore Ts'o417781a2003-04-10 00:18:56 -0400358 dh_gencontrol -plibblkid1-udeb -- -fdebian/files~
359 dpkg-distaddfile $(BLKID_UDEB_NAME) debian-installer $(BLKID_UDEB_PRIORITY)
360 dh_builddeb -plibblkid1-udeb --filename=$(BLKID_UDEB_NAME)
361
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000362binary: binary-indep binary-arch
363
364.PHONY: binary binary-arch binary-indep clean checkroot