File wxcam.spec of Package wxcam
# vim: set ts=4 sw=4 et:
# Copyright (c) 2007 Herbert Graeber
# Copyright (c) 2010 Axel Koellhofer
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments to herbert@links2linux.de or axel@links2linux.de
%define CImg_version 139
Name: wxcam
Version: 1.1
Release: 0
Summary: Webcam application for linux
License: GPL-2.0+
Group: Productivity/Graphics/Other
URL: http://wxcam.sourceforge.net
Source0: http://downloads.sourceforge.net/wxcam/wxcam-%{version}.tar.bz2
# Header Cimg.h taken from version 1.3.9 of the CImg-library
# This file is licensed under the "CeCILL free software license"
# See http://cimg.sourceforge.net/ for more information
Source1: CImg-%{CImg_version}.h.bz2
Source2: Licence_CeCILL_V2-en.txt
Patch1: %{name}-fix_no_return_in_nonvoid_function.patch
Patch2: wxcam-fix_desktop_file.patch
Patch4: CImg-139.h.patch
Buildrequires: gcc-c++ pkg-config perl-XML-Parser update-desktop-files
BuildRequires: gtk2-devel libglade2-devel libtiff-devel libjpeg-devel
Buildrequires: libxvidcore-devel intltool alsa-devel
BuildRequires: pkgconfig(mjpegtools)
%if 0%{?is_opensuse}
BuildRequires: wxWidgets-devel >= 3
%else
# SLE_12 lacks wxWidgets_3.0-devel
BuildRequires: wxWidgets-devel < 3
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%endif
BuildRequires: libv4l-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
wxCam is a webcam application for linux. It supports video recording (in an
avi uncompressed and Xvid format), snapshot taking, and some special commands
for philips webcams, so you can also use the program for astronomy purposes.
It supports video4linux 1 drivers, so it should work on a very large number
of devices.
%prep
%setup -q
bzcat %{SOURCE1} > src/CImg.h
cp %{SOURCE2} License_CImg
%patch -P 1 -p1
%patch -P 2 -p0
%patch -P 4 -p0
# set some reasonable permissions for documentation files
chmod 0644 COPYING
%build
sed -i~ '
s@__DATE__@"date"@
s@__TIME__@"time"@
' src/CImg.h
%configure --docdir=%{_defaultdocdir}
%__make %{?_smp_mflags} V=1
%install
%makeinstall
%__rm -r "%{buildroot}/usr/doc"
%suse_update_desktop_file -i -r -N "Webcam Application" -G "Webcam Application" %{name} Graphics Photography GTK
%find_lang %{name}
%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING License_CImg
%{_bindir}/wxcam
%{_datadir}/applications/wxcam.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog