blob: 6fb1d85534621d1b9e65a86e5c93d019b77858ef [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
Theodore Ts'o56eb4d42004-09-17 19:54:22 -040021MAIN_VERSION = $(shell head -n 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'oe254d052003-12-07 01:57:04 -050042uuidudebdir=${debdir}/libuuid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +000043maindir=${debdir}/e2fsprogs
Theodore Ts'o79786212001-06-22 23:05:23 -040044stdbuilddir=${debdir}/BUILD-STD
45bfbuilddir=${debdir}/BUILD-BF
Theodore Ts'oe5b16432002-08-17 21:11:29 -040046mipsbuilddir=${debdir}/BUILD-MIPS
Theodore Ts'ob90b8262001-06-15 22:54:34 +000047# docdir=${maindir}/usr/share/doc/${package}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000048MANDIR=/usr/share/man
Theodore Ts'ob90b8262001-06-15 22:54:34 +000049mandir=${tmpdir}${MANDIR}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000050
Theodore Ts'odd198d62002-10-31 03:44:35 -050051UDEB_NAME = $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
52UDEB_PRIORITY = $(shell grep '^Package: e2fsprogs-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
53
Theodore Ts'o417781a2003-04-10 00:18:56 -040054BLKID_UDEB_NAME = libblkid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
55BLKID_UDEB_PRIORITY = $(shell grep '^Package: libblkid1-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
56
Theodore Ts'oe254d052003-12-07 01:57:04 -050057UUID_UDEB_NAME = libuuid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
58UUID_UDEB_PRIORITY = $(shell grep '^Package: libuuid1-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
59
Theodore Ts'o541d1732002-02-23 21:23:26 -050060STAMPSDIR=debian/stampdir
61CFGSTDSTAMP=${STAMPSDIR}/configure-std-stamp
62CFGBFSTAMP=${STAMPSDIR}/configure-bf-stamp
63BUILDSTDSTAMP=${STAMPSDIR}/build-std-stamp
64BUILDBFSTAMP=${STAMPSDIR}/build-bf-stamp
65
Theodore Ts'o1d658a12003-08-21 01:53:07 -040066CCOPTS = -g -fsigned-char
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000067
Theodore Ts'o1893e712001-05-21 02:48:41 +000068INSTALL = install
69INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
70
Theodore Ts'o1d658a12003-08-21 01:53:07 -040071ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
72CCOPTS += -O2
Theodore Ts'o1893e712001-05-21 02:48:41 +000073endif
74ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
75INSTALL_PROGRAM += -s
76endif
77
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000078ifeq (${DEB_HOST_ARCH},alpha)
79CCOPTS += -DHAVE_NETINET_IN_H
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000080else
81CCOPTS += -D__NO_STRING_INLINES
82endif
83
Theodore Ts'o79786212001-06-22 23:05:23 -040084BF_CCOPTS = -Os -fomit-frame-pointer
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000085
Theodore Ts'o79786212001-06-22 23:05:23 -040086COMMON_CONF_FLAGS = \
Theodore Ts'o921f4ad2004-11-19 17:25:27 -050087 --enable-elf-shlibs --enable-dynamic-e2fsck \
Theodore Ts'o35b73e92004-09-19 07:52:05 -040088 --infodir=/usr/share/info --enable-fsck
Theodore Ts'o79786212001-06-22 23:05:23 -040089
Theodore Ts'o62775dc2003-05-08 10:39:50 -040090STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
Theodore Ts'o79786212001-06-22 23:05:23 -040091
92BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
Theodore Ts'o62775dc2003-05-08 10:39:50 -040093 --disable-nls --disable-swapfs --disable-imager \
Theodore Ts'o5d407732004-09-18 14:53:14 -040094 --disable-resizer --disable-debugfs --disable-e2initrd-helper
Theodore Ts'o79786212001-06-22 23:05:23 -040095
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -040096MIPS_NOPIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
97 --disable-nls \
Theodore Ts'oe5b16432002-08-17 21:11:29 -040098 --disable-swapfs --disable-imager \
Theodore Ts'odd198d62002-10-31 03:44:35 -050099 --disable-resizer # --disable-debugfs
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400100# we can't use those flags at configure time
101MIPS_CFLAGS= -G 0 -fno-pic -mno-abicalls
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400102
103ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
104ifneq (,$(findstring $(DEB_BUILD_ARCH),mips mipsel))
105ismips=ismips
106endif
107endif
108
Theodore Ts'o541d1732002-02-23 21:23:26 -0500109${CFGSTDSTAMP}:
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000110 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500111
Theodore Ts'o41b6ae62004-09-24 10:07:05 -0400112 # Make sure we don't try to rebuild the configure scripts
113 find . -name configure | xargs touch
114
Theodore Ts'o79786212001-06-22 23:05:23 -0400115 mkdir -p ${stdbuilddir}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000116ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400117 cd ${stdbuilddir} && \
Theodore Ts'o79786212001-06-22 23:05:23 -0400118 ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000119else
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400120 cd ${stdbuilddir} && CC="${DEB_HOST_GNU_TYPE}-gcc" \
Theodore Ts'o79786212001-06-22 23:05:23 -0400121 ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000122 --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
123endif
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400124
125 # specially-built MIPS lib
126 if [ ismips = "${ismips}" ]; then \
127 mkdir -p ${mipsbuilddir} ; \
128 cd ${mipsbuilddir} && \
129 ${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS} ; \
130 fi
131
Theodore Ts'o541d1732002-02-23 21:23:26 -0500132 mkdir -p ${STAMPSDIR}
133 touch ${CFGSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400134
Theodore Ts'o541d1732002-02-23 21:23:26 -0500135${CFGBFSTAMP}:
Theodore Ts'o79786212001-06-22 23:05:23 -0400136 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500137 rm -f config.cache
138
Theodore Ts'o79786212001-06-22 23:05:23 -0400139 mkdir -p ${bfbuilddir}
140ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400141 cd ${bfbuilddir} && \
Theodore Ts'o79786212001-06-22 23:05:23 -0400142 ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS}
143else
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400144 cd ${bfbuilddir} && CC="${DEB_HOST_GNU_TYPE}-gcc" \
Theodore Ts'o79786212001-06-22 23:05:23 -0400145 ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
146 --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
147endif
Theodore Ts'o541d1732002-02-23 21:23:26 -0500148 mkdir -p ${STAMPSDIR}
149 touch ${CFGBFSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400150
151build: build-std build-bf
152
Theodore Ts'o541d1732002-02-23 21:23:26 -0500153build-std: ${BUILDSTDSTAMP}
154${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400155 dh_testdir
156 make -C ${stdbuilddir} all
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400157
Theodore Ts'o79786212001-06-22 23:05:23 -0400158 ( cd ${stdbuilddir}/doc && \
159 texi2html -split_chapter ${topdir}/doc/libext2fs.texinfo )
160 ( cd ${stdbuilddir}/lib/et && make com_err.info && \
161 texi2html -split_chapter -expandinfo ${topdir}/lib/et/com_err.texinfo )
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400162
163 # specially-built MIPS lib
164 if [ ismips = "${ismips}" ]; then \
165 make -C ${mipsbuilddir}/util ; \
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400166 make -C ${mipsbuilddir} libs \
167 CFLAGS="${CCOPTS} ${MIPS_CFLAGS}" \
168 LIB_SUBDIRS="lib/et lib/ext2fs" ; \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400169 fi
170
Theodore Ts'o541d1732002-02-23 21:23:26 -0500171 touch ${BUILDSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400172
Theodore Ts'o541d1732002-02-23 21:23:26 -0500173build-bf: ${BUILDBFSTAMP}
174${BUILDBFSTAMP}: ${CFGBFSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400175 dh_testdir
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400176 make -C ${bfbuilddir} libs
177 make -C ${bfbuilddir}/e2fsck all
178 make -C ${bfbuilddir}/misc all
Theodore Ts'o541d1732002-02-23 21:23:26 -0500179 touch ${BUILDBFSTAMP}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000180
181clean:
182 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500183 rm -rf ${STAMPSDIR}
Theodore Ts'o79786212001-06-22 23:05:23 -0400184 -make -C ${stdbuilddir} -i distclean
185 -make -C ${bfbuilddir} -i distclean
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400186 rm -rf ${stdbuilddir} ${bfbuilddir} ${mipsbuilddir}
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000187 rm -f doc/libext2fs_*.html lib/et/com_err_*.html debian/*.substvars
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000188 dh_clean
189
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400190install: cleanup install-std
Theodore Ts'o79786212001-06-22 23:05:23 -0400191
192# This rule allows to factorize the dh_clean between the 2 install rules
193# This must be launched before install-* (if launching them by hand, for
194# exemple) or results are unpredictable
195cleanup:
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000196 dh_testdir
197 dh_testroot
198 dh_clean -k
Theodore Ts'o79786212001-06-22 23:05:23 -0400199
200install-std: DH_OPTIONS=
201install-std: build
202 dh_testdir
203 dh_testroot
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000204 dh_installdirs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000205
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000206 mkdir -p ${tmpdir}/sbin
Theodore Ts'o79786212001-06-22 23:05:23 -0400207 make -C ${stdbuilddir} install DESTDIR=${tmpdir} \
208 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
209 # static libs and .h files
210 make -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000211
Theodore Ts'o1893e712001-05-21 02:48:41 +0000212 # statically-linked fsck
Theodore Ts'o79786212001-06-22 23:05:23 -0400213 ${INSTALL_PROGRAM} ${stdbuilddir}/e2fsck/e2fsck.static ${tmpdir}/sbin
Theodore Ts'o1893e712001-05-21 02:48:41 +0000214 ln -s e2fsck.8.gz ${mandir}/man8/e2fsck.static.8.gz
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000215
Theodore Ts'o020c5472003-04-10 00:01:19 -0400216 ln -s et/com_err.h ${tmpdir}/usr/include
217
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'o62775dc2003-05-08 10:39:50 -0400227install-udeb: DH_OPTIONS=
228install-udeb: build
Theodore Ts'o79786212001-06-22 23:05:23 -0400229 dh_testdir
230 dh_testroot
Theodore Ts'o79786212001-06-22 23:05:23 -0400231
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400232 make -C ${bfbuilddir} install-shlibs-libs-recursive DESTDIR=${udebdir} \
Theodore Ts'o79786212001-06-22 23:05:23 -0400233 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400234 make -C ${bfbuilddir}/e2fsck install DESTDIR=${udebdir} \
235 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
236 make -C ${bfbuilddir}/misc install DESTDIR=${udebdir} \
237 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
Theodore Ts'o79786212001-06-22 23:05:23 -0400238
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400239 rm -rf ${udebdir}/usr
Theodore Ts'oe3075ae2003-07-12 16:28:09 -0400240 find ${udebdir}/sbin -type f -a ! -name e2fsck \
Theodore Ts'o080ee032004-03-02 11:18:05 -0500241 -a ! -name mke2fs -a ! -name tune2fs -print | xargs rm
Theodore Ts'oe3075ae2003-07-12 16:28:09 -0400242
243 (cd ${udebdir}/sbin; ln -s e2fsck fsck.ext2 ; \
244 ln -s e2fsck fsck.ext3 ; ln -s mke2fs mkfs.ext2 ; \
245 ln -s mke2fs mkfs.ext3)
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400246
Theodore Ts'o417781a2003-04-10 00:18:56 -0400247 mkdir -p ${blkidudebdir}/lib
248 mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib
Theodore Ts'o79786212001-06-22 23:05:23 -0400249
Theodore Ts'oe254d052003-12-07 01:57:04 -0500250 mkdir -p ${uuidudebdir}/lib
251 mv ${udebdir}/lib/libuuid.* ${uuidudebdir}/lib
252
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000253binary-indep:
254 # no arch-independant debs.
255
256binary-arch: DH_OPTIONS= -a
Theodore Ts'odd198d62002-10-31 03:44:35 -0500257binary-arch: install install-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000258 dh_testdir
259 dh_testroot
260
Theodore Ts'o541d1732002-02-23 21:23:26 -0500261 # lintian overrides
262 for i in $$(cd debian && echo *.lintian-overrides); do \
263 pkg=$${i%.lintian-overrides} ;\
264 install -m644 -D -p debian/$$i ${debdir}/$${pkg}/usr/share/lintian/overrides/$${pkg} ;\
265 done
Theodore Ts'o79786212001-06-22 23:05:23 -0400266
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400267 # mkinitrd script
Theodore Ts'o1d658a12003-08-21 01:53:07 -0400268 mkdir -p debian/e2fsprogs/usr/share/initrd-tools/scripts
Theodore Ts'o5d407732004-09-18 14:53:14 -0400269 install -m755 debian/initrd-tools.e2fsprogs \
Theodore Ts'oe2de6b92004-04-11 16:25:56 -0400270 debian/e2fsprogs/usr/share/initrd-tools/scripts/e2fsprogs
271
272 # initrd script
273 mkdir -p debian/e2fsprogs/usr/share/e2fsprogs
Theodore Ts'o5d407732004-09-18 14:53:14 -0400274 install -m755 debian/initrd.ext3-add-journal \
Theodore Ts'oe2de6b92004-04-11 16:25:56 -0400275 debian/e2fsprogs/usr/share/e2fsprogs/initrd.ext3-add-journal
276
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400277
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000278 # symlinks to prepare dh_installdocs run
279 mkdir -p ${debdir}/e2fsck-static/usr/share/doc/
280 ln -sf e2fsprogs ${debdir}/e2fsck-static/usr/share/doc/e2fsck-static
281
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500282 mkdir -p ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}
283 mkdir -p ${debdir}/libblkid-dev/usr/share/doc
284 ln -sf libblkid${BLKID_SOVERSION} ${debdir}/libblkid-dev/usr/share/doc/libblkid-dev
285
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400286 mkdir -p ${debdir}/libss${SS_SOVERSION}/usr/share/doc/libss${SS_SOVERSION}
287 mkdir -p ${debdir}/ss-dev/usr/share/doc
288 ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev
289
290 mkdir -p ${debdir}/libcomerr${COMERR_SOVERSION}/usr/share/doc/libcomerr${COMERR_SOVERSION}
291 mkdir -p ${debdir}/comerr-dev/usr/share/doc
292 ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
293
294 mkdir -p ${debdir}/libuuid${UUID_SOVERSION}/usr/share/doc/libuuid${UUID_SOVERSION}
295 mkdir -p ${debdir}/uuid-dev/usr/share/doc
296 ln -sf libuuid${UUID_SOVERSION} ${debdir}/uuid-dev/usr/share/doc/uuid-dev
297
298 mkdir -p ${debdir}/e2fslibs/usr/share/doc/e2fslibs
299 mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc
300 ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000301
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500302 install -m 644 debian/libblkid.copyright \
303 ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}/copyright
304
Theodore Ts'oe254d052003-12-07 01:57:04 -0500305 dh_installdocs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000306
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000307 # HTML docs
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400308 install -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
Theodore Ts'o79786212001-06-22 23:05:23 -0400309 install -p ${stdbuilddir}/doc/libext2fs_*.html \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400310 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
311 install -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
Theodore Ts'o79786212001-06-22 23:05:23 -0400312 install -p ${stdbuilddir}/lib/et/com_err_*.html \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400313 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000314
315 # texinfo docs
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400316 mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000317 install -p ${topdir}/doc/libext2fs.texinfo \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400318 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/libext2fs.texi
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000319 install -p ${topdir}/lib/et/com_err.texinfo \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400320 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000321
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400322 install -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
323 install -p -m 0644 lib/ss/ss_err.et \
324 ${stdbuilddir}/lib/ext2fs/ext2_err.et \
325 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
326 install -d ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
327 install -p -m 0644 debugfs/debug_cmds.ct \
328 ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
329
330 install -d ${debdir}/uuid-dev/usr/share/doc/libuuid${UUID_SOVERSION}
331 install -p -m 0644 doc/draft-leach-uuids-guids-01.txt \
332 ${debdir}/uuid-dev/usr/share/doc/libuuid${UUID_SOVERSION}
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000333
Theodore Ts'o541d1732002-02-23 21:23:26 -0500334 dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info
Theodore Ts'o79786212001-06-22 23:05:23 -0400335 dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000336
Theodore Ts'o9bf19712003-07-23 09:55:39 -0400337 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibblkid${BLKID_SOVERSION}
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400338 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibcomerr${COMERR_SOVERSION}
339 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibss${SS_SOVERSION}
340 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibuuid${UUID_SOVERSION}
341 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -pe2fslibs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000342
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000343 dh_strip
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000344
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000345 dh_compress
346 dh_fixperms
347
Theodore Ts'oe254d052003-12-07 01:57:04 -0500348 dh_makeshlibs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400349 dh_makeshlibs -plibcomerr${COMERR_SOVERSION} \
350 -V 'libcomerr2 (>= 1.33-3)'
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500351
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000352 dh_installdeb
Theodore Ts'o79786212001-06-22 23:05:23 -0400353 dh_shlibdeps -l${stdbuilddir}/lib
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400354 dh_shlibdeps -pe2fsprogs -l${stdbuilddir}/lib \
355 -u"-Ldebian/e2fsprogs.shlibs.local"
Theodore Ts'o7a15db22003-07-29 22:15:33 -0400356 dh_shlibdeps -pe2fsprogs-udeb -l${stdbuilddir}/lib \
357 -u"-Ldebian/e2fsprogs-udeb.shlibs.local"
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000358
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400359 dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev \
Theodore Ts'oe254d052003-12-07 01:57:04 -0500360 -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000361 DH_OPTIONS= dh_gencontrol -pcomerr-dev \
362 -u '-v${COMERR_VERSION}-${MAIN_VERSION}'
363 DH_OPTIONS= dh_gencontrol -pss-dev \
364 -u '-v${SS_VERSION}-${MAIN_VERSION}'
365 DH_OPTIONS= dh_gencontrol -puuid-dev \
366 -u '-v${UUID_VERSION}-${MAIN_VERSION}'
367
Theodore Ts'oe254d052003-12-07 01:57:04 -0500368 dh_md5sums -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
369 dh_builddeb -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
Theodore Ts'odd198d62002-10-31 03:44:35 -0500370
371 # udeb stuff
372 dh_gencontrol -pe2fsprogs-udeb -- -fdebian/files~
373 dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
374 dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000375
Theodore Ts'o417781a2003-04-10 00:18:56 -0400376 dh_gencontrol -plibblkid1-udeb -- -fdebian/files~
377 dpkg-distaddfile $(BLKID_UDEB_NAME) debian-installer $(BLKID_UDEB_PRIORITY)
378 dh_builddeb -plibblkid1-udeb --filename=$(BLKID_UDEB_NAME)
379
Theodore Ts'oe254d052003-12-07 01:57:04 -0500380 dh_gencontrol -plibuuid1-udeb -- -fdebian/files~
381 dpkg-distaddfile $(UUID_UDEB_NAME) debian-installer $(UUID_UDEB_PRIORITY)
382 dh_builddeb -plibuuid1-udeb --filename=$(UUID_UDEB_NAME)
383
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000384binary: binary-indep binary-arch
385
386.PHONY: binary binary-arch binary-indep clean checkroot