%define major_ver 1.20
%define ver %{major_ver}.2
%define rel 1

Summary:	The Control Center for MATE
Name:		mate-control-center
Version:	%{ver}
Release:	%{rel}%{?_dist_release}

Source0:	http://pub.mate-desktop.org/releases/%{major_ver}/%{name}-%{version}.tar.xz

# Vine patch
Patch1001:		mate-control-center-1.14.0-accountsservice.patch

License:	GPLv2
Group:		User Interface/Desktops
URL:		http://mate-desktop.org/

BuildRequires:	mate-common
BuildRequires:	mate-desktop-devel >= 1.17.0
BuildRequires:	mate-menus-devel
BuildRequires:	marco-devel
BuildRequires:	mate-settings-daemon-devel
BuildRequires:	libmatekbd-devel
BuildRequires:	libxklavier-devel >= 5.2
BuildRequires:	librsvg2-devel
BuildRequires:	gtk3-devel >= 3.14
BuildRequires:	dconf-devel
BuildRequires:	libxml2-devel
BuildRequires:	libSM-devel
BuildRequires:	libXScrnSaver-devel
BuildRequires:	libXext-devel
BuildRequires:	libXxf86misc-devel
BuildRequires:	libcanberra-gtk3-devel
BuildRequires:	dbus-glib-devel
BuildRequires:	accountsservice-devel
BuildRequires:	yelp-tools
BuildRequires:	desktop-file-utils
BuildRequires:	gtk-doc
BuildRequires:	itstool
BuildRequires:	autoconf
BuildRequires:	automake

Requires: gsettings-desktop-schemas
Requires: accountsservice

Requires(posttrans,postun):	glib2
Requires(post,postun):	desktop-file-utils

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

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi, iwaim


%description
The control center is MATE's main interface for configuration of various
aspects of your desktop.


%package	devel
Summary:        Development tools for mate-control-center
Summary(ja):    mate-control-center の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       gtk2-devel
Requires:       librsvg2-devel
Requires:       pkgconfig

%description	devel
Header files and libraries for building a extension library for the
mate-control-center.


%prep
%setup -q
%patch1001 -p1 -b .accountsservice

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
	--disable-static \
	--disable-update-mimedb

%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}

%{__make} install DESTDIR=${RPM_BUILD_ROOT}

find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} \;
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

%{__rm} -f ${RPM_BUILD_ROOT}%{_datadir}/applications/mimeinfo.cache

%find_lang %{name}


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

%post
/sbin/ldconfig
update-desktop-database %{_datadir}/applications >& /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:

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

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_sysconfdir}/xdg/menus/matecc.menu
%{_bindir}/mate-about-me
%{_bindir}/mate-appearance-properties
%{_bindir}/mate-at-properties
%{_bindir}/mate-control-center
%{_bindir}/mate-default-applications-properties
%{_bindir}/mate-display-properties
%{_bindir}/mate-font-viewer
%{_bindir}/mate-keybinding-properties
%{_bindir}/mate-keyboard-properties
%{_bindir}/mate-mouse-properties
%{_bindir}/mate-network-properties
%{_bindir}/mate-thumbnail-font
%{_bindir}/mate-typing-monitor
%{_bindir}/mate-window-properties
%{_libdir}/libmate-window-settings.so.*
%{_libdir}/libmate-slab.so.*
%{_libdir}/window-manager-settings/libmarco.so
%{_sbindir}/mate-display-properties-install-systemwide
%{_datadir}/applications/*.desktop
%{_datadir}/desktop-directories/matecc.directory
%{_datadir}/glib-2.0/schemas/org.mate.control-center.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.control-center.keybinding.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
#%{_datadir}/mate/cursor-fonts/*
%{_datadir}/help/*
%{_datadir}/%{name}
%{_datadir}/mime/packages/mate-theme-package.xml
%{_datadir}/polkit-1/actions/org.mate.randr.policy
%{_datadir}/thumbnailers/mate-font-viewer.thumbnailer
%{_mandir}/man1/mate-about-me.1.gz
%{_mandir}/man1/mate-appearance-properties.1.gz
%{_mandir}/man1/mate-at-properties.1.gz
%{_mandir}/man1/mate-control-center.1.gz
%{_mandir}/man1/mate-default-applications-properties.1.gz
%{_mandir}/man1/mate-display-properties-install-systemwide.1.gz
%{_mandir}/man1/mate-display-properties.1.gz
%{_mandir}/man1/mate-font-viewer.1.gz
%{_mandir}/man1/mate-keybinding-properties.1.gz
%{_mandir}/man1/mate-keyboard-properties.1.gz
%{_mandir}/man1/mate-mouse-properties.1.gz
%{_mandir}/man1/mate-network-properties.1.gz
%{_mandir}/man1/mate-thumbnail-font.1.gz
%{_mandir}/man1/mate-typing-monitor.1.gz
%{_mandir}/man1/mate-window-properties.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/mate-window-settings-2.0
%{_includedir}/libmate-slab
%{_libdir}/libmate-window-settings.so
%{_libdir}/libmate-slab.so
%{_libdir}/pkgconfig/mate-default-applications.pc
%{_libdir}/pkgconfig/mate-keybindings.pc
%{_libdir}/pkgconfig/mate-slab.pc
%{_libdir}/pkgconfig/mate-window-settings-2.0.pc


%changelog
* Sun May 20 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.20.2-1
- update to 1.20.2

* Wed Jan 17 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.2-1
- update to 1.18.2-1

* Sat Apr  8 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.1-1
- update to 1.18.1
- move to GTK3+
- add BuildRequires: libxklavier-devel, dbus-glib-devel
- drop BuildRequires
 - mate-doc-utils
 - unique-devel
- drop cursor fonts; upstream dropped

* Sun Mar 26 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.16.1-1
- update to 1.16.1

* Sun Nov 27 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 1.16.0-1
- new upstream release
- update Packager

* Sun May 08 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.0-1
- new upstream release
- update Patch1001 (mate-control-center-1.14.0-accountsservice.patch)

* Sun Jan 10 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-2
- add BuildRequires: accountsservice-devel, yelp-tools
- add Patch1001 (mate-control-center-1.12.1-accountsservice.patch)

* Sat Dec 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-1
- new upstream release
- remove Patch1000 (mate-control-center-1.10.1-ja.po.patch)

* Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.0-1
- new upstream release

* Sat Oct 10 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.2-1
- new upstream release

* Sun Jul 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.1-1
- new upstream release
- update Patch1000 (mate-control-center-1.10.1-ja.po.patch)

* Sat Jun 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-2
- add Requires: gsettings-desktop-schemas
- add Patch1000 (mate-control-center-1.10.0-ja.po.patch)

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release

* Sun Feb 08 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.3-2
- add BuildRequires: librsvg2-devel
- add Requires: gtk2-devel, librsvg2-devel (-devel subpackage)

* Wed Nov 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.3-1
- new upstream release
- change BuildRequires: marco-devel instead of mate-window-manager-devel

* Sun Sep 21 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.2-1
- new upstream release

* Tue Apr 15 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-1
- new upstream release
- add BuildRequires: itstool

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-2
- rebuild with VineSeed environment

* Sun Sep 22 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.0-1
- new upstream release
- remove BuildRequires: mate-conf-devel
- remove Patch0 (mate-control-center-1.2.1-configure.patch)
- add BuildRequires: dconf-devel

* Wed Aug 01 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release

* Sat May 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.1-1
- new upstream release
- add Patch0 (mate-control-center-1.2.1-configure.patch)

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-2
- change category

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-1
- initial build for Vine Linux

