debian swirl logo

Back to the packages list gmerlin

#!/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 .

LDFLAGS+= -Wl,--as-needed

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

# Relax inclusion of optional features to ease backporting
-include /usr/share/cdbs/1/rules/utils.mk

DEB_AUTO_UPDATE_LIBTOOL = pre
DEB_AUTO_UPDATE_ACLOCAL = 1.11
DEB_AUTO_UPDATE_AUTOCONF = 2.67
DEB_AUTO_UPDATE_AUTOHEADER = 2.67
DEB_AUTO_UPDATE_AUTOMAKE = 1.11

DEB_UPSTREAM_URL = http://downloads.sourceforge.net/gmerlin
DEB_UPSTREAM_TARBALL_MD5 = 2f2a0880e738e71486f04c929ba067f4
DEB_UPSTREAM_REPACKAGE_EXCLUDES = ./include/gmerlin/bg_sem.h
DEB_UPSTREAM_REPACKAGE_EXCLUDES += ./doc/
DEB_UPSTREAM_REPACKAGE_EXCLUDES += CVS/


# In order to regenerate 'debian/control' :
#    DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean
# Then check manually if everything's ok

# Suppress scanning documentation images causing false alarms.
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(icons/.*|doc/img/.*|skins/.*/.*|po/.*\.gmo|debian/(changelog|copyright(|_hints|_newhints)))$


DEB_CONFIGURE_EXTRA_FLAGS := --docdir=\$${prefix}/share/doc/libgmerlin-doc \
 --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
 --enable-static=no \
 --with-cpuflags=none
DEB_DH_MAKESHLIBS_ARGS_ALL := -- -v$(DEB_UPSTREAM_VERSION)
DEB_DH_STRIP_ARGS := --dbg-package=gmerlin-dbg

ifneq ($(DEB_HOST_ARCH_OS),linux)
DEB_CONFIGURE_EXTRA_FLAGS += --disable-v4l --disable-v4l2
endif

build/gmerlin::
		./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	

clean:: restorefiles
		rm -f gmerlin_imgconvert.1 gmerlin_launcher.1 gmerlin-video-thumbnailer.1 gmerlin_visualize.1
		rm -f m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4


post-patches:: storefiles

.PHONY: storefiles restorefiles

storefiles:
		-test -f debian/restorefiles -a ! -f debian/restorefiles.tar && tar -c -f debian/restorefiles.tar -T debian/restorefiles

restorefiles:
		-test -f debian/restorefiles -a   -f debian/restorefiles.tar && tar -x -f debian/restorefiles.tar -T debian/restorefiles
		rm -f debian/restorefiles.tar

Builds:

gmerlin-data
multiformat media player - data files
gmerlin-dbg
debugging symbols for gmerlin
gmerlin
multiformat media player
gmerlin-plugins-base
gmerlin plugins from the "base" set
libgmerlin0
core library for gmerlin - runtime files
libgmerlin-common
core library for gmerlin - common runtime files
libgmerlin-dev
core library for gmerlin - development files