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
|
#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
include /usr/share/ocaml/ocamlvars.mk
include /usr/share/coq/coqvars.mk
WHYDIR = $(CURDIR)/debian/why
FRAMADIR = $(WHYDIR)/$(shell frama-c -print-plugin-path)
FRAMAVER = $(shell dpkg-query -W -f='$${Version}' frama-c-base)
VERSION = $(shell cat Version | grep ^VERSION | cut -d= -f 2)
export OCAMLINIT_SED += -e 's/@VERSION@/$(VERSION)/g'
override_dh_auto_configure:
autoconf
./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--libdir=/usr/share \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--enable-apron=yes \
LDFLAGS="-Wl,-z,defs"
override_dh_auto_clean:
[ ! -f Makefile ] || sed -e 's/include .depend.*//g' Makefile > Makefile.debian
[ ! -f Makefile.debian ] || $(MAKE) -f Makefile.debian clean
$(RM) -f lib/coq/*.glob
override_dh_auto_install:
mkdir -p $(FRAMADIR)
$(MAKE) prefix=$(WHYDIR)/usr install \
LIBDIR=$(WHYDIR)/usr/share \
PLUGIN_INSTALL_DIR=$(WHYDIR)/usr/lib/frama-c/plugins \
COQLIB=$(CURDIR)/debian/libwhy-coq/$(COQ_STDLIB_DIR)
#Used to remove /usr/share/coq/jessie_why.v which is alone and installed by libwhy-coq
-$(RM) -rf $(WHYDIR)/usr/share/coq/
#There is no program using the Jessie library.
-$(RM) -rf $(WHYDIR)/usr/share/jessie/
#Jessie.cma is installed, no need for this extra file
-$(RM) -f $(FRAMADIR)/Jessie.cmo
echo 'F:CoqABI=$(COQ_ABI)' >> debian/libwhy-coq.substvars
echo 'F:FramaCVersion=$(FRAMAVER)' >> debian/why.substvars
override_dh_compress:
dh_compress -X.v -X.sx -X.why
%:
dh --with ocaml $@
# dh_installchangelogs CHANGES
|