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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Copyright (c) 2015, 2016 Oliver Heimlich <oheim@posteo.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
%:
dh $@ --buildsystem=octave --with=octave
pkg = $(shell awk '/^Name:/ {print $$2; exit 0}' DESCRIPTION)
pkg_version = $(shell awk '/^Version:/ {print $$2; exit 0}' DESCRIPTION)
package = $(shell awk '/^Package:/ {print $$2; exit 0}' debian/control)
debpkg = debian/$(package)
# For reproducibility and portability,
# enable SSE2 only on architectures where it is supported by all processors.
ifeq ($(DEB_HOST_ARCH_CPU),amd64)
export CONF_FLAG_SSE2 = --enable-sse2
else
export CONF_FLAG_SSE2 = --disable-sse2
endif
# Don't install NEWS.gz, dh-octave will handle this
DEB_INSTALL_DOCS_ALL =
doc_dir = $(CURDIR)/$(debpkg)-doc/usr/share/doc/$(package)
override_dh_auto_configure:
(cd src/crlibm ; autoreconf -i)
dh_auto_configure
override_dh_auto_install-indep:
dh_auto_install
# The documentation build needs to load the package,
# so we have to set paths for the build process.
OCTAVE='octave --no-window-system --no-init-file' \
make -C doc manual.html
# dh_installdocs does not support subdirectories,
# so we move everything in place
mkdir -p $(doc_dir)/image
cp doc/manual.html $(doc_dir)/
cp doc/image/*.png doc/image/*.svg $(doc_dir)/image/
rm -rf \
$(CURDIR)/$(debpkg)/$(mpath)/*/doc
override_dh_auto_clean:
dh_auto_clean
[ ! -f Makefile ] || $(MAKE) clean
[ ! -f doc/Makefile ] || $(MAKE) -C doc clean
[ ! -f src/crlibm/Makefile ] || $(MAKE) -C src/crlibm maintainer-clean
|