1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
#!/usr/bin/make -f
libpkgver = 110
shlibminor = 110.0
shlibmajor = 110
deb-shlibs-version = 1.10-3.3
pkglib = libxalan$(libpkgver)
pkglib-dev = libxalan$(libpkgver)-dev
pkglib-doc = libxalan$(libpkgver)-doc
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(filter noopt,$(DEB_BUILD_OPTIONS)),)
debugflags = -DNDEBUG
endif
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags = --build $(DEB_HOST_GNU_TYPE)
else
confflags = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
confflags += CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(debugflags)"
confflags += CXXFLAGS="$(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(debugflags)"
confflags += LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)"
X=c
# build, build-arch, build-indep
# ==============================
configure: configure-stamp
configure-stamp:
dh_testdir
cp -f /usr/share/misc/config.sub c/config.sub
cp -f /usr/share/misc/config.guess c/config.guess
cd $(X) && ./configure \
$(confflags) \
--prefix=/usr \
LIBS=" -lpthread" \
BITSTOBUILD=32 \
XALAN_LOCALE_SYSTEM="inmem" \
XALAN_LOCALE="en_US"
touch configure-stamp
build-stamp: configure-stamp
dh_testdir
XALANCROOT=$(CURDIR)/$(X) $(MAKE) -C $(X)
rm -f $(X)/bin/xalan
mv $(X)/bin/testXSLT $(X)/bin/xalan
touch $(@)
docs-stamp:
dh_testdir
ifneq ($(wildcard /usr/bin/doxygen),)
mkdir -p $(X)/build/docs/html/apiDocs
( cd $(X)/xdocs && doxygen DoxyfileXalan )
touch $(@)
endif
build-arch: build-stamp
build-indep: docs-stamp
build: build-arch build-indep
# clean
# =====
clean:
dh_testdir
dh_testroot
rm -f $(X)/config.cache \
$(X)/config.log $(X)/config.status\
$(X)/src/xalanc/Include/xalan-config.h \
$(X)/src/xalanc/Makefile $(X)/Makefile \
$(X)/Tests/Makefile $(X)/samples/Makefile \
$(X)/src/xalanc/Utils/Makefile \
$(X)/src/xalanc/Utils/MsgCreator/Makefile \
$(X)/src/xalanc/Utils/XalanMsgLib/Makefile \
$(X)/Makefile.incl $(X)/samples/mod_xslt.o
rm -f $(X)/src/xalanc/mod_xslt.o $(X)/lib/mod_xslt.so
rm -rf $(X)/autom4te.cache
rm -rf $(X)/obj
rm -rf $(X)/nls
rm -rf $(X)/bin
rm -rf $(X)/build
rm -rf $(X)/lib
dh_clean
# binary, binary-arch, binary-indep
# =================================
install-arch: build-arch
dh_testdir
dh_testroot
dh_prep
dh_installdirs -p$(pkglib) -p$(pkglib-dev) usr/lib/$(DEB_HOST_MULTIARCH)/
dh_installdirs -p$(pkglib-dev) usr/include
dh_installdirs -pxalan usr/bin
dh_install -p$(pkglib) $(X)/lib/libxalan-c.so.$(shlibmajor) $(X)/lib/libxalan-c.so.$(shlibminor) usr/lib/$(DEB_HOST_MULTIARCH)
dh_install -p$(pkglib) $(X)/lib/libxalanMsg.so.$(shlibmajor) $(X)/lib/libxalanMsg.so.$(shlibminor) usr/lib/$(DEB_HOST_MULTIARCH)
dh_install -p$(pkglib-dev) $(X)/lib/libxalan-c.so usr/lib/$(DEB_HOST_MULTIARCH)
dh_install -p$(pkglib-dev) $(X)/lib/libxalanMsg.so usr/lib/$(DEB_HOST_MULTIARCH)
(cd $(X)/src ; tar cf - $$(find . -regex '.*\.\(h\|hpp\)' ) ) | ( cd debian/$(pkglib-dev)/usr/include ; tar xf - )
cp $(X)/nls/include/LocalMsg*.hpp debian/$(pkglib-dev)/usr/include/xalanc/PlatformSupport
dh_install -pxalan $(X)/bin/xalan usr/bin
binary-indep: build-indep
dh_testdir
dh_testroot
dh_installdocs -p$(pkglib-doc) $(X)/build/docs/apiDocs
dh_installdocs -p$(pkglib-doc) -n -XCVS $(X)/xdocs/html/apiDocs
cp debian/apiDocs.README debian/$(pkglib-doc)/usr/share/doc/$(pkglib-doc)/README
dh_installexamples -p$(pkglib-doc) -XCVS -Xmod_xslt.o $(X)/samples/*
dh_installchangelogs -p$(pkglib-doc)
dh_compress -p$(pkglib-doc) -Xhtml
dh_fixperms -p$(pkglib-doc)
chmod 644 debian/$(pkglib-doc)/usr/share/doc/$(pkglib-doc)/examples/configure.in
dh_installdeb -p$(pkglib-doc)
dh_gencontrol -p$(pkglib-doc)
dh_md5sums -p$(pkglib-doc)
dh_builddeb -p$(pkglib-doc)
binary-arch: build-arch install-arch
dh_testdir
dh_testroot
dh_installdocs -a
dh_installman -pxalan debian/xalan.1
dh_installinfo -a
dh_installchangelogs -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_makeshlibs -a -V '$(pkglib) (>= $(deb-shlibs-version))'
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure
|