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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2016-2018 IOhannes m zmölnig <zmoelnig@iem.at>
# Description: Main Debian packaging script for faust
#
# 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 2, 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, see <http://www.gnu.org/licenses/>.
DH_VERBOSE = 1
export VERBOSE = 1
DEB_SRCDIR=build
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
CXXFLAGS+=$(CPPFLAGS)
CFLAGS+=$(CPPFLAGS)
export http_proxy = http://127.0.0.1:9
export https_proxy = https://127.0.0.1:9
export CC
export CXX
%:
dh $@
override_dh_auto_build:
dh_auto_build -- \
world PREFIX=/usr
# ## TODO: 'dynamic' build target: check with upstream about ABI stability
#override_dh_auto_build-indep:
# make doc doclib
override_dh_installchangelogs:
dh_installchangelogs WHATSNEW.md
execute_before_dh_installman: manpages
override_dh_auto_install:
dh_auto_install -- PREFIX=/usr
# multi-arch
mkdir -p $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
mv $(CURDIR)/debian/tmp/usr/lib/lib*.* $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
# fix path for faustpath and faustoptflags
sed -e 's|^\( *\. \)faust|\1/usr/share/faust/utils/faust|' \
-e 's|^\( *\. \)usage.sh|\1/usr/share/faust/utils/usage.sh|' \
-i $(CURDIR)/debian/*/usr/bin/faust2*
override_dh_auto_install-indep:
# remove binary artifacts from to-be /usr/share
rm -rf $(CURDIR)/debian/tmp/usr/share/faust/iOS/osclib/
# fix permissions
find $(CURDIR)/debian/tmp/usr/share/faust -name "*.cpp" \
-exec chmod a-x {} +
find $(CURDIR)/debian/tmp/usr/share/faust -name "*.jucer" \
-exec chmod a-x {} +
override_dh_gencontrol:
dh_gencontrol -- \
-V"faust-dev:Depends=g++,make,libc6-dev|libc-dev, faust (>= ${source:Version}),faust (<< ${source:Upstream-Version}+1~),"
override_dh_strip:
dh_strip -Xlibsndfile.so
override_dh_shlibdeps:
dh_shlibdeps -Xlibsndfile.so
override_dh_compress:
dh_compress -Xfaust-quick-reference.pdf
override_dh_auto_clean:
DEB_COMPRESS_EXCLUDE_ALL=.dsp .lib Makefile
MANPAGEDIR=debian/man
.PHONY: manpages manpage-clean
manpages:
mkdir -p $(MANPAGEDIR)
-help2man -N -n "Compile faust DSP code into SuperCollider module" \
--output $(MANPAGEDIR)/faust2sc.1 \
tools/faust2sc-1.0.0/faust2sc
debian/faust2man $(MANPAGEDIR) debian/faust2api.1
manpage-clean:
-rm -rf $(MANPAGEDIR)
.PHONY: missing-sources
missing-sources: debian/missing-sources/jquery-1.7.1.js
debian/missing-sources/jquery-1.7.1.js:
wget -O $@ https://raw.githubusercontent.com/jquery/jquery/1.7.1/jquery.js
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
(debian/.*|.*\.(png|jpg|pdf|doctree|jar|xcuserstate|swc|ots|xlsx|woff2?|wasm))
# licensecheck v1
.PHONY: licensecheck
licensecheck:
LANG=C.UTF-8 licensecheck \
-i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \
--check '.*' --recursive --deb-machine --lines 0 * \
> debian/copyright_newhints
cmp debian/copyright_hints debian/copyright_newhints \
&& rm debian/copyright_newhints
|