File xvidcap.spec of Package xvidcap

# vim: set ts=4 sw=4 et:

Name:           xvidcap
Version:        1.1.7
Release:        4
Summary:        A small tool to capture things going on on an X-Windows display
URL:            http://xvidcap.sourceforge.net/
Group:          Productivity/Graphics/Viewers
License: GPL-2.0

Source0:        http://prdownloads.sourceforge.net/xvidcap/%{name}-%{version}.tar.gz

Patch0:         xvidcap-1.1.6-docdir.patch
Patch1:         xvidcap-xorg.patch
Patch2:         xvidcap-fix_linking.patch

BuildRoot:      %{_tmppath}/build-%{name}-%{version}

BuildRequires:  gtk2-devel libmp3lame-devel libglade2-devel perl-XML-Parser pkgconfig scrollkeeper update-desktop-files

%if 0%{?suse_version} >= 1030
BuildRequires:  fdupes
%endif

%if 0%{?suse_version} > 1210
BuildRequires:  libXmu-devel
BuildRequires:  libXfixes-devel
BuildRequires:  libXdamage-devel
%endif

%description
Xvidcap is a tool that can capture movement on an X11 display. It works in two distinct modes:
It can capture to single frames (like a number of jpeg images) or it can encode the captured frames to a video on-line.

It is intended to be a standards-based alternative to tools like Lotus ScreenCam for UNIX platforms.
On-line encoding is done through FFMPEG and also allows for audio grabbing on OSS compatible systems.

%prep
%setup -q -n %{name}-%{version}
%patch -P 0 -p 1
%if %suse_version >= 1130
%patch -P 1 -p 1
%endif
%patch -P 2

%build
export SUSE_ASNEEDED=0
%configure --with-forced-embedded-ffmpeg
%__make %{?_smp_flags}

%install
%makeinstall

%__rm -rf "%{buildroot}%{_datadir}/gnome/help"

%suse_update_desktop_file -r %{name} AudioVideo Recorder

%fdupes -s "%{buildroot}%{_datadir}/"

%if %suse_version < 1140
rm -rfv \
    %{buildroot}%{_datadir}/locale/?? \
    %{buildroot}%{_mandir}/??
touch "%{name}.lang" "%{name}-dbus-client.lang"
%else
%find_lang "%{name}" --with-man
%find_lang "%{name}-dbus-client" --with-man
%endif

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files -f "%{name}.lang" -f "%{name}-dbus-client.lang"
%defattr(-,root,root)
%{_bindir}/xvidcap
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/services
%{_datadir}/dbus-1/services/net.jarre_de_the.Xvidcap.service
%{_datadir}/omf
%{_datadir}/%{name}
%{_datadir}/pixmaps/*.png
%{_docdir}/%{name}
%doc %{_mandir}/man1/*

%changelog