File alevt.spec of Package alevt

# spec file for package alevt
# Copyright (c) 2018 SUSE LINUX 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

Name:           alevt
%{expand:%%global _prefix %(pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_prefix" == "/usr/X11R6"
%define _man_dir man
%define _man_dir share/man
BuildRequires:  libpng-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(x11)
Summary:        Teletext and Videotext Decoder for the BTTV Driver
License:        GPL-2.0+
Group:          Hardware/TV
Version:        1.6.2
Release:        0
Source0:        alevt-%version.tar.bz2
Source1:        alevt.desktop
Source2:        alevt.png
Patch2:         alevt-1.6.0-dvb-demux.patch
Patch4:         alevt-overflow2.diff
Patch5:         alevt-happy-abuild.diff
# PATCH-FIX-UPSTREAM pngtoico-libpng15.patch --; build with libpng15; sent today to
# build against libpng14 should not be affected, otherwise please let me know
Patch6:         alevt-libpng15.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

AleVT is a teletext and videotext decoder and browser for the BTTV
driver (/dev/vbi) and the X Window System.  It features multiple
windows, a page cache, regexp searching, a built-in manual, and more.
There is also a program to get the time from teletext.

%setup -q
%patch2 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

make OPT="$RPM_OPT_FLAGS" %{?_smp_mflags}

echo "Using _prefix=%{_prefix} _man_dir=%{_man_dir}"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin $RPM_BUILD_ROOT%{_prefix}/%{_man_dir}/man1
make rpm-install USR_X11R6=%{_prefix} MAN=%{_man_dir}
%suse_update_desktop_file -i alevt AudioVideo TV

%dir %{_prefix}/include/X11/pixmaps
%doc %{_prefix}/%{_man_dir}/man1/alevt-cap.1.gz
%doc %{_prefix}/%{_man_dir}/man1/alevt-date.1.gz
%doc %{_prefix}/%{_man_dir}/man1/alevt.1x.gz

openSUSE Build Service is sponsored by