~ubuntu-branches/debian/jessie/ufsutils/jessie

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Guillem Jover, Robert Millan, Guillem Jover, Peter Pentchev
  • Date: 2011-05-31 03:50:05 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110531035005-wyiyk25p99ivd0k0
Tags: 8.2-1
[ Robert Millan ]
* Set ufsutils-udeb to kfreebsd-any.

[ Guillem Jover ]
* New upstream version (based on FreeBSD 8.2)
* Now using Standards-Version 3.9.2 (no changes needed).
* Switch to source format “3.0 (quilt)”.
  - Remove quilt from Build-Depends.
  - Remove patch target in debian/rules.
  - Remove now unneeded README.source.
  - Refresh all patches.
* Reorganize source code:
  - Switch from debian/upstream.sh to debian/rules get-orig-source target.
  - Switch from CVS to Subversion to retrieve the source code.
  - Use the same source layout as upstream (no more relocations),
    i.e. lib/, sbin/, sys/sys, sys/ufs.
  - Move libport/ to port/.
  - Merge libdisklabel/ into port/.
* Remove unneeded linking against libtermcap, thus removing the need for
  ncurses.
* Add an empty debian/watch file explaining that there's no packaged
  upstream releases. Suggested by Peter Pentchev.
* Update CVS to Subversion reference to upstream source code in
  debian/copyright.
* Remove unused lib variable from debian/rules.
* Use dpkg-buildflags to set CPPFLAGS, CFLAGS and LDFLAGS.
  Based on a patch by Peter Pentchev.
* Remove bogus reference to BSD license in /usr/share/common-licenses.
* Always set -I../../sys, even on GNU/kFreeBSD systems.

[ Peter Pentchev ]
* Remove duplicate section “utils” from ufsutils binary package.
* Remove XC- prefix from Package-Type.
* Honour CPPFLAGS and LDFLAGS and do not link with CFLAGS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
# Uncomment this to turn on verbose mode.
7
7
#export DH_VERBOSE=1
8
8
 
9
 
this = $(MAKE) -f debian/rules
10
 
lib = libufs2
11
 
 
12
9
DESTDIR = $(CURDIR)/debian/tmp
13
10
 
14
 
CFLAGS = -Wall -g
15
 
 
16
11
DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
17
12
 
 
13
CFLAGS := -Wall $(shell dpkg-buildflags --get CFLAGS)
 
14
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
 
15
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 
16
 
18
17
# GNU/kFreeBSD already have off_t 64bit. It must not be enabled,
19
18
# as it would change size of ino_t
20
19
ifneq (kfreebsd,$(DEB_HOST_ARCH_OS))
21
20
# really only on other systems, as GNU/kFreeBSD already have off_t 64bit
22
21
# on GNU/kFreeBSD it must not be enabled, as it would change size of ino_t
23
 
CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(CURDIR)/freebsd
24
 
endif
25
 
 
26
 
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
27
 
        CFLAGS += -O0
28
 
else
29
 
        CFLAGS += -O2
30
 
endif
31
 
 
32
 
include /usr/share/quilt/quilt.make
33
 
 
34
 
build: patch
 
22
CFLAGS += -D_FILE_OFFSET_BITS=64
 
23
endif
 
24
 
 
25
SOURCE = $(shell dpkg-parsechangelog | sed -e '/^Source:/!d' -e 's/^Source: //g')
 
26
VERSION = $(shell dpkg-parsechangelog | sed -e '/^Version:/!d' -e 's/^Version: //g' -e 's/-.*//g')
 
27
SVN = http://svn.freebsd.org/base/release/$(VERSION).0
 
28
ORIGDIR = $(SOURCE)-$(VERSION)
 
29
TARNAME = $(SOURCE)_$(VERSION).orig.tar.gz
 
30
 
 
31
get-orig-source:
 
32
        rm -rf $(ORIGDIR)
 
33
        mkdir -p $(ORIGDIR)/sys/sys $(ORIGDIR)/sys/geom
 
34
        for i in sbin/badsect sbin/dump sbin/dumpfs sbin/fsck_ffs sbin/fsdb \
 
35
                 sbin/growfs sbin/newfs sbin/tunefs sbin/bsdlabel \
 
36
                 sbin/sunlabel sbin/ffsinfo sbin/mount lib/libufs sys/ufs \
 
37
                 sys/geom/geom_bsd_enc.c \
 
38
                 sys/sys/disklabel.h sys/sys/mount.h sys/sys/param.h \
 
39
                 sys/sys/ucred.h ; \
 
40
        do \
 
41
            svn export $(SVN)/$$i $(ORIGDIR)/$$i ; \
 
42
        done
 
43
        tar --numeric-owner --owner 0 --group 0 -czf ../$(TARNAME) $(ORIGDIR)
 
44
        rm -rf $(ORIGDIR)
 
45
 
 
46
build:
35
47
        dh_testdir
36
 
        
37
 
        CFLAGS="$(CFLAGS)" LDADD="$(LDADD)" $(MAKE)
 
48
 
 
49
        CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE)
38
50
 
39
51
clean:
40
52
        dh_testdir
41
53
        dh_testroot
42
 
        
 
54
 
43
55
        [ ! -f Makefile ] || $(MAKE) clean
44
 
        
45
 
        $(this) unpatch
46
 
        
 
56
 
47
57
        dh_clean
48
58
 
49
59
install: build
51
61
        dh_testroot
52
62
        dh_prep
53
63
        dh_installdirs
54
 
        
 
64
 
55
65
        mkdir -p $(DESTDIR)/lib
56
66
        mkdir -p $(DESTDIR)/sbin
57
67
        mkdir -p $(DESTDIR)/usr/share/man/man8
58
 
        
 
68
 
59
69
        $(MAKE) install DESTDIR=$(DESTDIR) prefix=/usr exec_prefix=/
60
70
 
61
71
# Build architecture-independent files here.
83
93
binary: binary-indep binary-arch
84
94
 
85
95
.PHONY: build clean binary-indep binary-arch binary install
86