Blob Blame History Raw
Name:           camorama
Version:        0.19
Release:        2%{?dist}
Summary:        Gnome webcam viewer
Group:          Amusements/Graphics
License:        GPLv2+
URL:            http://camorama.fixedgear.org/
Source0:        http://ftp.gnome.org/pub/GNOME/sources/camorama/0.19/camorama-0.19.tar.bz2
# None of these patches are going upstream as upstream is dead
# camorama has some bad (not always true) assumptions about which resolutions
# it can get from a device, this fixes camorama to actualy check what it got
Patch0:         camorama-0.19-fixes.patch
# Update the desktop file to todays standards
Patch1:         camorama-0.19-desktop.patch
# Make it use libv4l1 so it will work with v4l2 devices too
Patch2:         camorama-0.19-libv4l.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  libgnomeui-devel ORBit2-devel gettext-devel libv4l-devel
BuildRequires:  intltool desktop-file-utils
Requires:       hicolor-icon-theme
Requires(pre):  GConf2
Requires(post): GConf2
Requires(preun): GConf2

%description
A simple Gnome webcam viewer, with the ability to apply some video effects.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}

# below is the desktop file and icon stuff.
desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{name}.desktop
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/devices
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/devices
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}-webcam-16.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/devices/%{name}-webcam.png
mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}-webcam-24.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/devices/%{name}-webcam.png
mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps


%clean
rm -rf $RPM_BUILD_ROOT


%pre
if [ "$1" -gt 1 ] ; then
  export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
  gconftool-2 --makefile-uninstall-rule \
    %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :
fi

%post
export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
gconftool-2 --makefile-install-rule \
  %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%preun
if [ "$1" -eq 0 ] ; then
  export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
  gconftool-2 --makefile-uninstall-rule \
    %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
fi

%postun
if [ $1 -eq 0 ] ; then
  touch --no-create %{_datadir}/icons/hicolor &>/dev/null
  gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO
%{_sysconfdir}/gconf/schemas/camorama.schemas
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/camorama.desktop
%{_datadir}/icons/hicolor/*x*/devices/%{name}-webcam.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png


%changelog
* Fri Aug 28 2009 Hans de Goede <hdegoede@redhat.com> 0.19-2
- Don't install gconf files during build (#507830)
- Add comments describing the patches (#507830)

* Tue Jun 23 2009 Hans de Goede <hdegoede@redhat.com> 0.19-1
- Initial Fedora package