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
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
include /usr/share/ocaml/ocamlvars.mk
include /usr/share/dpatch/dpatch.make
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
OCAML_INTERPRETER=
else
OCAML_INTERPRETER=ocaml-base-nox-$(OCAML_ABI)
endif
configure:
build: build-stamp
build-stamp: patch-stamp
dh_testdir
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
$(MAKE) spamoracle
else
$(MAKE) spamoracle.byte
endif
touch build-stamp
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp
$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
$(MAKE) install DESTDIR=$(CURDIR)/debian/spamoracle
else
$(MAKE) install.byte DESTDIR=$(CURDIR)/debian/spamoracle
endif
binary-indep:
binary-arch: build install
dh_testdir -s
dh_testroot -s
dh_installdocs -s
dh_installexamples -s
dh_installmenu -s
dh_installcron -s
dh_installman -s
dh_installinfo -s
dh_installchangelogs -s
dh_link -s
dh_strip -s -X spamoracle.byte
dh_compress -s
dh_fixperms -s
dh_installdeb -s
dh_shlibdeps -s
dh_gencontrol -s -- \
-VF:OCamlABI="$(OCAML_ABI)" \
-VF:OCamlInterpreter="$(OCAML_INTERPRETER)"
dh_md5sums -s
dh_builddeb -s
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|