File nxtvepg.spec of Package nxtvepg

#
# spec file for package nxtvepg
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           nxtvepg
BuildRequires:  tk-devel
BuildRequires:  xorg-x11-devel
Url:            http://nxtvepg.sourceforge.net/
Version:        2.8.1
Release:        0
Summary:        Nextview EPG Decoder and Browser
License:        GPL-2.0+
Group:          Hardware/TV
Source0:        %{name}-%{version}.tar.bz2
Source1:        rc.nxtvepg
Patch1:         nxtvepg-Makefile.patch
Patch2:         nxtvepg-no-hardcoded-tcl-dir.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
In this software package, find a decoder for Nextview--an electronic TV
program guide for the analog domain (as opposed to the various digital
EPGs that come with most digital broadcasts). It allows you to decode
and browse TV program listings for most of the major networks in
Germany, Austria, France, and Switzerland.

Currently, Nextview EPG is transmitted by: * In Germany and Austria:
   Kabel1, 3Sat, RTL-II, EuroNews (coverage: apx. 31 networks)

* In Switzerland: SF1, TSR1, TSI1, EuroNews, 3sat, Kabel1 (coverage:
   apx. 37 networks)

* In France: Canal+, M6 (coverage: 8 networks)

* In Turkey: TRT-1 (coverage: 17 networks)



Authors:
--------
    Thorsten Zoerner <tomzo@nefkom.net>

%prep
%setup -q
%patch1
%patch2

%build
export	CFLAGS="$RPM_OPT_FLAGS"
make	prefix=/usr			\
	mandir=/usr/share/man/man1	\
	SYS_DBDIR=/var/tmp/nxtvdb

%install
make	ROOT=%{buildroot}		\
	prefix=/usr			\
	mandir=%{buildroot}/usr/share/man/man1	\
	SYS_DBDIR=/var/tmp/nxtvdb	\
	install
# remove the daemon-only binary - /usr/bin/nxtvepg is capable of running as
# daemon too, so packaging nxtvepgd would mean duplication for most use cases
rm %buildroot/usr/bin/nxtvepgd %buildroot/usr/share/man/man1/nxtvepgd.1*
# init script
mkdir -p %{buildroot}/etc/init.d %{buildroot}/usr/sbin
install -m 755 %{SOURCE1} %{buildroot}/etc/init.d/nxtvepg
ln -s ../../etc/init.d/nxtvepg %{buildroot}/usr/sbin/rcnxtvepg

%files
%defattr(-,root,root)
%config /etc/init.d/nxtvepg
/usr/sbin/rcnxtvepg
/usr/bin/nxtvepg
/usr/share/nxtvepg
/usr/share/man/man1/nxtvepg.1*
%dir /usr/share/X11/app-defaults
%{_datadir}/X11/app-defaults/Nxtvepg
%doc CHANGES COPYRIGHT TODO README manual.html

%clean
rm -rf $RPM_BUILD_ROOT

%preun
%stop_on_removal nxtvepg

%postun
%restart_on_update nxtvepg
%insserv_cleanup

%changelog
openSUSE Build Service is sponsored by