blob: 8a6004865721780090d1b04576b25f7f1bbb1fc7 [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)
Theodore Ts'o6fe7d112003-03-16 19:58:25 -050038BLKID_VERSION = $(shell grep ELF_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
39BLKID_SOVERSION = $(shell grep ELF_SO_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
Theodore Ts'oe5b16432002-08-17 21:11:29 -040040EXT2FS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3)
41E2P_SOVERSION = $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000042
43package=e2fsprogs
44
45topdir=$(shell pwd)
46debdir=${topdir}/debian
Theodore Ts'ob90b8262001-06-15 22:54:34 +000047tmpdir=${debdir}/tmp
Theodore Ts'odd198d62002-10-31 03:44:35 -050048udebdir=${debdir}/e2fsprogs-udeb
Theodore Ts'o417781a2003-04-10 00:18:56 -040049blkidudebdir=${debdir}/libblkid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +000050maindir=${debdir}/e2fsprogs
Theodore Ts'o79786212001-06-22 23:05:23 -040051stdbuilddir=${debdir}/BUILD-STD
52bfbuilddir=${debdir}/BUILD-BF
Theodore Ts'oe5b16432002-08-17 21:11:29 -040053mipsbuilddir=${debdir}/BUILD-MIPS
Theodore Ts'ob90b8262001-06-15 22:54:34 +000054# docdir=${maindir}/usr/share/doc/${package}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000055MANDIR=/usr/share/man
Theodore Ts'ob90b8262001-06-15 22:54:34 +000056mandir=${tmpdir}${MANDIR}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000057
Theodore Ts'odd198d62002-10-31 03:44:35 -050058UDEB_NAME = $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
59UDEB_PRIORITY = $(shell grep '^Package: e2fsprogs-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
60
Theodore Ts'o417781a2003-04-10 00:18:56 -040061BLKID_UDEB_NAME = libblkid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
62BLKID_UDEB_PRIORITY = $(shell grep '^Package: libblkid1-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
63
Theodore Ts'o541d1732002-02-23 21:23:26 -050064STAMPSDIR=debian/stampdir
65CFGSTDSTAMP=${STAMPSDIR}/configure-std-stamp
66CFGBFSTAMP=${STAMPSDIR}/configure-bf-stamp
67BUILDSTDSTAMP=${STAMPSDIR}/build-std-stamp
68BUILDBFSTAMP=${STAMPSDIR}/build-bf-stamp
69
Theodore Ts'o1893e712001-05-21 02:48:41 +000070CCOPTS = -O2 -fsigned-char
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000071LIBC-DEV = libc6-dev
72
Theodore Ts'o1893e712001-05-21 02:48:41 +000073INSTALL = install
74INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
75
76ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
77CCOPTS += -g -O1
78endif
79ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
80INSTALL_PROGRAM += -s
81endif
82
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000083ifeq (${DEB_HOST_ARCH},alpha)
84CCOPTS += -DHAVE_NETINET_IN_H
85LIBC-DEV = libc6.1-dev
86else
87CCOPTS += -D__NO_STRING_INLINES
88endif
89
Theodore Ts'o79786212001-06-22 23:05:23 -040090BF_CCOPTS = -Os -fomit-frame-pointer
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +000091
Theodore Ts'o79786212001-06-22 23:05:23 -040092COMMON_CONF_FLAGS = \
Theodore Ts'o62775dc2003-05-08 10:39:50 -040093 --enable-elf-shlibs --enable-dynamic-e2fsck --disable-evms \
Theodore Ts'oe5b16432002-08-17 21:11:29 -040094 --infodir=/usr/share/info
Theodore Ts'o79786212001-06-22 23:05:23 -040095
Theodore Ts'o62775dc2003-05-08 10:39:50 -040096STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
Theodore Ts'o79786212001-06-22 23:05:23 -040097
98BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
Theodore Ts'o62775dc2003-05-08 10:39:50 -040099 --disable-nls --disable-swapfs --disable-imager \
Theodore Ts'o79786212001-06-22 23:05:23 -0400100 --disable-resizer --disable-debugfs
101
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400102MIPS_NOPIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
103 --disable-nls \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400104 --disable-swapfs --disable-imager \
Theodore Ts'odd198d62002-10-31 03:44:35 -0500105 --disable-resizer # --disable-debugfs
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400106# we can't use those flags at configure time
107MIPS_CFLAGS= -G 0 -fno-pic -mno-abicalls
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400108
109ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
110ifneq (,$(findstring $(DEB_BUILD_ARCH),mips mipsel))
111ismips=ismips
112endif
113endif
114
Theodore Ts'o541d1732002-02-23 21:23:26 -0500115${CFGSTDSTAMP}:
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000116 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500117
Theodore Ts'o79786212001-06-22 23:05:23 -0400118 mkdir -p ${stdbuilddir}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000119ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400120 cd ${stdbuilddir} && \
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 +0000122else
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400123 cd ${stdbuilddir} && CC="${DEB_HOST_GNU_TYPE}-gcc" \
Theodore Ts'o79786212001-06-22 23:05:23 -0400124 ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000125 --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
126endif
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400127
128 # specially-built MIPS lib
129 if [ ismips = "${ismips}" ]; then \
130 mkdir -p ${mipsbuilddir} ; \
131 cd ${mipsbuilddir} && \
132 ${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS} ; \
133 fi
134
Theodore Ts'o541d1732002-02-23 21:23:26 -0500135 mkdir -p ${STAMPSDIR}
136 touch ${CFGSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400137
Theodore Ts'o541d1732002-02-23 21:23:26 -0500138${CFGBFSTAMP}:
Theodore Ts'o79786212001-06-22 23:05:23 -0400139 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500140 rm -f config.cache
141
Theodore Ts'o79786212001-06-22 23:05:23 -0400142 mkdir -p ${bfbuilddir}
143ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400144 cd ${bfbuilddir} && \
Theodore Ts'o79786212001-06-22 23:05:23 -0400145 ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS}
146else
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400147 cd ${bfbuilddir} && CC="${DEB_HOST_GNU_TYPE}-gcc" \
Theodore Ts'o79786212001-06-22 23:05:23 -0400148 ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
149 --build=$(DEB_BUILD_GNU_TYPE) $(DEB_HOST_GNU_TYPE)
150endif
Theodore Ts'o541d1732002-02-23 21:23:26 -0500151 mkdir -p ${STAMPSDIR}
152 touch ${CFGBFSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400153
154build: build-std build-bf
155
Theodore Ts'o541d1732002-02-23 21:23:26 -0500156build-std: ${BUILDSTDSTAMP}
157${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400158 dh_testdir
159 make -C ${stdbuilddir} all
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400160
Theodore Ts'o79786212001-06-22 23:05:23 -0400161 ( cd ${stdbuilddir}/doc && \
162 texi2html -split_chapter ${topdir}/doc/libext2fs.texinfo )
163 ( cd ${stdbuilddir}/lib/et && make com_err.info && \
164 texi2html -split_chapter -expandinfo ${topdir}/lib/et/com_err.texinfo )
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400165
166 # specially-built MIPS lib
167 if [ ismips = "${ismips}" ]; then \
168 make -C ${mipsbuilddir}/util ; \
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400169 make -C ${mipsbuilddir} libs \
170 CFLAGS="${CCOPTS} ${MIPS_CFLAGS}" \
171 LIB_SUBDIRS="lib/et lib/ext2fs" ; \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400172 fi
173
Theodore Ts'o541d1732002-02-23 21:23:26 -0500174 touch ${BUILDSTDSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400175
Theodore Ts'o541d1732002-02-23 21:23:26 -0500176build-bf: ${BUILDBFSTAMP}
177${BUILDBFSTAMP}: ${CFGBFSTAMP}
Theodore Ts'o79786212001-06-22 23:05:23 -0400178 dh_testdir
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400179 make -C ${bfbuilddir} libs
180 make -C ${bfbuilddir}/e2fsck all
181 make -C ${bfbuilddir}/misc all
Theodore Ts'o541d1732002-02-23 21:23:26 -0500182 touch ${BUILDBFSTAMP}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000183
184clean:
185 dh_testdir
Theodore Ts'o541d1732002-02-23 21:23:26 -0500186 rm -rf ${STAMPSDIR}
Theodore Ts'o79786212001-06-22 23:05:23 -0400187 -make -C ${stdbuilddir} -i distclean
188 -make -C ${bfbuilddir} -i distclean
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400189 rm -rf ${stdbuilddir} ${bfbuilddir} ${mipsbuilddir}
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000190 rm -f doc/libext2fs_*.html lib/et/com_err_*.html debian/*.substvars
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000191 dh_clean
192
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400193install: cleanup install-std
Theodore Ts'o79786212001-06-22 23:05:23 -0400194
195# This rule allows to factorize the dh_clean between the 2 install rules
196# This must be launched before install-* (if launching them by hand, for
197# exemple) or results are unpredictable
198cleanup:
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000199 dh_testdir
200 dh_testroot
201 dh_clean -k
Theodore Ts'o79786212001-06-22 23:05:23 -0400202
203install-std: DH_OPTIONS=
204install-std: build
205 dh_testdir
206 dh_testroot
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000207 dh_installdirs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000208
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000209 mkdir -p ${tmpdir}/sbin
Theodore Ts'o79786212001-06-22 23:05:23 -0400210 make -C ${stdbuilddir} install DESTDIR=${tmpdir} \
211 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
212 # static libs and .h files
213 make -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000214
Theodore Ts'o1893e712001-05-21 02:48:41 +0000215 # statically-linked fsck
Theodore Ts'o79786212001-06-22 23:05:23 -0400216 ${INSTALL_PROGRAM} ${stdbuilddir}/e2fsck/e2fsck.static ${tmpdir}/sbin
Theodore Ts'o1893e712001-05-21 02:48:41 +0000217 ln -s e2fsck.8.gz ${mandir}/man8/e2fsck.static.8.gz
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000218
Theodore Ts'o020c5472003-04-10 00:01:19 -0400219 ln -s et/com_err.h ${tmpdir}/usr/include
220
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400221 dh_movefiles
222 test -z `find ${tmpdir} -type f`
223
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400224 # specially-built MIPS lib
225 if [ ismips = "${ismips}" ]; then \
226 cp ${mipsbuilddir}/lib/libext2fs.a \
227 ${debdir}/e2fslibs-dev/usr/lib/libext2fs-nopic.a ; \
228 fi
229
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400230install-udeb: DH_OPTIONS=
231install-udeb: build
Theodore Ts'o79786212001-06-22 23:05:23 -0400232 dh_testdir
233 dh_testroot
Theodore Ts'o79786212001-06-22 23:05:23 -0400234
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400235 make -C ${bfbuilddir} install-shlibs-libs-recursive DESTDIR=${udebdir} \
Theodore Ts'o79786212001-06-22 23:05:23 -0400236 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400237 make -C ${bfbuilddir}/e2fsck install DESTDIR=${udebdir} \
238 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
239 make -C ${bfbuilddir}/misc install DESTDIR=${udebdir} \
240 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
Theodore Ts'o79786212001-06-22 23:05:23 -0400241
Theodore Ts'o62775dc2003-05-08 10:39:50 -0400242 rm -rf ${udebdir}/usr
Theodore Ts'oe3075ae2003-07-12 16:28:09 -0400243 find ${udebdir}/sbin -type f -a ! -name e2fsck \
244 -a ! -name mke2fs -print | xargs rm
245
246 (cd ${udebdir}/sbin; ln -s e2fsck fsck.ext2 ; \
247 ln -s e2fsck fsck.ext3 ; ln -s mke2fs mkfs.ext2 ; \
248 ln -s mke2fs mkfs.ext3)
Theodore Ts'o2a4c77b2002-09-24 01:30:00 -0400249
Theodore Ts'o417781a2003-04-10 00:18:56 -0400250 mkdir -p ${blkidudebdir}/lib
251 mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib
Theodore Ts'o79786212001-06-22 23:05:23 -0400252
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'odd198d62002-10-31 03:44:35 -0500268 mkdir -p debian/e2fsprogs/etc/mkinitrd/scripts
269 install -m755 debian/e2fsprogs.mkinitrd \
270 debian/e2fsprogs/etc/mkinitrd/scripts/e2fsprogs
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400271
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000272 # symlinks to prepare dh_installdocs run
273 mkdir -p ${debdir}/e2fsck-static/usr/share/doc/
274 ln -sf e2fsprogs ${debdir}/e2fsck-static/usr/share/doc/e2fsck-static
275
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500276 mkdir -p ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}
277 mkdir -p ${debdir}/libblkid-dev/usr/share/doc
278 ln -sf libblkid${BLKID_SOVERSION} ${debdir}/libblkid-dev/usr/share/doc/libblkid-dev
279
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400280 mkdir -p ${debdir}/libss${SS_SOVERSION}/usr/share/doc/libss${SS_SOVERSION}
281 mkdir -p ${debdir}/ss-dev/usr/share/doc
282 ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev
283
284 mkdir -p ${debdir}/libcomerr${COMERR_SOVERSION}/usr/share/doc/libcomerr${COMERR_SOVERSION}
285 mkdir -p ${debdir}/comerr-dev/usr/share/doc
286 ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
287
288 mkdir -p ${debdir}/libuuid${UUID_SOVERSION}/usr/share/doc/libuuid${UUID_SOVERSION}
289 mkdir -p ${debdir}/uuid-dev/usr/share/doc
290 ln -sf libuuid${UUID_SOVERSION} ${debdir}/uuid-dev/usr/share/doc/uuid-dev
291
292 mkdir -p ${debdir}/e2fslibs/usr/share/doc/e2fslibs
293 mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc
294 ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000295
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500296 install -m 644 debian/libblkid.copyright \
297 ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}/copyright
298
Theodore Ts'o417781a2003-04-10 00:18:56 -0400299 dh_installdocs -Ne2fsprogs-udeb -Nlibblkid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000300
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000301 # HTML docs
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400302 install -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
Theodore Ts'o79786212001-06-22 23:05:23 -0400303 install -p ${stdbuilddir}/doc/libext2fs_*.html \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400304 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
305 install -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
Theodore Ts'o79786212001-06-22 23:05:23 -0400306 install -p ${stdbuilddir}/lib/et/com_err_*.html \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400307 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000308
309 # texinfo docs
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400310 mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000311 install -p ${topdir}/doc/libext2fs.texinfo \
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400312 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/libext2fs.texi
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000313 install -p ${topdir}/lib/et/com_err.texinfo \
Theodore Ts'oe5b16432002-08-17 21:11:29 -0400314 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000315
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400316 install -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
317 install -p -m 0644 lib/ss/ss_err.et \
318 ${stdbuilddir}/lib/ext2fs/ext2_err.et \
319 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
320 install -d ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
321 install -p -m 0644 debugfs/debug_cmds.ct \
322 ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
323
324 install -d ${debdir}/uuid-dev/usr/share/doc/libuuid${UUID_SOVERSION}
325 install -p -m 0644 doc/draft-leach-uuids-guids-01.txt \
326 ${debdir}/uuid-dev/usr/share/doc/libuuid${UUID_SOVERSION}
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000327
Theodore Ts'o541d1732002-02-23 21:23:26 -0500328 dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info
Theodore Ts'o79786212001-06-22 23:05:23 -0400329 dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000330
Theodore Ts'o9bf19712003-07-23 09:55:39 -0400331 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibblkid${BLKID_SOVERSION}
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400332 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibcomerr${COMERR_SOVERSION}
333 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibss${SS_SOVERSION}
334 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -plibuuid${UUID_SOVERSION}
335 DH_OPTIONS= dh_installchangelogs -pe2fsprogs -pe2fslibs
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000336
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000337 dh_strip
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000338
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000339 dh_compress
340 dh_fixperms
341
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400342 dh_makeshlibs
343 dh_makeshlibs -plibcomerr${COMERR_SOVERSION} \
344 -V 'libcomerr2 (>= 1.33-3)'
Theodore Ts'o6fe7d112003-03-16 19:58:25 -0500345
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000346 dh_installdeb
Theodore Ts'o79786212001-06-22 23:05:23 -0400347 dh_shlibdeps -l${stdbuilddir}/lib
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400348 dh_shlibdeps -pe2fsprogs -l${stdbuilddir}/lib \
349 -u"-Ldebian/e2fsprogs.shlibs.local"
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000350
Theodore Ts'o151c86a2003-07-25 07:03:00 -0400351 dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev \
352 -Ne2fsprogs-udeb -Nlibblkid1-udeb
Theodore Ts'ob90b8262001-06-15 22:54:34 +0000353 DH_OPTIONS= dh_gencontrol -pcomerr-dev \
354 -u '-v${COMERR_VERSION}-${MAIN_VERSION}'
355 DH_OPTIONS= dh_gencontrol -pss-dev \
356 -u '-v${SS_VERSION}-${MAIN_VERSION}'
357 DH_OPTIONS= dh_gencontrol -puuid-dev \
358 -u '-v${UUID_VERSION}-${MAIN_VERSION}'
359
Theodore Ts'o417781a2003-04-10 00:18:56 -0400360 dh_md5sums -Ne2fsprogs-udeb -Nlibblkid1-udeb
361 dh_builddeb -Ne2fsprogs-udeb -Nlibblkid1-udeb
Theodore Ts'odd198d62002-10-31 03:44:35 -0500362
363 # udeb stuff
364 dh_gencontrol -pe2fsprogs-udeb -- -fdebian/files~
365 dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
366 dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME)
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000367
Theodore Ts'o417781a2003-04-10 00:18:56 -0400368 dh_gencontrol -plibblkid1-udeb -- -fdebian/files~
369 dpkg-distaddfile $(BLKID_UDEB_NAME) debian-installer $(BLKID_UDEB_PRIORITY)
370 dh_builddeb -plibblkid1-udeb --filename=$(BLKID_UDEB_NAME)
371
Theodore Ts'o4d8f08f2001-05-09 04:51:07 +0000372binary: binary-indep binary-arch
373
374.PHONY: binary binary-arch binary-indep clean checkroot