~ubuntu-branches/ubuntu/lucid/expat/lucid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Ardo van Rangelrooij
  • Date: 2005-04-19 21:50:50 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050419215050-702ovrw753hzsc1r
Tags: 1.95.8-3
* Makefile.in: added $(srcdir)/expat_config.h to APIHEADER
  (closes: Bug#302191)
* rebuild against latest libtool for kfreebsd-gnu
  (closes: Bug#295825)

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#export DH_VERBOSE=1
9
9
 
10
10
## ----------------------------------------------------------------------
11
 
## use version 3
12
 
export DH_COMPAT=3
13
 
 
14
 
## ----------------------------------------------------------------------
15
 
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
 
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
11
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
12
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
13
 
 
14
## ----------------------------------------------------------------------
 
15
CONFFLAGS       =
 
16
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 
17
    CONFFLAGS   += --build $(DEB_HOST_GNU_TYPE)
 
18
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
## ----------------------------------------------------------------------
 
33
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
34
    CFLAGS      += -O0
 
35
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
VERSION         = $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
 
45
ARCH            = $(shell dpkg --print-architecture)
 
46
UFILENAME       = $(UPACKAGE)_$(VERSION)_$(ARCH).udeb
 
47
 
 
48
## ----------------------------------------------------------------------
 
49
TMP_DIR         = $(CURDIR)/debian/tmp
17
50
 
18
51
## ----------------------------------------------------------------------
19
52
## targets
20
53
 
21
 
clean:          configure autotools
 
54
clean:          configure
22
55
                dh_testdir
23
56
                dh_testroot
24
 
                -$(MAKE) distclean
25
 
                rm -rf expat.html
26
 
                dh_clean
27
 
                rm -f configure-stamp build-stamp
 
57
                [ ! -f Makefile ] || $(MAKE) distclean
 
58
                dh_clean configure-stamp build-stamp install-stamp
28
59
 
29
60
configure:
30
61
                ./autogen.sh
31
62
 
32
 
autotools:
33
 
                -test -r /usr/share/misc/config.sub && \
34
 
                cp -f /usr/share/misc/config.sub conftools/config.sub
35
 
                -test -r /usr/share/misc/config.guess && \
36
 
                cp -f /usr/share/misc/config.guess conftools/config.guess
37
 
 
38
63
configure-stamp:        
39
64
                dh_testdir
40
 
                touch configure.in && sleep 2s && \
41
 
                touch aclocal.m4 && sleep 2s && \
42
 
                touch configure
43
 
                ./configure \
44
 
                        --build=$(DEB_BUILD_GNU_TYPE) \
45
 
                        --host=$(DEB_HOST_GNU_TYPE) \
46
 
                        --prefix=/usr
 
65
                touch configure.in && touch aclocal.m4 && touch configure
 
66
                CFLAGS="$(CFLAGS)" \
 
67
                ./configure $(CONFFLAGS) --prefix=/usr
47
68
                touch configure-stamp 
48
69
 
49
 
build:          configure-stamp build-stamp
50
 
build-stamp:    
 
70
build:          build-stamp
 
71
build-stamp:    configure-stamp
51
72
                dh_testdir
52
73
                $(MAKE)
53
74
                touch build-stamp 
54
75
 
 
76
install:        install-stamp
 
77
install-stamp:  build
 
78
                dh_testdir
 
79
                dh_testroot
 
80
                dh_clean -k
 
81
                dh_installdirs
 
82
                $(MAKE) install prefix=$(TMP_DIR)/usr \
 
83
                        man1dir=$(TMP_DIR)/usr/share/man/man1
 
84
                touch install-stamp
 
85
 
55
86
binary-indep:
56
87
 
57
 
binary-arch:    build
 
88
binary-arch:    build install
58
89
                dh_testdir
59
90
                dh_testroot
60
 
                dh_clean
61
 
                dh_installdirs -a
62
 
                $(MAKE) prefix=`pwd`/debian/tmp/usr install
63
 
                dh_movefiles -a
64
 
                cp -a doc expat.html
65
 
                cd expat.html && mv reference.html index.html
66
 
                dh_installdocs -a
67
 
                dh_installchangelogs -a Changes
68
 
                dh_installexamples -a
 
91
                dh_install -a --sourcedir=$(TMP_DIR)
 
92
                dh_installdocs -a -N$(UPACKAGE)
 
93
                dh_installexamples -a -N$(UPACKAGE)
 
94
                dh_installchangelogs -a Changes -N$(UPACKAGE)
69
95
                dh_link -a
70
96
                dh_strip -a
71
97
                dh_compress -a
72
98
                dh_fixperms -a
73
 
                dh_makeshlibs -a -V
 
99
                dh_makeshlibs -a -V -N$(UPACKAGE)
74
100
                dh_installdeb -a
75
 
                dh_shlibdeps -a -l `pwd`/debian/libexpat1/usr/lib
76
 
                dh_gencontrol -a
77
 
                dh_md5sums -a
78
 
                dh_builddeb -a
 
101
                dh_shlibdeps -a -l $(PWD)/debian/libexpat1/usr/lib
 
102
                dh_gencontrol -a -N$(UPACKAGE)
 
103
                dh_gencontrol -p$(UPACKAGE) -- -fdebian/files~
 
104
                dpkg-distaddfile $(UFILENAME) debian-installer extra
 
105
                dh_md5sums -a -N$(UPACKAGE)
 
106
                dh_builddeb -a -N$(UPACKAGE)
 
107
                dh_builddeb -p$(UPACKAGE) --filename=$(UFILENAME)
79
108
 
80
109
binary:         binary-indep binary-arch
81
110
 
82
 
.PHONY:         clean autotools build binary-indep binary-arch binary
 
111
.PHONY:         clean build install binary-indep binary-arch binary
83
112
 
84
113
## ----------------------------------------------------------------------