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
|
#!/usr/bin/make -f
CXXFLAGS += -DTIXML_USE_STL
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
OBJ_FILES := tinyxml.o tinyxmlparser.o tinyxmlerror.o
%:
dh --with quilt $@
override_dh_auto_build:
dh_auto_build -- CXXFLAGS="$(CXXFLAGS)"
ar rc libtinyxml.a $(OBJ_FILES)
rm *.o xmltest
dh_auto_build -- CXXFLAGS="$(CXXFLAGS) -fPIC"
g++ -shared -Wl,-soname,libtinyxml.so.$(DEB_UPSTREAM_VERSION) \
-o libtinyxml.so.$(DEB_UPSTREAM_VERSION) $(LDFLAGS) \
$(OBJ_FILES)
override_dh_auto_test:
mkdir xmltestdir
cp -a utf8test*.xml xmltestdir
cd xmltestdir && ../xmltest
rm -rf xmltestdir
override_dh_auto_clean:
dh_auto_clean
rm -f libtinyxml.so* libtinyxml.a
rm -rf xmltestdir
override_dh_strip:
dh_strip --dbg-package=libtinyxml$(DEB_UPSTREAM_VERSION)-dbg
override_dh_link:
dh_link -plibtinyxml-dev usr/lib/libtinyxml.so.$(DEB_UPSTREAM_VERSION) \
usr/lib/libtinyxml.so
dh_link --remaining-packages
override_dh_makeshlibs:
dh_makeshlibs -plibtinyxml2.5.3 -V 'libtinyxml2.5.3 (>= 2.5.3-3)'
dh_makeshlibs --remaining-packages
|