rules 1.05 KB
Newer Older
Jo Shields's avatar
Jo Shields committed
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
#!/usr/bin/make -f
#export DH_VERBOSE=1

DEB_API_VERSION = 0.5
DEB_ABI_VERSION = 1.0
DEB_CLI_DIR = debian/tmp/usr/lib/cli/dbus-sharp-glib-$(DEB_ABI_VERSION)/
DEB_DOC_DIR = $(CURDIR)/doc
DEB_LIB_FILES = $(CURDIR)/src/dbus-sharp-glib.dll
DEB_LIBCONF_FILES = $(CURDIR)/src/dbus-sharp-glib.dll.config
DEB_CLEAN_FILES = $(CURDIR)/src/dbus-sharp-glib.zip $(CURDIR)/src/dbus-sharp-glib.tree $(DEB_DOC_DIR)

override_dh_auto_configure:
	dh_auto_configure -- GMCS=/usr/bin/mono-csc

override_dh_auto_build:
	dh_auto_build
	mkdir -p $(DEB_DOC_DIR);
	for LIB in $(DEB_LIB_FILES); do \
		mdoc update \
			-fno-assembly-versions \
			--out=$(DEB_DOC_DIR) \
			$$LIB; \
		mdoc assemble \
			--format ecma \
			--out $${LIB%.dll} \
			$(DEB_DOC_DIR); \
	done

override_dh_auto_install:
	dh_auto_install
	mkdir -p $(DEB_CLI_DIR)
	for FILE in $(DEB_LIB_FILES) $(DEB_LIBCONF_FILES); do \
		install $$FILE $(CURDIR)/$(DEB_CLI_DIR); \
	done

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(DEB_CLEAN_FILES)

override_dh_makeclilibs:
	dh_makeclilibs -m$(DEB_API_VERSION)

%:
	dh $@ --with cli