xawtv/xawtv.spec

385 lines
11 KiB
RPMSpec
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# FIXME: Workaround build errors with underlinking, try to make a proper
# fix later
%define _disable_ld_no_undefined 1
# dynamic desktop support
%define webcam_launcher /etc/dynamic/launchers/webcam
%define tvtuner_launcher /etc/dynamic/launchers/tvtuner
Summary: A X11 program for watching TV
Name: xawtv
Version: 3.103
Release: 1
License: GPLv2+
Group: Video
#OLD_STILL_VALID_URLs: http://www.strusel007.de/linux/xawtv/
#http://bytesex.org/xawtv/
Url: http://linux.bytesex.org/xawtv/
Source0: http://linuxtv.org/downloads/xawtv/%{name}-%{version}.tar.bz2
Source2: %{name}
Patch31: xawtv-3.100-glibc.patch
BuildRequires: recode
BuildRequires: x11-server-common
BuildRequires: aalib-devel
BuildRequires: gpm-devel
BuildRequires: jpeg-devel
BuildRequires: lesstif-devel
BuildRequires: slang-devel
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(libdv)
BuildRequires: pkgconfig(libfs)
BuildRequires: pkgconfig(liblircclient0)
BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xaw7)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xp)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xv)
BuildRequires: pkgconfig(xxf86dga)
BuildRequires: pkgconfig(zvbi-0.2)
Requires: common-licenses
Requires: xawtv-common = %{EVRD}
%description
Xawtv is a Video4Linux Stream Capture Viewer, that is a X11 program for
watching TV. It uses the Athena widgets.
MoTV has a nicer GUI which use lesstif (motif) widgets.
%files
%doc COPYING
%config(noreplace) %{tvtuner_launcher}/%{name}.desktop
%config(noreplace) %{webcam_launcher}/%{name}.desktop
%config(noreplace) %{_sysconfdir}/X11/app-defaults/Xawtv
%{_bindir}/xawtv
%{_bindir}/XawTV
%{_mandir}/man1/xawtv.1*
%{_mandir}/fr/man1/xawtv.1*
%{_datadir}/applications/rosa-%{name}.desktop
/usr/lib/X11/app-defaults/Xawtv*
%{_datadir}/%{name}
%post
update-alternatives --install %{webcam_launcher}/gnome.desktop webcam.gnome.dynamic %{webcam_launcher}/%{name}.desktop 20
update-alternatives --install %{webcam_launcher}/kde.desktop webcam.kde.dynamic %{webcam_launcher}/%{name}.desktop 20
update-alternatives --install %{tvtuner_launcher}/kde.desktop tvtuner.kde.dynamic %{tvtuner_launcher}/%{name}.desktop 20
update-alternatives --install %{tvtuner_launcher}/gnome.desktop tvtuner.gnome.dynamic %{tvtuner_launcher}/%{name}.desktop 20
%postun
if [ $1 = 0 ]; then
update-alternatives --remove webcam.kde.dynamic %{webcam_launcher}/%{name}.desktop
update-alternatives --remove webcam.gnome.dynamic %{webcam_launcher}/%{name}.desktop
update-alternatives --remove tvtuner.kde.dynamic %{tvtuner_launcher}/%{name}.desktop
update-alternatives --remove tvtuner.gnome.dynamic %{tvtuner_launcher}/%{name}.desktop
fi
#----------------------------------------------------------------------------
%package common
Summary: Common files for fbtv/motv/ttv/xawtv
Group: Video
Requires: tv-fonts
%description common
These are common files for fbtv, motv, ttv and xawtv.
They are:
* scantv: small text program that look for tv channels
* streamer - capture tool (images / movies).
%files common
%doc COPYING
%attr(4711,root,root) %{_bindir}/v4l-conf
%{_bindir}/rootv
%{_bindir}/scantv
%{_bindir}/subtitles
%{_bindir}/v4l-info
%lang(es) %{_mandir}/es/man1/rootv.*
%lang(es) %{_mandir}/es/man1/scantv.*
%lang(es) %{_mandir}/es/man1/subtitles.*
%lang(es) %{_mandir}/es/man1/xawtv.*
%lang(es) %{_mandir}/es/man5/xawtvrc.*
%lang(es) %{_mandir}/es/man8/v4l-conf.*
%{_mandir}/man1/rootv.1*
%{_mandir}/man1/scantv.1*
%{_mandir}/man1/subtitles*
%{_mandir}/man5/xawtvrc*
%{_mandir}/man8/v4l*
%{_mandir}/man1/v4l-info.*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%doc Changes README*
%doc README*
%doc contrib/frequencies*
#----------------------------------------------------------------------------
%package control
Summary: Control video4linux devices
Group: Video
%description control
Xawtv-remote and v4lctl can be used to control a video4linux driven TV card.
Xawtv-remote passes the command to a already running xawtv or motv instance
using X11 properties.
V4lctl is a command line tool that sets the parameters directly.
%files control
%doc README.lirc
%{_bindir}/v4lctl
%{_bindir}/xawtv-remote
%{_mandir}/man1/v4lctl.1*
%lang(es) %{_mandir}/es/man1/v4lctl.*
%{_mandir}/man1/xawtv-remote.1*
%lang(es) %{_mandir}/es/man1/xawtv-remote.*
#----------------------------------------------------------------------------
%package -n fbtv
Summary: A console program for watching TV
Group: Video
Requires: xawtv-common = %{EVRD}
%description -n fbtv
Fbtv is a program for watching TV with your linux box.
It runs on top of a graphic framebuffer device (/dev/fb0): thus is useful for
watching TV without X11.
It shares the config file ($HOME/.xawtv) with the xawtv application.
Check the xawtv(1) manpage for details about the config file format.
%files -n fbtv
%doc COPYING
%{_bindir}/fbtv
%{_mandir}/man1/fbtv*
%lang(es) %{_mandir}/es/man?/fbtv.*
#----------------------------------------------------------------------------
%package misc
Summary: Xawtv miscellous stuff
Group: Video
Requires: xawtv-common = %{EVRD}
%description misc
This package has a few tools you might find useful. They have not to do very
much to do with xawtv as they were written for debugging:
* dump-mixers - dump mixer settings to stdout
* propwatch - monitors properties of X11 windows. If you
want to know how to keep track of xawtv's
_XAWTV_STATION property, look at this.
* mtt - teletext browser for X11 and console
* ntsc-cc - reads vbi data from /dev/vbi and decodes the enclosed cc data.
* pia - play media files
* record - console sound recorder. Has a simple input
level meter which might be useful to trouble
shoot sound problems.
* showriff - display the structure of RIFF files (avi, wav).
%files misc
%doc COPYING
%config(noreplace) /etc/X11/app-defaults/mtt
%{_bindir}/dump-mixers
%{_bindir}/mtt
%{_bindir}/ntsc-cc
%{_bindir}/pia
%{_bindir}/propwatch
%{_bindir}/record
%{_bindir}/showqt
%{_bindir}/showriff
%{_mandir}/man1/dump-mixers*
%{_mandir}/man1/mtt*
%{_mandir}/man1/ntsc*
%{_mandir}/man1/pia*
%{_mandir}/man1/record*
%{_mandir}/man1/propwatch*
%{_mandir}/man1/showriff.1*
#----------------------------------------------------------------------------
%package -n motv
Summary: A Motif program for watching TV
Group: Video
Requires: xawtv-common = %{EVRD}
%description -n motv
This is a motv-based Video4Linux capture viewer. It is basically xawtv with a
more user-friendly GUI. It has the same features, uses the same config file,
has the same command line switches, you can control it using xawtv-remote.
Most keyboards shortcuts are identical too.
%files -n motv
%doc COPYING
%{_bindir}/motv
%{_mandir}/man1/motv*
%{_datadir}/applications/rosa-motv.desktop
%config(noreplace) %{_sysconfdir}/X11/app-defaults/MoTV
%config(noreplace) %{_sysconfdir}/X11/*/app-defaults/MoTV
#----------------------------------------------------------------------------
%package -n radio
Summary: Console radio application
Group: Sound
Provides: xawtv-radio = %{EVRD}
%description -n radio
This is a ncurses-based radio application.
%files -n radio
%doc COPYING
%{_bindir}/radio
%{_mandir}/man1/radio*
#----------------------------------------------------------------------------
%package -n streamer
Summary: Record audio and/or video streams
Group: Video
Requires: xawtv-common = %{EVRD}
%description -n streamer
streamer reads audio and/or video data from /dev/video0 and /dev/dsp
and writes the data to the disk.
Various output formats are supported.
Start streamer with '-h' for a list of options and supported output formats.
%files -n streamer
%doc COPYING README.recording
%{_bindir}/streamer
%{_mandir}/man1/streamer*
%lang(es) %{_mandir}/es/man1/streamer.*
#----------------------------------------------------------------------------
%package -n ttv
Summary: Display TV/video on a tty
Group: Video
Requires: xawtv-common = %{EVRD}
%description -n ttv
Ttv displays TV/video on a terminal, rendering the images using aalib.
%files -n ttv
%doc COPYING
%{_bindir}/ttv
%{_mandir}/man1/ttv*
%lang(es) %{_mandir}/es/man1/ttv.*
#----------------------------------------------------------------------------
%package web
Summary: Videotext pages webserver & images capture/upload to a webserver
Group: Networking/WWW
Requires: xawtv-common = %{EVRD}
%description web
Webcam captures images from a video4linux device like bttv, annotates them and
and uploads them to a webserver using ftp in a endless loop.
Alevtd is http daemon which serves videotext pages as HTML.
Tune in some station with a utility like v4lctl or some TV application.
Then start it and point your browser to http://localhost:5654/
Pages may be requested either in HTML format (http://localhost:5654/<page>/
or http://localhost:5654/<page>/<subpage>.html) or in ASCII text format
(http://localhost:5654/<page>/<subpage>.txt).
Subpage "00" can be used for pages without subpages.
%files web
%doc COPYING
%{_bindir}/alevtd
%{_bindir}/webcam
%{_mandir}/man1/alevtd.1*
%{_mandir}/man1/webcam.1*
#----------------------------------------------------------------------------
%prep
%setup -q
%patch31 -p0
%build
autoreconf -vfi
export LIBS="$LIBS -lm"
%configure2_5x --enable-xfree-ext \
--enable-xvideo \
--enable-gl \
--enable-zvbi \
--enable-lirc \
--enable-dv \
--enable-aa \
--enable-alsa \
--disable-quicktime \
--x-includes=%{_includedir}/freetype2
# Quicktime support not enabled, so libpng is not needed
find . -name 'Makefile' | xargs perl -pi -e 's/-lpng//g'
%make
%install
perl -pi -e 's!-o root -g root!!g' src/Makefile
mkdir -p %{buildroot}/usr/lib/X11/app-defaults
%makeinstall_std ROOT="%{buildroot}" FONTDIR=%{buildroot}%{_datadir}/fonts/misc SUID_ROOT=""
install -m 644 x11/Xawtv.ad %{buildroot}/usr/lib/X11/app-defaults
(cd %{buildroot}/usr/lib/X11/app-defaults; ln Xawtv.ad Xawtv; ln Xawtv.ad Xawtv-color)
install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/XawTV
# Menu entries
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/rosa-%{name}.desktop <<EOF
[Desktop Entry]
Name=XawTV
Comment=A program for watching TV
Comment[ru]=Программа просмотра ТВ
Exec=XawTV
Icon=video_section
Terminal=false
Type=Application
StartupNotify=true
Categories=AudioVideo;Video;TV;
EOF
cat > %{buildroot}%{_datadir}/applications/rosa-motv.desktop <<EOF
[Desktop Entry]
Name=MoTV
Comment=A program for watching TV (nicer interface)
Comment[ru]=Программа просмотра ТВ (улучшенный интерфейс)
Exec=motv
Icon=video_section
Terminal=false
Type=Application
StartupNotify=true
Categories=Motif;AudioVideo;Video;TV;
EOF
mkdir -p %{buildroot}{%tvtuner_launcher,%webcam_launcher}
cat > %{buildroot}%{webcam_launcher}/%{name}.desktop << EOF
[Desktop Entry]
Name=XawTV \$devicename
Comment=The X11 Video4Linux Stream Capture Viewer
Comment[ru]=Просмотр входящего потока Video4Linux
TryExec=xawtv
Exec=xawtv -c \$device
Terminal=false
Icon=video_section
Type=Application
EOF
cat > %{buildroot}%{tvtuner_launcher}/%{name}.desktop << EOF
[Desktop Entry]
Name=XawTV \$devicename
Comment=The X11 Video4Linux Stream Capture Viewer
Comment[ru]=Просмотр входящего потока Video4Linux
TryExec=XawTV
Exec=XawTV -c \$device
Terminal=false
Icon=video_section
Type=Application
EOF