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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
#!/usr/bin/make -f
export DH_VERBOSE=1
export MONO_DISABLE_SHM=1
DEB_VERSION = $(shell dpkg-parsechangelog | grep ^Vers | cut -d\ -f2)
VERSION = $(shell echo $(DEB_VERSION) | sed 's,-.*,,' | sed 's,+dfsg.*,,')
DEB_CLI_ABI_VERSION = 1.0
DEB_CLI_API_VERSION = 1.0.5
LIBS = bin_generics/SemWeb.dll \
bin_generics/SemWeb.PostgreSQLStore.dll \
bin_generics/SemWeb.MySQLStore.dll \
bin_generics/SemWeb.SqliteStore.dll \
bin_generics/SemWeb.SQLServerStore.dll
include /usr/share/dpatch/dpatch.make
build: patch-stamp
dh $@ --before build
# unpack signing key
cd debian && uudecode < semweb.snk.uu
# compile
$(MAKE) PROFILE=DOTNET2 $(LIBS)
# sign libs
for LIB in $(LIBS); do \
sn -R $$LIB debian/semweb.snk; \
done
dh $@ --after build
# build API docs
#for LIB in $(LIBS); do \
# monodocer \
# --assembly:$$LIB \
# --path:$(CURDIR)/bin_generics/monodocer; \
#done
monodocer \
--assembly:bin_generics/SemWeb.dll \
--path:$(CURDIR)/bin_generics/monodocer; \
mdassembler \
--out $(CURDIR)/bin_generics/SemWeb \
--ecma $(CURDIR)/bin_generics/monodocer
install: build
dh $@ --before dh_install
# pkg-config
mkdir -p $(CURDIR)/debian/tmp/usr/lib/pkgconfig
cp debian/semweb.pc $(CURDIR)/debian/tmp/usr/lib/pkgconfig/
mv $(CURDIR)/debian/tmp/usr/lib/pkgconfig/semweb.pc \
$(CURDIR)/debian/tmp/usr/lib/pkgconfig/semweb-$(DEB_CLI_ABI_VERSION).pc
perl -pe 's/#VERSION#/$(VERSION)/' -i \
$(CURDIR)/debian/tmp/usr/lib/pkgconfig/semweb-$(DEB_CLI_ABI_VERSION).pc
perl -pe 's/#DEB_CLI_ABI_VERSION#/$(DEB_CLI_ABI_VERSION)/' -i \
$(CURDIR)/debian/tmp/usr/lib/pkgconfig/semweb-$(DEB_CLI_ABI_VERSION).pc
dh $@ --remaining
dh $@ --until dh_install
dh_installcligac -i
dh $@ --after dh_install
dh $@ --until dh_fixperms
dh_clifixperms -i
dh $@ --after dh_fixperms
binary: binary-indep
binary-indep: install
dh_clistrip -i
dh_makeclilibs -i -m $(DEB_CLI_API_VERSION)
dh_shlibdeps -i
dh_clideps -i
dh $@
clean: unpatch
# clean up our signing key
rm -f debian/semweb.snk
# clean up our API docs
rm -f bin_generics/SemWeb.tree \
bin_generics/SemWeb.zip
rm -rf bin_generics/monodocer
# workaround for broken "make clean"
for FILE in $(LIBS) \
bin_generics/SemWeb.Sparql.dll \
bin_generics/rdfstorage.exe \
bin_generics/rdfquery.exe \
bin_generics/euler.exe; do \
touch $$FILE; \
done
dh $@
%:
dh $@
|