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
# We want to use dpatch.
include /usr/share/dpatch/dpatch.make
PACKAGE = mlpcap
export OCAML_LIBDIR=`ocamlc -where`
configure: configure-stamp
configure-stamp: patch-stamp
dh_testdir
CFLAGS=-fPIC ./configure --enable-examples --with-camlidl-lib=$(OCAML_LIBDIR)
touch configure-stamp
build: configure-stamp build-stamp
build-stamp:
dh_testdir
$(MAKE)
if [ -x /usr/bin/ocamlopt ] || [ -x /usr/bin/ocamlopt.opt ]; then\
$(MAKE) opt;\
fi
touch build-stamp
clean: unpatch
dh_testdir
dh_testroot
-$(RM) build-stamp configure-stamp
-$(MAKE) clean
-$(RM) Makefile
-$(RM) tests/Makefile
-$(RM) config.log
-$(RM) config.status
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install \
DESTDIR="-ldconf ignore -destdir $(CURDIR)/debian/libmlpcap-ocaml-dev/$(OCAML_LIBDIR)/"
mv $(CURDIR)/debian/libmlpcap-ocaml-dev/$(OCAML_LIBDIR)/pcap/*.so \
$(CURDIR)/debian/libmlpcap-ocaml/$(OCAML_LIBDIR)/stublibs/
binary-indep: build install
binary-arch: build install
dh_testdir -s
dh_testroot -s
dh_installdocs -s
dh_installexamples -s
dh_installchangelogs -s
dh_strip -s
dh_link -s
dh_compress -s
dh_fixperms -s
dh_installdeb -s
dh_shlibdeps -s
dh_gencontrol -s
dh_md5sums -s
dh_builddeb -s
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|