2 ## ----------------------------------------------------------------------
3 ## debian/rules : package script for expat
4 ## ----------------------------------------------------------------------
6 ## uncomment this to turn on verbose mode
9 include /usr
/share
/dpatch
/dpatch.make
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 DEB_HOST_ARCH ?
= $(shell dpkg-architecture
-qDEB_HOST_ARCH
)
15 BUILD64
= $(filter $(DEB_HOST_ARCH
), i386 powerpc sparc s390
)
17 ifeq ($(DEB_BUILD_GNU_TYPE
), $(DEB_HOST_GNU_TYPE
))
18 CONFFLAGS
= --build
=$(DEB_HOST_GNU_TYPE
)
20 CONFFLAGS
= --build
=$(DEB_BUILD_GNU_TYPE
) --host
=$(DEB_HOST_GNU_TYPE
)
23 ifeq ($(DEB_HOST_ARCH
),i386
)
24 HOST64FLAG
= --host
=x86_64-linux-gnu
26 ifeq ($(DEB_HOST_ARCH
),powerpc
)
27 HOST64FLAG
= --host
=ppc64-linux-gnu
29 ifeq ($(DEB_HOST_ARCH
),sparc
)
30 HOST64FLAG
= --host
=sparc64-linux-gnu
32 ifeq ($(DEB_HOST_ARCH
),s390
)
33 HOST64FLAG
= --host
=s390x-linux-gnu
36 CFLAGS
= -Wall
-g
-pthread
-D_REENTRANT
37 LDFLAGS
= -Wl
,-Bsymbolic-functions
38 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
44 UPACKAGE
= $(shell dh_listpackages | grep
-- -udeb
$$)
46 build
/config.status
: configure
48 (mkdir
-p
$(@D
); cd
$(@D
); CFLAGS
="$(CFLAGS)" LDFLAGS
="$(LDFLAGS)" \
49 ..
/configure
$(CONFFLAGS
) --prefix=/usr
--mandir=\
$${prefix}/share
/man
)
51 buildw
/config.status
: configure
53 (mkdir
-p
$(@D
); cd
$(@D
); CFLAGS
="$(CFLAGS) -DXML_UNICODE" LDFLAGS
="$(LDFLAGS)" \
54 ..
/configure
$(CONFFLAGS
) --prefix=/usr
--mandir=\
$${prefix}/share
/man
)
56 build64
/config.status
: configure
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
)
62 buildw64
/config.status
: configure
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
)
71 rm -rf build
/ build64
/ buildw
/ buildw64
/
73 dh_clean build-stamp patch-stamp debian
/xmlwf
.1
76 build-stamp
: patch-stamp build
/config.status buildw
/config.status
$(if
$(BUILD64
), build64
/config.status buildw64
/config.status
)
79 $(MAKE
) -C buildw
/ buildlib LIBRARY
=libexpatw.la
81 $(MAKE
) -C build64
/ buildlib
82 $(MAKE
) -C buildw64
/ buildlib LIBRARY
=libexpatw.la
84 docbook-to-man doc
/xmlwf.sgml
> debian
/xmlwf
.1
92 $(MAKE
) -C build
/ install DESTDIR
=$(CURDIR
)/debian
/tmp
93 $(MAKE
) -C buildw
/ installlib LIBRARY
=libexpatw.la DESTDIR
=$(CURDIR
)/debian
/tmp APIHEADER
=
95 $(MAKE
) -C build64
/ installlib DESTDIR
=$(CURDIR
)/debian
/tmp
96 $(MAKE
) -C buildw64
/ installlib LIBRARY
=libexpatw.la DESTDIR
=$(CURDIR
)/debian
/tmp APIHEADER
=
99 binary-indep
: build
install
100 binary-arch
: build
install
103 dh_install
-s
--sourcedir
=debian
/tmp
105 dh_installman
-pexpat debian
/xmlwf
.1
106 dh_installexamples
-s
107 dh_installchangelogs
-s Changes
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
)
116 dh_shlibdeps
-s
-l
$(CURDIR
)/debian
/libexpat1
/usr
/lib
:$(CURDIR
)/debian
/lib64expat1
/usr
/lib64
121 binary
: binary-indep binary-arch
123 .PHONY
: clean build
install binary-indep binary-arch binary