File: rules

package info (click to toggle)
calf 0.0.60-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,904 kB
  • sloc: cpp: 32,488; sh: 11,352; xml: 10,789; ansic: 3,960; makefile: 220
file content (90 lines) | stat: -rwxr-xr-x 3,127 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009 Adrian Knoth <adi@drcomp.erfurt.thur.de>
# Copyright © 2010, 2012-2014, 2016 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for calf
#
# 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, 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/>.

DEB_AUTO_UPDATE_LIBTOOL = pre
DEB_AUTO_UPDATE_AUTOCONF = ,
DEB_AUTO_UPDATE_AUTOHEADER = ,
DEB_AUTO_UPDATE_ACLOCAL = ,
DEB_AUTO_UPDATE_AUTOMAKE = ,

include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

pkg = calf-plugins
docdir = /usr/share/calf/doc

DEB_UPSTREAM_URL = https://github.com/calf-studio-gear/calf/archive
DEB_UPSTREAM_TARBALL_BASENAME = $(DEB_UPSTREAM_TARBALL_VERSION)

# Needed by upstream build process
libdev-deps = glib2.0 gtk2.0 readline expat1 jack fftw3 fluidsynth cairo2
deps = $(patsubst %,$(comma) lib%-dev,$(libdev-deps))
deps +=, libasound2-dev [linux-any], lv2-dev
deps +=, libtool

CDBS_BUILD_DEPENDS +=, $(deps)

DEB_COPYRIGHT_EXTRACT_EXTS = png jpg

# put aside upstream-shipped temp files during build but after copyright-check
DEB_UPSTREAM_CRUFT_MOVE = calf.desktop configure INSTALL \
 Makefile.in $(patsubst %,%/Makefile.in,gui gui/icons/LV2 icons src src/calf) \
 aclocal.m4 \
 config.guess config.sub \
 compile \
 config.h.in \
 depcomp \
 install-sh \
 ltmain.sh \
 missing
DEB_ACLOCAL_ARGS = -Im4 --install --force
DEB_AUTOMAKE_ARGS = --add-missing --copy --foreign --force
clean::
	rm -rf m4

# adjust location of documentation
DEB_CONFIGURE_EXTRA_FLAGS += --docdir=$(docdir)

ifneq "$(filter amd64, $(DEB_HOST_ARCH_CPU))" ""
	DEB_CONFIGURE_EXTRA_FLAGS += --enable-sse
endif

# enable experimental plugins
DEB_CONFIGURE_EXTRA_FLAGS += --enable-experimental

# Avoid useless linking
LDFLAGS += -Wl,--as-needed

install/$(pkg)::
	sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`

# use separately packaged Javascript
CDBS_BUILD_DEPENDS +=, libjs-jquery, libjs-jquery-colorbox
CDBS_DEPENDS_$(pkg) = libjs-jquery, libjs-jquery-colorbox
binary-post-install/$(pkg)::
#	rm -f $(cdbs_curdestdir)$(docdir)/scripts/jquery.js
	ln -fsT ../../../javascript/jquery/jquery.min.js \
		$(cdbs_curdestdir)$(docdir)/scripts/jquery.js
#	rm -f $(cdbs_curdestdir)$(docdir)/scripts/jquery.prettyPhoto.js
	ln -fsT ../../../javascript/jquery-colorbox/jquery.colorbox-min.js \
		$(cdbs_curdestdir)$(docdir)/scripts/jquery.prettyPhoto.js
	ln -fsT ../../calf/doc \
		$(cdbs_curdestdir)usr/share/doc/$(pkg)/html