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
|
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
# make sure we'll run patched distclean: target *before* unpatching
# because upstream distclean: removes files we want to keep
clean:: distclean-first
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/class/autotools.mk
base = libcairo-java
jar = cairo1.0.jar
jni = libcairo-jni
cni = libcairo-cni
dev = $(base)-dev
-include /usr/share/gcj/debian_defaults
DEB_HOST_ARCH ?= $(shell dpkg-architecture qDEB_HOST_ARCH)
ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj_native_archs)))
with_native := yes
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj_archs)))
with_gcj := yes
endif
JAVA_HOME := /usr/lib/jvm/default-java
DEB_CONFIGURE_EXTRA_FLAGS = --without-javadocs --enable-pdf
DEB_CONFIGURE_SCRIPT_ENV += CFLAGS="-I/usr/lib/jvm/default-java/include"
# we distclean: before unpatching so we don't need cleaning after
DEB_MAKE_CLEAN_TARGET =
DEB_MAKE_INSTALL_TARGET := install DESTDIR=$(CURDIR)/debian/tmp/ \
docdir='$$(datadir)/doc/$(base)' \
apidir='$$(datadir)/doc/$(base)-doc/api'
DEB_DH_MAKESHLIBS_ARGS_$(jni) = -n -V "$(jni) (>= 1.0.8-6)"
DEB_DH_MAKESHLIBS_ARGS_$(cni) = -V "$(cni) (>= 1.0.8-6)"
DEB_DH_SHLIBDEPS_ARGS_$(jni) = -l/usr/lib/jni
DEB_COMPRESS_EXCLUDE = .java
common-post-build-indep::
$(MAKE) doc-stamp \
JAVADOC=gjdoc \
JAVADOC_OPTIONS='' \
JAVADOC_FOOTER=''
binary-post-install/$(dev)::
sed -i -e 's/-[0-9.]*\.jar$$/.jar/' \
debian/$(dev)/usr/lib/pkgconfig/cairo-java.pc
ifeq ($(with_gcj),yes)
ln -s `readlink debian/tmp/usr/lib/libcairojava.so` \
debian/$(dev)/usr/lib/libcairojava.so
endif
ifeq ($(with_gcj),yes)
binary-post-install/$(cni)::
mkdir -p debian/$(cni)/usr/share/lintian/overrides
cp debian/$(cni).lintian debian/$(cni)/usr/share/lintian/overrides/$(cni)
endif
binary-post-install/$(base)-gcj:: binary-post-install/$(base)
rm -rf debian/$(base)-gcj/usr/share/doc/$(base)-gcj
ln -s $(base) \
debian/$(base)-gcj/usr/share/doc/$(base)-gcj
ifeq ($(with_native),yes)
dh_nativejava -p$(base)-gcj
endif
binary-post-install/$(base)-doc::
cd debian/$(base)-doc/usr/share/doc/$(base)-doc \
&& rm -f changelog
clean::
rm -rf doc
find -name *.Plo | xargs -r rm -f
DEB_PHONY_RULES += distclean-first
distclean-first:
-test -f debian/stamp-patched && $(DEB_MAKE_INVOKE) -k distclean
|