%global     theme_name      Zuki
%global     shell_name      Zuki-shell
%global     author          lassekongo83
%global     commit          9652d571724454425903ba97bd90cfc2e690e89f
%global     githash         %(c=%{commit}; echo ${c:0:7})
%global     gitdate         20180805
%global     gittime         1830
%global     pkgname         zuki-gtk-themes

Name:           zuki-gtk-themes
Version:        3.28.2
Release:        1.%{gitdate}%{gittime}git%{githash}%{?dist}
Summary:        Themes for GTK+2, GTK+3, Metacity, GNOME Shell and Xfwm4
Group:          User Interface/Desktops

License:        GPLv3
URL:            https://github.com/lassekongo83/zuki-themes
Source0:        https://github.com/lassekongo83/zuki-themes/archive/%{commit}/%{pkgname}-v%{version}-%{githash}.tar.gz

Provides:       zukitwo-gtk-theme = %{version}
Provides:       zukitre-gtk-theme = %{version}

BuildArch:      noarch
Obsoletes:      zukitre-gtk-theme <= 20160410
Obsoletes:      zukitwo-gtk-theme <= 20160410

%description
The %{theme_name} themes for GTK+2, GTK+3, Metacity, GNOME Shell and Xfwm4,
created by %{author}.

%package common
Summary:        Files common to %{theme_name} themes
Group:          User Interface/Desktops
Obsoletes:      zukitwo-gtk-theme-common <= 20160410
Obsoletes:      zukitre-gtk-theme-common <= 20160410

%description common
Files which are common to all %{theme_name} themes.

%package gtk2
Summary:        %{theme_name} GTK+2 themes
Group:          User Interface/Desktops
Requires:       %{name}-common = %{version}-%{release}, gtk-murrine-engine >= 0.98.1.1, gtk2-engines
Obsoletes:      zukitwo-gtk-theme-gtk2 <= 20160410
Obsoletes:      zukitre-gtk-theme-gtk2 <= 20160410

%description gtk2
Themes for GTK+2 as part of the %{theme_name} theme.

%package gtk3
Summary:        %{theme_name} GTK+3 themes
Group:          User Interface/Desktops
Requires:       %{name}-common = %{version}-%{release}
Obsoletes:      zukitwo-gtk-theme-gtk3 <= 20160410
Obsoletes:      zukitre-gtk-theme-gtk3 <= 20160410

%description gtk3
Themes for GTK+3 as part of the %{theme_name} theme.

%package -n gnome-shell-theme-zuki
Summary:        %{theme_name} GNOME Shell theme
Group:          User Interface/Desktops
Requires:       %{name}-common = %{version}-%{release}, gnome-shell-extension-user-theme >= 3.14, google-roboto-fonts
Obsoletes:      gnome-shell-theme-zukitwo <= 20160410
Obsoletes:      gnome-shell-theme-zukitre <= 20160410

%description -n gnome-shell-theme-zuki
%{theme_name} GNOME Shell theme.

%package metacity
Summary:        %{theme_name} metacity themes
Group:          User Interface/Desktops
Requires:       %{name}-common = %{version}-%{release}, metacity
Obsoletes:      zukitwo-gtk-theme-metacity <= 20160410
Obsoletes:      zukitre-gtk-theme-metacity <= 20160410

%description metacity
Themes for metacity as part of the %{theme_name} theme.

%package xfwm4
Summary:        %{theme_name} Xfwm4 themes
Group:          User Interface/Desktops
Requires:       %{name}-common = %{version}-%{release}, xfwm4
Obsoletes:      zukitwo-gtk-theme-xfwm4 <= 20160410
Obsoletes:      zukitre-gtk-theme-xfwm4 <= 20160410

%description xfwm4
Themes for Xfwm4 as part of the %{theme_name} theme.

%prep
%setup -q -n zuki-themes-%{commit}
find . -name Thumbs.db -type f -exec rm -f '{}' \;
rm Zukitwo/index.theme
rm Zukitre/index.theme
rm -rf Zukitwo/unity
rm -rf Zukitre/unity

%build
# Nothing to build

%install
mkdir -p -m755 %{buildroot}%{_datadir}/themes/Zukitwo
cp -pr Zukitwo/* %{buildroot}%{_datadir}/themes/Zukitwo
mkdir -p -m755 %{buildroot}%{_datadir}/themes/Zukitre
cp -pr Zukitre/* %{buildroot}%{_datadir}/themes/Zukitre
mkdir -p -m755 %{buildroot}%{_datadir}/themes/%{theme_name}/gnome-shell
cp -pr %{shell_name}/gnome-shell/* %{buildroot}%{_datadir}/themes/%{theme_name}/gnome-shell


%files common
%doc README.md
%license LICENSE
%dir %{_datadir}/themes/Zukitwo/
%dir %{_datadir}/themes/Zukitre/
%dir %{_datadir}/themes/%{theme_name}/

%files gtk2
%{_datadir}/themes/Zukitwo/gtk-2.0/
%{_datadir}/themes/Zukitre/gtk-2.0/

%files gtk3
%{_datadir}/themes/Zukitwo/gtk-3.0/
%{_datadir}/themes/Zukitre/gtk-3.0/

%files -n gnome-shell-theme-zuki
%{_datadir}/themes/%{theme_name}/gnome-shell/

%files metacity
%{_datadir}/themes/Zukitwo/metacity-1/

%files xfwm4
%{_datadir}/themes/Zukitwo/xfwm4/
%{_datadir}/themes/Zukitre/xfwm4/

%changelog
* Fri Mar 13 2015 Heiko Adams <heiko.adams@gmail.com> - 20150313-1
- Initial package