~ubuntu-branches/ubuntu/utopic/expat/utopic

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-20 22:37:22 UTC
  • mfrom: (1.1.4) (5.1.7 precise)
  • Revision ID: package-import@ubuntu.com-20120320223722-wq8sq4gykhlvc8j9
Tags: 2.1.0~beta3-1
* QA upload.
* Beta release 2.1.0 beta3. Closes: #663579.
  - CVE-2012-1147 - Resource leak in readfilemap.c.
  - CVE-2012-1148 - Memory leak in poolGrow.
  - CVE-2012-0876 - Hash DOS attack.
  - Remove patches applied upstream.
* Remove Daniel from uploaders (orphaned package).
* Update package format to 3.0.
* Enable hardened build. Closes: #653526.
* Add a symbols file.
* Install expat pkgconfig file.

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
 
include /usr/share/dpatch/dpatch.make
10
 
 
11
9
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12
10
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13
11
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
35
33
endif
36
34
 
37
35
# -pthread -D_REENTRANT #551079
38
 
CFLAGS  = -Wall -g
 
36
CFLAGS  = `dpkg-buildflags --get CFLAGS`
 
37
CFLAGS  += -Wall
 
38
 
39
39
LDFLAGS = -Wl,-Bsymbolic-functions
40
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
41
 
        CFLAGS += -O0
42
 
else
43
 
        CFLAGS += -O2
44
 
endif
 
40
LDFLAGS += `dpkg-buildflags --get LDFLAGS`
 
41
 
 
42
CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
45
43
 
46
44
UPACKAGE = $(shell dh_listpackages | grep -- -udeb$$)
47
45
 
48
46
build/config.status: configure
49
47
        dh_testdir
50
 
        (mkdir -p $(@D); cd $(@D); CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
 
48
        (mkdir -p $(@D); cd $(@D); CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
51
49
         ../configure $(CONFFLAGS) --prefix=/usr --mandir=\$${prefix}/share/man --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH))
52
50
 
53
51
buildw/config.status: configure
54
52
        dh_testdir
55
 
        (mkdir -p $(@D); cd $(@D); CFLAGS="$(CFLAGS) -DXML_UNICODE" LDFLAGS="$(LDFLAGS)" \
 
53
        (mkdir -p $(@D); cd $(@D); CFLAGS="$(CFLAGS) -DXML_UNICODE" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
56
54
         ../configure $(CONFFLAGS) --prefix=/usr --mandir=\$${prefix}/share/man --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH))
57
55
 
58
56
build64/config.status: configure
59
57
        dh_testdir
60
 
        (mkdir -p $(@D); cd $(@D); CFLAGS="-m64 $(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
 
58
        (mkdir -p $(@D); cd $(@D); CFLAGS="-m64 $(CFLAGS)" CPPFLAGS="$(CPPFLAGS)"  LDFLAGS="$(LDFLAGS)" \
61
59
         ../configure $(CONFFLAGS) $(HOST64FLAG) --prefix=/usr --mandir=\$${prefix}/share/man \
62
60
         --libdir=\$${prefix}/lib64)
63
61
 
64
62
buildw64/config.status: configure
65
63
        dh_testdir
66
 
        (mkdir -p $(@D); cd $(@D); CFLAGS="-m64 $(CFLAGS) -DXML_UNICODE" LDFLAGS="$(LDFLAGS)" \
 
64
        (mkdir -p $(@D); cd $(@D); CFLAGS="-m64 $(CFLAGS) -DXML_UNICODE" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
67
65
         ../configure $(CONFFLAGS) $(HOST64FLAG) --prefix=/usr --mandir=\$${prefix}/share/man \
68
66
         --libdir=\$${prefix}/lib64)
69
67
 
70
 
clean: unpatch
 
68
clean:
71
69
        dh_testdir
72
70
        dh_testroot
73
71
        rm -rf build/ build64/ buildw/ buildw64/
74
72
        rm -rf debian/tmp/
75
 
        dh_clean build-stamp patch-stamp debian/xmlwf.1
 
73
        dh_clean build-stamp debian/xmlwf.1
76
74
 
77
75
build: build-stamp
78
 
build-stamp: patch-stamp build/config.status buildw/config.status $(if $(BUILD64), build64/config.status buildw64/config.status)
 
76
build-arch: build-stamp
 
77
build-indep: build-stamp
 
78
build-stamp: build/config.status buildw/config.status $(if $(BUILD64), build64/config.status buildw64/config.status)
79
79
        dh_testdir
80
80
        $(MAKE) -C build/
81
81
        $(MAKE) -C buildw/ buildlib LIBRARY=libexpatw.la