~vorlon/ubuntu/natty/e2fsprogs/multiarch

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2009-08-25 18:34:46 UTC
  • mfrom: (8.2.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090825183446-p2iuz63g8g4ytlf4
Tags: 1.41.9-1ubuntu1
* Merge from Debian, remaining changes:
  - Do not build-depend on dietlibc-dev, which is universe.
  - Do now allow pkg-create-dbgsym to operate on this package.
  - Use external libblkid and libuuid from util-linux, rather than
    building our own.
  - Do not include /etc/e2fsck.conf and remove on upgrade.

* Included a couple of extra revisions from GIT maint:
  - (ffd8078) e2freefrag: Update manpage to include e2fsprogs version
    and release date
  - (31b5a2b) mke2fs.conf: Use the feature name "extent" instead of
    "extents"
  - (8bafedb) tune2fs: Fix "tune2fs -j <dev>" for extent-enabled
     filesystems.  LP: #416648.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
export LC_ALL=C
12
12
# no chance that pkg-create-dbgsym can cope with this package's manual construction of -dbg
13
13
export NO_PKG_MANGLE=1
14
 
 
15
 
# Allow distro-specific behaviour
16
 
DISTRO :=$(shell lsb_release -is 2>/dev/null || echo Debian)
17
 
ifeq ($(DISTRO),Ubuntu)
18
 
BUILD_BLKID ?= no
19
 
BUILD_UUID ?= no
20
 
endif
 
14
# always build with libblkid and libuuid from util-linux
 
15
UTIL_LINUX_NG ?= yes
21
16
 
22
17
# These are used for cross-compiling and for saving the configure script
23
18
# from having to guess our platform (since we know it already)
35
30
COMERR_SOVERSION = $(shell grep ELF_SO_VERSION lib/et/Makefile.in | cut '-d ' -f3)
36
31
SS_VERSION = $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
37
32
SS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
38
 
ifneq ($(BUILD_UUID),no)
 
33
 
 
34
ifneq ($(UTIL_LINUX_NG),yes)
39
35
UUID_VERSION = $(shell grep ELF_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
40
36
UUID_SOVERSION = $(shell grep ELF_SO_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
41
 
endif
42
 
ifneq ($(BUILD_BLKID),no)
 
37
 
43
38
BLKID_VERSION = $(shell grep ELF_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
44
39
BLKID_SOVERSION = $(shell grep ELF_SO_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
45
40
endif
 
41
 
46
42
EXT2FS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3)
47
43
E2P_SOVERSION = $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3)
48
44
 
52
48
debdir=${topdir}/debian
53
49
tmpdir=${debdir}/tmp
54
50
udebdir=${debdir}/e2fsprogs-udeb
55
 
ifneq ($(BUILD_BLKID),no)
 
51
ifneq ($(UTIL_LINUX_NG),yes)
56
52
blkidudebdir=${debdir}/libblkid1-udeb
57
 
endif
58
 
ifneq ($(BUILD_UUID),no)
59
53
uuidudebdir=${debdir}/libuuid1-udeb
60
54
endif
61
55
libcomerrdir=${debdir}/libcomerr${COMERR_SOVERSION}
64
58
libssdir=${debdir}/libss${SS_SOVERSION}
65
59
ssdevdir=${debdir}/ss-dev
66
60
libssdbgdir=${debdir}/libss2-dbg
67
 
ifneq ($(BUILD_BLKID),no)
 
61
ifneq ($(UTIL_LINUX_NG),yes)
68
62
libblkiddir=${debdir}/libblkid${BLKID_SOVERSION}
69
63
libblkiddevdir=${debdir}/libblkid-dev
70
64
libblkiddbgdir=${debdir}/libblkid1-dbg
71
 
endif
72
 
ifneq ($(BUILD_UUID),no)
73
65
libuuiddir=${debdir}/libuuid${UUID_SOVERSION}
74
66
uuiddevdir=${debdir}/uuid-dev
75
67
libuuiddbgdir=${debdir}/libuuid1-dbg
94
86
UDEB_NAME = $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
95
87
UDEB_PRIORITY = $(shell grep '^Package: e2fsprogs-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
96
88
 
97
 
ifneq ($(BUILD_BLKID),no)
 
89
ifneq ($(UTIL_LINUX_NG),yes)
98
90
BLKID_UDEB_NAME = libblkid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
99
91
BLKID_UDEB_PRIORITY = $(shell grep '^Package: libblkid1-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
100
 
endif
101
92
 
102
 
ifneq ($(BUILD_UUID),no)
103
93
UUID_UDEB_NAME = libuuid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
104
94
UUID_UDEB_PRIORITY = $(shell grep '^Package: libuuid1-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
105
95
endif
141
131
 
142
132
COMMON_CONF_FLAGS =  \
143
133
                --enable-elf-shlibs --infodir=/usr/share/info
144
 
ifneq ($(BUILD_BLKID),no)
 
134
ifeq ($(UTIL_LINUX_NG),yes)
 
135
COMMON_CONF_FLAGS += --disable-fsck --disable-libblkid \
 
136
                        --disable-libuuid --disable-uuidd
 
137
else
145
138
COMMON_CONF_FLAGS += --enable-fsck
146
 
else
147
 
COMMON_CONF_FLAGS += --disable-fsck --disable-libblkid
148
 
endif
149
 
ifeq ($(BUILD_UUID),no)
150
 
COMMON_CONF_FLAGS += --disable-libuuid --disable-uuidd
151
139
endif
152
140
 
153
141
STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
179
167
endif
180
168
 
181
169
M4_ARGS=
182
 
ifneq ($(BUILD_BLKID),no)
183
 
M4_ARGS+=-DBUILD_BLKID
184
 
else
185
 
M4_ARGS+=-UBUILD_BLKID
186
 
endif
187
 
ifneq ($(BUILD_UUID),no)
188
 
M4_ARGS+=-DBUILD_UUID
189
 
else
190
 
M4_ARGS+=-UBUILD_UUID
 
170
ifeq ($(UTIL_LINUX_NG),yes)
 
171
M4_ARGS+=-DUTIL_LINUX_NG
 
172
else
 
173
M4_ARGS+=-UUTIL_LINUX_NG
191
174
endif
192
175
 
193
176
debian/control: debian/control.in debian/rules
373
356
                ln -s e2fsck fsck.ext3 ; ln -s mke2fs mkfs.ext2 ; \
374
357
                ln -s mke2fs mkfs.ext3 ; ln -s mke2fs mkfs.ext4)
375
358
 
376
 
ifneq ($(BUILD_BLKID),no)
 
359
ifneq ($(UTIL_LINUX_NG),yes)
377
360
        mkdir -p ${blkidudebdir}/lib
378
361
        mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib
379
 
endif
380
362
 
381
 
ifneq ($(BUILD_UUID),no)
382
363
        mkdir -p ${uuidudebdir}/lib
383
364
        mv ${udebdir}/lib/libuuid.* ${uuidudebdir}/lib
384
365
endif
410
391
 
411
392
  # symlinks to prepare dh_installdocs run
412
393
 
413
 
ifneq ($(BUILD_BLKID),no)
 
394
ifneq ($(UTIL_LINUX_NG),yes)
414
395
        mkdir -p ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}
415
396
        mkdir -p ${debdir}/libblkid-dev/usr/share/doc
416
397
        ln -sf libblkid${BLKID_SOVERSION} ${debdir}/libblkid-dev/usr/share/doc/libblkid-dev
424
405
        mkdir -p ${debdir}/comerr-dev/usr/share/doc
425
406
        ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
426
407
 
427
 
ifneq ($(BUILD_UUID),no)
 
408
ifneq ($(UTIL_LINUX_NG),yes)
428
409
        mkdir -p ${debdir}/libuuid${UUID_SOVERSION}/usr/share/doc/libuuid${UUID_SOVERSION}
429
410
        mkdir -p ${debdir}/uuid-dev/usr/share/doc
430
411
#       ln -sf libuuid${UUID_SOVERSION} ${debdir}/uuid-dev/usr/share/doc/uuid-dev
434
415
        mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc
435
416
        ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
436
417
 
437
 
ifneq ($(BUILD_BLKID),no)
 
418
ifneq ($(UTIL_LINUX_NG),yes)
438
419
        $(INSTALL) -p -m 0644 debian/libblkid.copyright \
439
420
                ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}/copyright
440
421
endif
473
454
                -pe2fslibs -pe2fsck-static \
474
455
                -pe2fsprogs-dbg -pe2fslibs-dbg \
475
456
                -plibcomerr2-dbg -plibss2-dbg
476
 
ifneq ($(BUILD_BLKID),no)
 
457
ifneq ($(UTIL_LINUX_NG),yes)
477
458
        DH_OPTIONS= dh_installchangelogs -plibblkid${BLKID_SOVERSION} \
478
459
                -plibblkid1-dbg
479
 
endif
480
 
ifneq ($(BUILD_UUID),no)
481
460
        DH_OPTIONS= dh_installchangelogs -plibuuid${UUID_SOVERSION} \
482
461
                -puuid-dev -puuid-runtime -puuid-runtime-dbg -plibuuid1-dbg
483
462
endif
491
470
 
492
471
        # debug package stuff
493
472
        rm -rf ${udebdir}/usr
494
 
ifneq ($(BUILD_BLKID),no)
 
473
ifneq ($(UTIL_LINUX_NG),yes)
495
474
        rm -rf ${blkidudebdir}/usr
496
 
endif
497
 
ifneq ($(BUILD_UUID),no)
498
475
        rm -rf ${uuidudebdir}/usr
499
476
endif
500
477
 
505
482
                ${debugdir}/usr/lib/debug
506
483
        rm -rf ${e2fsckstaticdir}/usr/lib
507
484
 
508
 
ifneq ($(BUILD_UUID),no)
 
485
ifneq ($(UTIL_LINUX_NG),yes)
509
486
        mkdir -p ${uuidruntimedbgdir}/usr/lib
510
487
        mv ${uuidruntimedir}/usr/lib/debug ${uuidruntimedbgdir}/usr/lib
511
488
        rmdir ${uuidruntimedir}/usr/lib
523
500
        mv ${libssdir}/usr/lib/debug ${libssdbgdir}/usr/lib
524
501
        rmdir ${libssdir}/usr/lib
525
502
 
526
 
ifneq ($(BUILD_UUID),no)
 
503
ifneq ($(UTIL_LINUX_NG),yes)
527
504
        mkdir -p ${libuuiddbgdir}/usr/lib
528
505
        mv ${libuuiddir}/usr/lib/debug ${libuuiddbgdir}/usr/lib
529
506
        rmdir ${libuuiddir}/usr/lib
530
 
endif
531
507
 
532
 
ifneq ($(BUILD_BLKID),no)
533
508
        mkdir -p ${libblkiddbgdir}/usr/lib
534
509
        mv ${libblkiddir}/usr/lib/debug ${libblkiddbgdir}/usr/lib
535
510
        rmdir ${libblkiddir}/usr/lib
538
513
        # dpkg symbol handling
539
514
ifneq (,$(findstring update-symbols,$(DEB_BUILD_OPTIONS)))
540
515
SYMBOL_LIBS := e2fslibs libcomerr2 libss2
541
 
ifneq ($(BUILD_BLKID),no)
542
 
SYMBOL_LIBS += libblkid1
543
 
endif
544
 
ifneq ($(BUILD_UUID),no)
545
 
SYMBOL_LIBS += libuuid1
 
516
ifneq ($(UTIL_LINUX_NG),yes)
 
517
SYMBOL_LIBS += libblkid1 libuuid1
546
518
endif
547
519
        for i in $(SYMBOL_LIBS); \
548
520
        do \
557
529
        $(INSTALL) -p -m 0644 debian/e2fsprogs.copyright \
558
530
                ${debugdir}/usr/share/doc/e2fsprogs-dbg/copyright
559
531
 
560
 
ifneq ($(BUILD_UUID),no)
 
532
ifneq ($(UTIL_LINUX_NG),yes)
561
533
        $(INSTALL) -p -m 0644 debian/uuid-runtime.copyright \
562
534
                ${uuidruntimedbgdir}/usr/share/doc/uuid-runtime-dbg/copyright
563
535
endif
571
543
        $(INSTALL) -p -m 0644 debian/libss2.copyright \
572
544
                ${libssdbgdir}/usr/share/doc/libss2-dbg/copyright
573
545
 
574
 
ifneq ($(BUILD_BLKID),no)
 
546
ifneq ($(UTIL_LINUX_NG),yes)
575
547
        $(INSTALL) -p -m 0644 debian/libblkid.copyright \
576
548
                ${libblkiddbgdir}/usr/share/doc/libblkid1-dbg/copyright
577
 
endif
578
549
 
579
 
ifneq ($(BUILD_UUID),no)
580
550
        $(INSTALL) -p -m 0644 debian/libuuid1.copyright \
581
551
                ${libuuiddbgdir}/usr/share/doc/libuuid1-dbg/copyright
582
552
endif
586
556
        dh_makeshlibs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
587
557
        dh_makeshlibs -plibcomerr${COMERR_SOVERSION} \
588
558
                -V 'libcomerr2 (>= 1.33-3)'
589
 
ifneq ($(BUILD_BLKID),no)
 
559
ifneq ($(UTIL_LINUX_NG),yes)
590
560
        dh_makeshlibs -plibblkid${BLKID_SOVERSION} -V 'libblkid1 (>= 1.39-1)'
591
561
        echo "udeb: libblkid 1 libblkid1-udeb" >> \
592
562
                debian/libblkid1/DEBIAN/shlibs
593
 
endif
594
 
ifneq ($(BUILD_UUID),no)
595
563
        echo "udeb: libuuid 1 libuuid1-udeb" >> debian/libuuid1/DEBIAN/shlibs
596
564
endif
597
565
 
608
576
          -u '-v${COMERR_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
609
577
        DH_OPTIONS= dh_gencontrol -pss-dev \
610
578
          -u '-v${SS_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
611
 
ifneq ($(BUILD_UUID),no)
 
579
ifneq ($(UTIL_LINUX_NG),yes)
612
580
        DH_OPTIONS= dh_gencontrol -puuid-dev \
613
581
          -u '-v${UUID_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
614
582
endif
615
583
        dh_gencontrol   -pe2fsprogs-udeb -- -fdebian/files~
616
 
ifneq ($(BUILD_BLKID),no)
 
584
ifneq ($(UTIL_LINUX_NG),yes)
617
585
        dh_gencontrol   -plibblkid1-udeb -- -fdebian/files~
618
 
endif
619
 
ifneq ($(BUILD_UUID),no)
620
586
        dh_gencontrol   -plibuuid1-udeb -- -fdebian/files~
621
587
endif
622
588
 
623
589
        dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
624
 
ifneq ($(BUILD_BLKID),no)
 
590
ifneq ($(UTIL_LINUX_NG),yes)
625
591
        dpkg-distaddfile $(BLKID_UDEB_NAME) debian-installer $(BLKID_UDEB_PRIORITY)
626
 
endif
627
 
ifneq ($(BUILD_UUID),no)
628
592
        dpkg-distaddfile $(UUID_UDEB_NAME) debian-installer $(UUID_UDEB_PRIORITY)
629
593
endif
630
594
        dh_md5sums -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
631
595
        dh_builddeb -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
632
596
        dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME)
633
 
ifneq ($(BUILD_BLKID),no)
 
597
ifneq ($(UTIL_LINUX_NG),yes)
634
598
        dh_builddeb -plibblkid1-udeb --filename=$(BLKID_UDEB_NAME)
635
 
endif
636
 
ifneq ($(BUILD_UUID),no)
637
599
        dh_builddeb -plibuuid1-udeb --filename=$(UUID_UDEB_NAME)
638
600
endif
639
601