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
|
#!/usr/bin/make -f
DEB_TAR_SRCDIR := polygen-1.0.6/src
POLYGEN_BASE=build-tree/polygen-1.0.6
POLYGEN=$(POLYGEN_BASE)/src/polygen
include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
# Set env var for unzip to silently overwrite files
UNZIP=-n
export UNZIP
# set $(NATIVE) to true if this arch has an optimising compiler
#NATIVE := $(shell test -x /usr/bin/ocamlopt.opt && echo true || echo false)
# Forcing native to false to have a Architecture: all package, since polygen
# doesn't have special optimization requirements
NATIVE := false
# No toplevel makefile: we'll add a -C to the make invocation
#DEB_MAKE_BUILD_TARGET+="-Csrc"
# If we have the optimising compiler, build natively with debugging because
# we can strip it later. if we don't, disable debugging because stripping
# the non-native binaries removes the bytecode and leaves you with the
# interpreter, and a somewhat useless binary... =)
DEB_MAKE_BUILD_TARGET+="NATIVE=$(NATIVE)"
DEB_STRIP_EXCLUDE+=polygen
#ifeq ($(NATIVE), true)
#DEB_MAKE_BUILD_TARGET+="MLC=ocamlopt"
#else
#DEB_MAKE_BUILD_TARGET+="MLC=ocamlc"
#DEB_MAKE_BUILD_TARGET+="MLCOPTS=-unsafe"
#DEB_MAKE_BUILD_TARGET+="MLLDOPTS=unix.cma"
#DEB_STRIP_EXCLUDE+=polygen
#endif
# Hook in the build system the creation of the manpage
build/polygen::
$(POLYGEN) debian/man.grm > polygen.1
chmod 0755 debian/make_polygen-data_manpage
find $(POLYGEN_BASE)/grm/ -name \*.grm | debian/make_polygen-data_manpage > polygen-data.6
install/polygen::
install -o root -g root -m 755 $(POLYGEN) debian/$(cdbs_curpkg)/usr/bin/
install -o root -g root -m 755 -d debian/$(cdbs_curpkg)/usr/share/doc/polygen
install -o root -g root -m 644 $(POLYGEN_BASE)/eng/HOWTO-Refman.html debian/$(cdbs_curpkg)/usr/share/doc/polygen/HOWTO-Refman.en.html
install -o root -g root -m 644 $(POLYGEN_BASE)/ita/HOWTO-Refman.html debian/$(cdbs_curpkg)/usr/share/doc/polygen/HOWTO-Refman.it.html
install -o root -g root -m 644 $(POLYGEN_BASE)/README debian/$(cdbs_curpkg)/usr/share/doc/polygen/README
install -o root -g root -m 644 $(POLYGEN_BASE)/Credits debian/$(cdbs_curpkg)/usr/share/doc/polygen/Credits
install/polygen-data::
# grammar data files
for lang in eng ita fra ;\
do \
install -o root -g root -m 755 -d debian/$(cdbs_curpkg)/usr/share/polygen/$$lang/ ;\
find $(POLYGEN_BASE)/grm/$$lang/ -iname '*.grm' -exec \
install -o root -g root -m 644 '{}' debian/$(cdbs_curpkg)/usr/share/polygen/$$lang/ \; ; \
done
clean::
rm -f debian/man.grm.o polygen.1 polygen-data.6
|