File: rules

package info (click to toggle)
gmerlin 2.0.0~svn6298~dfsg0-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 14,104 kB
  • sloc: ansic: 174,036; javascript: 7,970; makefile: 1,802; sh: 702; xml: 72; sed: 16
file content (95 lines) | stat: -rwxr-xr-x 3,411 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

# Copyright © 2010 Romain Beauxis <toots@rastageeks.org>
# Copyright © 2010-2011 Alessio Treglia <alessio@debian.org>
# Copyright © 2011 IOhannes m zmölnig <zmoelnig@iem.at>
# Description: Main Debian packaging script for gmerlin
#
# 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/>.

DPKG_EXPORT_BUILDFLAGS = 1
DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_BUILD_MAINT_OPTIONS

include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk

export DEB_CPPFLAGS_MAINT_APPEND =
export DEB_LDFLAGS_MAINT_APPEND =

## only link what is needed
DEB_LDFLAGS_MAINT_APPEND += -Wl,--as-needed

# DEB_DH_MAKESHLIBS_ARGS_ALL := -- -v$(DEB_UPSTREAM_VERSION)

# configure flags
DEB_CONFIGURE_EXTRA_FLAGS :=
ifneq ($(DEB_HOST_ARCH_OS),linux)
DEB_CONFIGURE_EXTRA_FLAGS += --disable-v4l --disable-v4l2
endif

## set timestamp for reproducible builds
DATE_FMT = %Y/%m/%d
ifdef SOURCE_DATE_EPOCH
    BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")
else
    BUILD_DATE ?= $(shell date "+$(DATE_FMT)")
endif
DEB_CPPFLAGS_MAINT_APPEND += "-DBUILD_DATE='\"$(BUILD_DATE)\"'"


%:
	dh $@

execute_before_dh_autoreconf:
	./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- \
		--docdir=\$${prefix}/share/doc/libgmerlin-doc \
		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
		--enable-static=no \
		--disable-esd \
		--with-cpuflags=none \
		$(DEB_CONFIGURE_EXTRA_FLAGS)

# 'make clean' removes this file, and while it is a dependency it is nowhere built
# since Debian ships its own manpages anyhow, we create a dummy here rather than
# patching the sources
execute_before_dh_auto_build:
	touch apps/transcoder/gmerlin_transcoder.1

#execute_after_dh_auto_build:
#	./apps/thumbnailer/gmerlin-video-thumbnailer -help-man | sed -e 's/-/\\-/g' > gmerlin-video-thumbnailer.1
#	#PATH=$(CURDIR)/apps/player/:$(PATH) ./apps/player/gmerlin_launcher -help-man | sed -e 's/-/\\-/g' > gmerlin_launcher.1
#	./tests/gmerlin_imgconvert -help-man | sed -e 's/-/\\-/g' > gmerlin_imgconvert.1
#	#./tests/gmerlin_visualize -help-man | sed -e 's/-/\\-/g' > gmerlin_visualize.1

execute_before_dh_auto_clean:
	rm -f gmerlin_imgconvert.1 gmerlin_launcher.1 gmerlin-video-thumbnailer.1 gmerlin_visualize.1


# Suppress scanning documentation images causing false alarms.
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
	icons/.*|doc/img/.*|skins/.*/.*|po/.*\.gmo|debian/.*
# 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