SUNWcheese.spec
author daniell
Wed, 13 Oct 2010 16:43:58 +0000
branchopensolaris-2009-06
changeset 20159 f18a6979f732
parent 14187 bde1cdb5eaa5
permissions -rw-r--r--
6965295 [CVE-2010-1205/CVE-2010-2249] Multiple security issues in libpng 1.2 versions before 1.2.44

#
# spec file for package SUNWcheese
#
# includes module(s): cheese
#
%include Solaris.inc
%define source_name cheese

Name:                    SUNWcheese
Summary:                 Cheese - GNOME application for taking photos and videos from a webcam
Version:                 2.23.90
Source:                  http://ftp.gnome.org/pub/GNOME/sources/cheese/2.23/cheese-%{version}.tar.bz2

# owner:elaine date:2008-09-01 type:bug bugster:6657549
Patch1:                  cheese-01-lack-hal-backend.diff

# owner:elaine date:2008-09-01 type:bug bugster:6743364
Patch2:                  cheese-02-lack-uvc-framerate.diff

# owner:elaine date:2008-09-01 type:bug bugzilla:549804
Patch3:                  cheese-03-thumbnail-create.diff

URL:                     http://live.gnome.org/Cheese
SUNW_BaseDir:            %{_basedir}
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
Source1:                 %{name}-manpages-0.1.tar.gz

BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-media-devel
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWdbus-devel
BuildRequires: SUNWevolution-data-server-devel
BuildRequires: SUNWlibrsvg-devel
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-media
Requires: SUNWgnome-vfs
Requires: SUNWdbus
Requires: SUNWevolution-data-server
Requires: SUNWcheese-root
Requires: SUNWxwrtl
Requires: SUNWpostrun
Requires: SUNWgnome-config

%package root
Summary:                 %{summary} - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc
Requires: SUNWpostrun-root
Requires: SUNWgnome-config

%if %build_l10n
%package l10n
Summary:                 %{summary} - l10n files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:                %{name}
%endif

%prep
%setup -q -c -n %name-%version
cd %{source_name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
cd %{_builddir}/%name-%version
gzcat %SOURCE1 | tar xf -

%build
cd %{source_name}-%{version}

CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
    CPUS=1
fi

autoconf
./configure --prefix=%{_prefix} --mandir=%{_mandir} \
            --libdir=%{_libdir}              \
            --libexecdir=%{_libexecdir}      \
            --sysconfdir=%{_sysconfdir} 

gmake -j$CPUS

%install
rm -rf $RPM_BUILD_ROOT
cd %{source_name}-%{version}
gmake install DESTDIR=$RPM_BUILD_ROOT

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/cheese/[a-z]*
rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/cheese/cheese-[a-z]*.omf
%endif

#install man page
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT


%post
%include desktop-database-install.script
%include scrollkeeper-update.script
( echo 'test -x %{_bindir}/update-mime-database || exit 0';
  echo '%{_bindir}/update-mime-database %{_datadir}/mime'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait
%include icon-cache.script

%postun
%include desktop-database-uninstall.script
%include scrollkeeper-update.script
( echo 'test -x %{_bindir}/update-mime-database || exit 0';
  echo '%{_bindir}/update-mime-database %{_datadir}/mime'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait

%clean
rm -rf $RPM_BUILD_ROOT

%post root
%include gconf-install.script

%preun root
test -x $BASEDIR/var/lib/postrun/postrun || exit 0
( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
  echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"';
  echo '  exit 0';
  echo '}';
  echo 'umask 0022';
  echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
  echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
  echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
  echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
  echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
  echo 'schemas="$SDIR/cheese.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/cheese
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/cheese
%{_libdir}/cheese/*
%dir %attr (0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/cheese
%{_datadir}/cheese/*
%dir %attr (0755, root, other) %{_datadir}/icons
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/scalable/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/scalable/apps/
%{_datadir}/icons/hicolor/scalable/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/16x16
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/16x16/apps/
%{_datadir}/icons/hicolor/16x16/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/22x22/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/22x22/apps/
%{_datadir}/icons/hicolor/22x22/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/24x24/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/24x24/apps/
%{_datadir}/icons/hicolor/24x24/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/32x32/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/32x32/apps/
%{_datadir}/icons/hicolor/32x32/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/48x48/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/48x48/apps/
%{_datadir}/icons/hicolor/48x48/apps/*
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*.desktop
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/cheese/C
%{_datadir}/omf/cheese/cheese-C.omf
%dir %attr (0755, root, bin) %{_datadir}/dbus-1
%dir %attr (0755, root, bin) %{_datadir}/dbus-1/services
%{_datadir}/dbus-1/services/org.gnome.Cheese.service
%doc -d cheese-%{version} AUTHORS
%doc(bzip2) -d cheese-%{version} ChangeLog NEWS COPYING
%dir %attr (0755, root, other) %{_datadir}/doc


%files root
%defattr (-, root, sys)
%dir %attr(0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/cheese.schemas

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/cheese/[a-z]*
%{_datadir}/omf/cheese/cheese-[a-z]*.omf
%endif

%changelog
* Mon Dec 01 2008 - [email protected]
- Roll back to the previous version 2.23.90 request by Elaine.
* Tue Nov 25 2008 - [email protected]
- Bump to 2.24.2
* Sun Sep 21 2008 - [email protected]
- Fix typo from previous.
* Sat Sep 20 2008 - [email protected]
- Added BuildRequires SUNWlibsrvg-devel.
* Fri Sep 19 2008 - [email protected]
- Assign attribute to shared folders.
* Tue Sep 16 2008 - [email protected]
- Add %doc to %files for new copyright.
* Mon Sep 08 2008 - [email protected]
- Create from SFEcheese.spec. Upgrade to 2.23.90.
- Add patch cheese-01-lack-hal-backend.diff.
- Add patch cheese-02-lack-uvc-framerate.diff
- Add patch cheese-03-thumbnail-create.diff