%define glib2_version 2.48.0
%define pango_version 1.40.0
%define gtk3_version 3.22.0
%define startup_notification_version 0.10

%define po_package gnome-desktop-3.0

Summary: Package containing code shared among gnome-shell, gnome-session, nautilus, etc.
Summary(ja): gnome-shell, gnome-session, nautilus などの共用プログラム
Name: gnome-desktop3
Version: 3.30.2
Release: 1%{?_dist_release}
URL: http://www.gnome.org/
Source0: http://ftp.gnome.org/pub/GNOME/sources/gnome-desktop/3.20/gnome-desktop-%{version}.tar.xz
Source1: ja.po
License: GPL 
Group: User Interface/Desktops

Vendor: Project Vine
Distribution: Vine Linux

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

Patch0:		0001-datetime-format.patch
Patch1:		0002-fix-timezone-config.patch

# Requires for Vine
Requires: gnome-icon-theme-symbolic
Requires: gnome-themes-extra
Requires: vine-themes
Requires: gsettings-desktop-schemas

Obsoletes: gnome-core gnome-core-devel
Provides: gnome-core

Obsoletes: gnome-panel < 3.8.0
Obsoletes: gnome-panel-libs < 3.8.0
Obsoletes: gnome-applets < 3.6.0

BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: pango-devel >= %{pango_version}
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: startup-notification-devel >= %{startup_notification_version}
BuildRequires: gsettings-desktop-schemas-devel
BuildRequires: libXrandr-devel
BuildRequires: libxkbfile-devel
BuildRequires: xkeyboard-config
BuildRequires: autoconf, automake
BuildRequires: yelp-tools
BuildRequires: docbook-utils
BuildRequires: iso-codes
BuildRequires: libseccomp-devel

%description

The gnome-desktop package contains an internal library
(libgnomedesktop3) used to implement some portions of the GNOME
desktop, and also some data files and other shared components of the
GNOME user environment.


%package devel
Summary: Libraries and headers for libgnome-desktop
Summary(ja): libgnome-desktop の開発用ライブラリおよびヘッダファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

Requires: glib2-devel >= %{glib2_version}
Requires: gtk3-devel >= %{gtk3_version}
Requires: startup-notification-devel >= %{startup_notification_version}

Obsoletes: gnome-panel-devel < 3.8.0

%description devel

Libraries and header files for the GNOME-internal private library 
libgnomedesktop


%package        docs
Summary:        Documentation for %{name}
Summary(ja):    %{name} 用のドキュメント
Group:          Documentation
BuildArch:		noarch
Requires:       %{name} = %{version}-%{release}

%description    docs
This package contains documentation for %{name}.


%prep
%autosetup -p1 -n gnome-desktop-%{version}
cp -f %{SOURCE1} po/

%build
%configure --with-gnome-distributor="Project Vine" --disable-scrollkeeper
make %{?_smp_mflags}
pushd po
msgfmt ja.po -o ja.gmo
popd


%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a

%find_lang %{po_package}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files -f %{po_package}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/lib*.so.*
%{_libdir}/girepository-1.0/GnomeDesktop-3.0.typelib
%{_libexecdir}/gnome-rr-debug
%{_datadir}/gnome/*
%{_datadir}/help/*/*/*

%files devel
%defattr(-,root,root,-)
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*
%{_datadir}/gir-1.0/GnomeDesktop-3.0.gir

%files docs
%defattr(-,root,root,-)
%{_datadir}/gtk-doc

%changelog
* Fri Dec 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.30.2-1
- new upstream release.
- updated Patch0.
- updated ja.po.

* Sun Jul 17 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.20.2-1
- new upstream release

* Fri Nov 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.2-1
- new upstream release

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

* Sun Jul 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.2-2
- remove Requires: ibus-gtk3, gnome-themes

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

* Sun Apr 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.1-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 Nov 16 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-1
- new upstream release
- add Patch0 (gnome-desktop-3.14.1-date-time-format.patch)

* Wed Jul 16 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 3.12.2-2
- add R: vine-themes

* Wed May 14 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-1
- new upstream release

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

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

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.2-2
- rebuild with VineSeed environment

* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.2-1
- new upstream release

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

* Fri Sep 06 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.4-1
- new upstream release

* Sun Jun 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.3-1
- new upstream release

* Sat May 18 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
- add BuildRequires: iso-codes
- add Obsoletes: gnome-panel, gnome-panel-libs, gnome-applets

* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-1
- new upstream release
- remove Patch0 (gnome-desktop-3.6.1-ja.po.patch)

* Fri Oct 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-2
- update Patch0 (gnome-desktop-3.6.1-ja.po.patch)

* Wed Oct 10 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Wed Oct 10 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0.1-2
- add Patch0 (gnome-desktop-3.6.0.1-ja.po.patch)

* Wed Oct 03 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0.1-1
- new upstream release
- add BuildRequires: libxkbfile-devel, xkeyboard-config
- change BuildRequires: yelp-tools instead of gnome-doc-utils

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

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release
- change BuildRequires: gsettings-desktop-schemas-devel instead of gsettings-desktop-schemas

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

* Wed Sep 28 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

* Sun Sep 18 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.91-1
- new upstream release

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

* Sun Aug 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.5-1
- new upstream release

* Thu Aug 18 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-1
- initial build for Vine Linux
