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
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
include /usr/share/ocaml/ocamlvars.mk
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build $(DEB_HOST_GNU_TYPE)
else
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
# workaround for #859965
export DEB_CXXFLAGS_MAINT_APPEND = -std=gnu++98
override_dh_auto_clean:
# Update the PO, as suggested in "man 7 po-debconf"
debconf-updatepo
# Add here commands to clean up after the build process.
$(MAKE) clean distclean
$(MAKE) -C debian/xml-man clean
$(MAKE) -C debian/utils clean
-$(RM) config/trying
-$(RM) packages/rpm/Makefile
-$(RM) *.ini *.ini.old
-$(RM) config/confdefs.h
override_dh_auto_configure:
cd config; autoconf
./configure $(confflags) $(shell dpkg-buildflags --export=configure) \
--enable-gui=newgui2 \
--enable-directconnect \
--disable-magic \
--disable-fasttrack
override_dh_auto_build:
$(MAKE) svg_converter.byte utils.$(OCAML_BEST) $(OCAML_BEST)
ifeq ($(OCAML_BEST),byte)
cp mlnet.byte mlnet
cp mlgui.byte mlgui
cp mlguistarter.byte mlguistarter
endif
# Check that the compilation has succeeded
test -x mlnet
test -x mlgui
# Make manpages
$(MAKE) -C debian/xml-man all
# Build utilities
make -C debian/utils TARGET=$(OCAML_BEST)
override_dh_auto_install:
$(RM) $(CURDIR)/debian/mldonkey-server/usr/share/doc/mldonkey-server/distrib/Copying.txt
$(RM) $(CURDIR)/debian/mldonkey-server/usr/share/doc/mldonkey-server/distrib/GeoIP_LICENSE.txt
override_dh_installinit:
dh_installinit -a -pmldonkey-server --error-handler=init_error -- start 98 2 3 4 5 . stop 20 0 1 6 .
override_dh_strip:
ifeq ($(OCAML_BEST),opt)
dh_strip -a
endif
%:
dh $@ --with ocaml
|