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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode:
#export DH_VERBOSE=1
srcdir := $(CURDIR)/mozart-stdlib
builddir := $(CURDIR)/BUILD
installdir := $(CURDIR)/debian/mozart-stdlib
ozhome := /usr/share/mozart
configure: configure-stamp
configure-stamp: $(srcdir)/configure
dh_testdir
mkdir $(builddir) || true
cd $(builddir) && $(srcdir)/configure \
--prefix=$(ozhome)
echo > $@
build: build-stamp
build-stamp: configure-stamp
dh_testdir
$(MAKE) -C $(builddir)
echo > $@
clean:
dh_testdir
dh_testroot
rm -rf $(builddir)
dh_clean -X.ozf.orig
install: build-stamp
dh_testdir
dh_testroot
dh_installdirs
$(MAKE) -C $(builddir) PREFIX=$(installdir)$(ozhome) install
# move binaries to their proper places
for f in ozmake; do \
mv $(installdir)$(ozhome)/bin/$$f $(installdir)/usr/bin/$$f; \
done
# move architecture-dependent files into /usr/lib/mozart
cd $(installdir)$(ozhome) && \
find -type f -a -name '*.so-*' | \
tar --create --files-from - --remove-files | \
(cd $(installdir)/usr/lib/mozart && tar --preserve --extract)
# debhelper stuff
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
# link to the documentation from /usr/share/doc/mozart-stdlib
ln -s ../../mozart/doc $(installdir)/usr/share/doc/mozart-stdlib/doc
dh_installman $(srcdir)/ozmake/ozmake.1
dh_compress -pmozart-stdlib
dh_fixperms
dh_installdeb
dh_shlibdeps -pmozart-stdlib
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep: build install
binary-arch: build install
binary: binary-indep binary-arch
.PHONY: build clean install binary-indep binary-arch binary
|