#!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- # Copyright © 2010 Romain Beauxis # Copyright © 2010-2011 Alessio Treglia # Copyright © 2011 IOhannes m zmölnig # 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 . 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