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
|
#!/usr/bin/make -f
# -*- makefile -*-
include /usr/share/ocaml/ocamlvars.mk
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
PKGNAME = libocamlnet-ocaml-dev
DESTDIR = $(CURDIR)/debian/tmp
export OCAMLFIND_DESTDIR = $(DESTDIR)$(OCAML_STDLIB_DIR)
BUILD_TARGET = all
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
BUILD_TARGET += opt
endif
CFGFLAGS =
CFGFLAGS += -enable-gtk2
CFGFLAGS += -with-nethttpd -prefer-netcgi2
CFGFLAGS += -bindir /usr/bin -datadir /usr/share/ocamlnet
CFGFLAGS += -enable-apache -apache /usr/sbin/apache2 -apxs /usr/bin/apxs2
CFGFLAGS += -enable-pcre -enable-zip
CFGFLAGS += -enable-gnutls
%:
dh $@ --with ocaml,apache2
.PHONY: override_dh_auto_configure
override_dh_auto_configure: Makefile.conf
Makefile.conf:
./configure $(CFGFLAGS)
ifeq ($(DEB_HOST_ARCH_OS),linux)
# In some build environments (especially cowbuilder and Ubuntu
# autobuilders), many netsys autotests fail even though the feature is
# available (LP: #257524)
@echo
@echo "The following netsys features will be forced:"
@if grep '#undef ' src/netsys/config.h; then \
sed -i 's/#undef /#define /' src/netsys/config.h; \
else \
echo "none"; \
fi
@echo
endif
.PHONY: override_dh_auto_build
override_dh_auto_build:
$(MAKE) $(BUILD_TARGET)
.PHONY: override_dh_auto_install
override_dh_auto_install:
$(MAKE) install DESTDIR=$(DESTDIR)
.PHONY: override_dh_auto_clean
override_dh_auto_clean: Makefile.conf
$(MAKE) distclean
.PHONY: override_dh_install
override_dh_install:
dh_install --fail-missing -X.so.owner -Xmod_netcgi_apache.so
.PHONY: override_dh_compress
override_dh_compress:
dh_compress -X.ml
.PHONY: override_dh_installchangelogs
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
|