~ubuntu-branches/ubuntu/precise/expat/precise-security

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Leidert (dale)
  • Date: 2008-06-09 20:48:30 UTC
  • mfrom: (4.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20080609204830-25qbpwdhrov7tuyc
Tags: 2.0.1-4
debian/libexpat1-dev.install: Install the libtool .la files again and drop
them after Lenny (closes: #485460).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
## debian/rules : package script for expat
4
4
## ----------------------------------------------------------------------
5
5
 
6
 
## ----------------------------------------------------------------------
7
6
## uncomment this to turn on verbose mode
8
7
#export DH_VERBOSE=1
9
8
 
10
 
## ----------------------------------------------------------------------
 
9
include /usr/share/dpatch/dpatch.make
 
10
 
11
11
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12
12
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13
 
 
14
 
## ----------------------------------------------------------------------
15
 
CONFFLAGS       =
 
13
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
14
 
 
15
BUILD64 = $(filter $(DEB_HOST_ARCH), i386 powerpc sparc s390)
 
16
 
16
17
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
17
 
    CONFFLAGS   += --build $(DEB_HOST_GNU_TYPE)
 
18
        CONFFLAGS = --build=$(DEB_HOST_GNU_TYPE)
18
19
else
19
 
    CONFFLAGS   += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
20
 
endif
21
 
 
22
 
## ----------------------------------------------------------------------
23
 
INSTALL         = install
24
 
INSTALL_FILE    = $(INSTALL) -p -o root -g root -m  644
25
 
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m  755
26
 
INSTALL_SCRIPT  = $(INSTALL) -p -o root -g root -m  755
27
 
INSTALL_DIR     = $(INSTALL) -p -o root -g root -m  755 -d
28
 
 
29
 
## ----------------------------------------------------------------------
30
 
CFLAGS          = -Wall -g -pthread -D_REENTRANT
31
 
 
32
 
## ----------------------------------------------------------------------
 
20
        CONFFLAGS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
 
21
endif
 
22
 
 
23
ifeq ($(DEB_HOST_ARCH),i386)
 
24
        HOST64FLAG = --host=x86_64-linux-gnu
 
25
endif
 
26
ifeq ($(DEB_HOST_ARCH),powerpc)
 
27
        HOST64FLAG = --host=ppc64-linux-gnu
 
28
endif
 
29
ifeq ($(DEB_HOST_ARCH),sparc)
 
30
        HOST64FLAG = --host=sparc64-linux-gnu
 
31
endif
 
32
ifeq ($(DEB_HOST_ARCH),s390)
 
33
        HOST64FLAG = --host=s390x-linux-gnu
 
34
endif
 
35
 
 
36
CFLAGS  = -Wall -g -pthread -D_REENTRANT
 
37
LDFLAGS = -Wl,-Bsymbolic-functions
33
38
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
34
 
    CFLAGS      += -O0
 
39
        CFLAGS += -O0
35
40
else
36
 
    CFLAGS      += -O2
37
 
endif
38
 
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
39
 
    INSTALL_PROGRAM += -s
40
 
endif
41
 
 
42
 
## ----------------------------------------------------------------------
43
 
UPACKAGE        = $(shell dh_listpackages | grep -- -udeb$$)
44
 
 
45
 
## ----------------------------------------------------------------------
46
 
TMP_DIR         = $(CURDIR)/debian/tmp
47
 
 
48
 
## ----------------------------------------------------------------------
49
 
## targets
50
 
 
51
 
clean:          configure
52
 
                dh_testdir
53
 
                dh_testroot
54
 
                [ ! -f Makefile ] || $(MAKE) distclean
55
 
                dh_clean configure-stamp build-stamp install-stamp
56
 
 
57
 
configure:
58
 
                ./autogen.sh
59
 
 
60
 
configure-stamp:        
61
 
                dh_testdir
62
 
                touch configure.in && touch aclocal.m4 && touch configure
63
 
                CFLAGS="$(CFLAGS)" \
64
 
                ./configure $(CONFFLAGS) --prefix=/usr
65
 
                touch configure-stamp 
66
 
 
67
 
build:          build-stamp
68
 
build-stamp:    configure-stamp
69
 
                dh_testdir
70
 
                $(MAKE)
71
 
                touch build-stamp 
72
 
 
73
 
install:        install-stamp
74
 
install-stamp:  build
75
 
                dh_testdir
76
 
                dh_testroot
77
 
                dh_clean -k
78
 
                dh_installdirs
79
 
                $(MAKE) install prefix=$(TMP_DIR)/usr \
80
 
                        man1dir=$(TMP_DIR)/usr/share/man/man1
81
 
                touch install-stamp
82
 
 
83
 
binary-indep:
84
 
 
85
 
binary-arch:    build install
86
 
                dh_testdir
87
 
                dh_testroot
88
 
                dh_install -a --sourcedir=$(TMP_DIR)
89
 
                dh_installdocs -a
90
 
                dh_installexamples -a
91
 
                dh_installchangelogs -a Changes
92
 
                dh_link -a
93
 
                dh_strip -a
94
 
                dh_compress -a
95
 
                dh_fixperms -a
96
 
                dh_makeshlibs -a -V --add-udeb=$(UPACKAGE)
97
 
                dh_installdeb -a
98
 
                dh_shlibdeps -a -l $(PWD)/debian/libexpat1/usr/lib
99
 
                dh_gencontrol -a
100
 
                dh_md5sums -a
101
 
                dh_builddeb -a
102
 
 
103
 
binary:         binary-indep binary-arch
104
 
 
105
 
.PHONY:         clean build install binary-indep binary-arch binary
106
 
 
107
 
## ----------------------------------------------------------------------
 
41
        CFLAGS += -O2
 
42
endif
 
43
 
 
44
UPACKAGE = $(shell dh_listpackages | grep -- -udeb$$)
 
45
 
 
46
build/config.status: configure
 
47
        dh_testdir
 
48
        (mkdir -p $(@D); cd $(@D); CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
 
49
         ../configure $(CONFFLAGS) --prefix=/usr --mandir=\$${prefix}/share/man)
 
50
 
 
51
buildw/config.status: configure
 
52
        dh_testdir
 
53
        (mkdir -p $(@D); cd $(@D); CFLAGS="$(CFLAGS) -DXML_UNICODE" LDFLAGS="$(LDFLAGS)" \
 
54
         ../configure $(CONFFLAGS) --prefix=/usr --mandir=\$${prefix}/share/man)
 
55
 
 
56
build64/config.status: configure
 
57
        dh_testdir
 
58
        (mkdir -p $(@D); cd $(@D); CFLAGS="-m64 $(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
 
59
         ../configure $(CONFFLAGS) $(HOST64FLAG) --prefix=/usr --mandir=\$${prefix}/share/man \
 
60
         --libdir=\$${prefix}/lib64)
 
61
 
 
62
buildw64/config.status: configure
 
63
        dh_testdir
 
64
        (mkdir -p $(@D); cd $(@D); CFLAGS="-m64 $(CFLAGS) -DXML_UNICODE" LDFLAGS="$(LDFLAGS)" \
 
65
         ../configure $(CONFFLAGS) $(HOST64FLAG) --prefix=/usr --mandir=\$${prefix}/share/man \
 
66
         --libdir=\$${prefix}/lib64)
 
67
 
 
68
clean: unpatch
 
69
        dh_testdir
 
70
        dh_testroot
 
71
        rm -rf build/ build64/ buildw/ buildw64/
 
72
        rm -rf debian/tmp/
 
73
        dh_clean build-stamp patch-stamp debian/xmlwf.1
 
74
 
 
75
build: build-stamp
 
76
build-stamp: patch-stamp build/config.status buildw/config.status $(if $(BUILD64), build64/config.status buildw64/config.status)
 
77
        dh_testdir
 
78
        $(MAKE) -C build/
 
79
        $(MAKE) -C buildw/ buildlib LIBRARY=libexpatw.la
 
80
ifneq ($(BUILD64),)
 
81
        $(MAKE) -C build64/ buildlib
 
82
        $(MAKE) -C buildw64/ buildlib LIBRARY=libexpatw.la
 
83
endif
 
84
        docbook-to-man doc/xmlwf.sgml > debian/xmlwf.1
 
85
        touch $@
 
86
 
 
87
install: build
 
88
        dh_testdir
 
89
        dh_testroot
 
90
        dh_clean -k
 
91
        dh_installdirs
 
92
        $(MAKE) -C build/ install DESTDIR=$(CURDIR)/debian/tmp
 
93
        $(MAKE) -C buildw/ installlib LIBRARY=libexpatw.la DESTDIR=$(CURDIR)/debian/tmp APIHEADER=
 
94
ifneq ($(BUILD64),)
 
95
        $(MAKE) -C build64/ installlib DESTDIR=$(CURDIR)/debian/tmp
 
96
        $(MAKE) -C buildw64/ installlib LIBRARY=libexpatw.la DESTDIR=$(CURDIR)/debian/tmp APIHEADER=
 
97
endif
 
98
 
 
99
binary-indep: build install
 
100
binary-arch: build install
 
101
        dh_testdir
 
102
        dh_testroot
 
103
        dh_install -s --sourcedir=debian/tmp
 
104
        dh_installdocs -s
 
105
        dh_installman -pexpat debian/xmlwf.1
 
106
        dh_installexamples -s
 
107
        dh_installchangelogs -s Changes
 
108
        dh_link -s
 
109
        dh_strip -s
 
110
        dh_compress -s
 
111
        dh_fixperms -s
 
112
        chmod 644 $(CURDIR)/debian/libexpat1-dev/usr/share/doc/libexpat1-dev/examples/* \
 
113
                  $(CURDIR)/debian/libexpat1-dev/usr/share/aclocal/*
 
114
        dh_makeshlibs -s -V --add-udeb=$(UPACKAGE)
 
115
        dh_installdeb -s
 
116
        dh_shlibdeps -s -l $(CURDIR)/debian/libexpat1/usr/lib:$(CURDIR)/debian/lib64expat1/usr/lib64
 
117
        dh_gencontrol -s
 
118
        dh_md5sums -s
 
119
        dh_builddeb -s
 
120
 
 
121
binary: binary-indep binary-arch
 
122
 
 
123
.PHONY: clean build install binary-indep binary-arch binary