%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Summary:   Color management tools for GNOME
Name:      gnome-color-manager
Version:   3.18.0
Release:   1%{?_dist_release}
License:   GPLv2+
Group:     Applications/System
URL:       http://projects.gnome.org/gnome-color-manager/

Source0:   http://download.gnome.org/sources/gnome-color-manager/3.18/%{name}-%{version}.tar.xz

Patch0:		gnome-color-manager-3.14.0-cd-pixel-format.patch

Requires:  gnome-icon-theme
Requires:  shared-mime-info
Requires:  shared-color-profiles

BuildRequires: gtk3-devel >= 3.0.0
BuildRequires: gnome-doc-utils >= 0.3.2
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: libtool
BuildRequires: vte3-devel
BuildRequires: gnome-doc-utils
BuildRequires: unique3-devel >= 3.0.0
BuildRequires: intltool
BuildRequires: libgudev1-devel
BuildRequires: dbus-glib-devel >= 0.73
BuildRequires: libXxf86vm-devel
BuildRequires: libXrandr-devel
BuildRequires: gnome-desktop3-devel
BuildRequires: cups-devel
BuildRequires: sane-devel
BuildRequires: libtiff-devel
BuildRequires: libcanberra-gtk3-devel
BuildRequires: libnotify-devel
BuildRequires: lcms2-devel
BuildRequires: gnome-settings-daemon-devel
BuildRequires: libusb1-devel
BuildRequires: control-center-devel
BuildRequires: exiv2-devel
BuildRequires: colord-gtk-devel
BuildRequires: clutter-gtk-devel
BuildRequires: libmash-devel
BuildRequires: gnome-common
BuildRequires: yelp-tools

Obsoletes: %{name}-libs < 3.1.0
Obsoletes: %{name}-devel < 3.1.0

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
gnome-color-manager is a session framework that makes it easy to manage, install
and generate color profiles in the GNOME desktop.


%prep
%setup -q
%patch0 -p1 -b .pixel

%build
%configure --disable-static
make %{?_smp_mflags}

%install
make install DESTDIR=$RPM_BUILD_ROOT

for i in gcm-import ; do
  desktop-file-install --delete-original                                \
    --dir=$RPM_BUILD_ROOT%{_datadir}/applications/                      \
    $RPM_BUILD_ROOT%{_datadir}/applications/$i.desktop
done

rm -f $RPM_BUILD_ROOT%{_libdir}/*.{la,a}
rm -f $RPM_BUILD_ROOT%{_libdir}/control-center-1/panels/*.{la,a}
rm -f $RPM_BUILD_ROOT%{_libdir}/gnome-settings-daemon-3.0/*.{la,a}

%find_lang %name --with-gnome

%post
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database %{_datadir}/applications &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :

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

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

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%{_bindir}/gcm-*
%{_libexecdir}/gcm-helper-exiv
%{_datadir}/applications/gcm-*.desktop
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/figures/*.png
%{_datadir}/%{name}/icons/*.svg
%{_datadir}/%{name}/targets/*.png
%{_datadir}/%{name}/ti1
%{_datadir}/appdata/gcm-viewer.appdata.xml
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/icons/hicolor/scalable/*/*.svg*
%{_datadir}/man/man1/*.1.gz


%changelog
* Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.0-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Wed Nov 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.2-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-1
- new upstream release
- add Patch0 (gnome-color-manager-3.14.0-cd-pixel-format.patch)

* Sun Apr 13 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sun Mar 30 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.0-1
- new upstream release

* Wed Dec 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-2
- rebuild with exiv2-0.24

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release

* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-1
- new upstream release

* Fri Jan 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- change BuildRequires: colord-gtk-devel instead of colord-devel
- add BuildRequires: yelp-tools

* Sun Jul 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-2
- rebuild with exiv2-0.23

* Sun May 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
- new upstream release

* Mon May 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.0-2
- rebuild with exiv2-0.22

* Sun Apr 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.0-1
- new upstream release

* Sat Jan 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.2-1
- new upstream release

* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.92-1
- new upstream release
- add BuildRequires: clutter-gtk-devel, libmash-devel, gnome-common

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.90-1
- new upstream release

* Wed Aug 31 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.2-2
- rebuild with exiv2-0.21.1

* Tue Aug 16 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.2-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: gnome-desktop3-devel instead of gnome-desktop-devel
- change BuildRequires: libcanberra-gtk3-devel instead of libcanberra-devel
- change BuildRequires: unique3-devel instead of unique-devel
- change BuildRequires: vte3-devel instead of vte-devel
- add BuildRequires: lcms2-devel, gnome-settings-daemon-devel, libusb1-devel, control-center-devel, exiv2-devel, colord-devel
- remove -libs and -devel sub package

* Mon Oct 04 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release

* Mon Jun 21 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2-1
- new upstream release

* Sat May 15 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1-1
- Initial build for Vine Linux


* Fri Apr  2 2010 Matthias Clasen <mclasen@redhat.com> 2.30.0-4
- BR GConf to make the macros work
- Modernize icon cache handling

* Wed Mar 31 2010 Richard Hughes <richard@hughsie.com> 2.30.0-3
- Fix up a scriptlet problem.
- Resolves: #578611

* Mon Mar 29 2010 Richard Hughes <richard@hughsie.com> 2.30.0-2
- Add libnotify BR.

* Mon Mar 29 2010 Richard Hughes <richard@hughsie.com> 2.30.0-1
- New upstream release.

* Tue Mar 09 2010 Richard Hughes <richard@hughsie.com> 2.29.4-2
- Update to the latest version of the Fedora Packaging Guidelines
- Remove the custom BuildRoot
- Do not clean the buildroot before install
- Use the gconf_schema defines for the GConf schemas
- Remove some over-zealous Requires that are already picked up by rpm.
- Resolves #571658

* Mon Mar 01 2010 Richard Hughes <richard@hughsie.com> 2.29.4-1
- New upstream release.

* Mon Feb 22 2010 Richard Hughes <richard@hughsie.com> 2.29.4-0.1.20100222
- Another new snapshot from upstream with lots of bugs fixed from the Fedora
  test day.

* Thu Feb 18 2010 Richard Hughes <richard@hughsie.com> 2.29.4-0.1.20100218
- Another new snapshot from upstream for the Fedora test day.

* Wed Feb 17 2010 Richard Hughes <richard@hughsie.com> 2.29.4-0.1.20100217
- New snapshot from upstream for the Fedora test day.

* Mon Feb 01 2010 Richard Hughes <richard@hughsie.com> 2.29.3-1
- New upstream release.

* Mon Jan 18 2010 Matthias Clasen <mclasen@redhat.com> 2.29.2-3
- Rebuild against new gnome-desktop

* Mon Jan 04 2010 Richard Hughes <richard@hughsie.com> 2.29.2-2
- Rebuild, hopefully koji has now a working glibc.

* Mon Jan 04 2010 Richard Hughes <richard@hughsie.com> 2.29.2-1
- New upstream release.

* Fri Dec 04 2009 Richard Hughes <richard@hughsie.com> 2.29.1-1
- Initial spec for review.

