Blob Blame History Raw
%global common_configure --disable-unity --srcdir=..

%global common_desc							\
Arc is a flat theme with transparent elements for GTK 3, GTK 2 and	\
Gnome-Shell which supports GTK 3 and GTK 2 based desktop environments	\
like Gnome, Cinnamon, Budgie, Pantheon, XFCE, Mate, etc.


Name:		arc-theme
Version:	20170302
Release:	4%{?dist}
Summary:	Flat theme with transparent elements

License:	GPLv3+
URL:		https://github.com/horst3180/%{name}
Source0:	%{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0:		%{url}/pull/788.patch#/remove_margin_auto.patch
Patch1:     fix-OSD.patch

BuildArch:	noarch

BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	fdupes
BuildRequires:	gtk3-devel

Requires:	filesystem
Requires:	gnome-themes-standard
Requires:	gtk-murrine-engine

%description
%{common_desc}


%package plank
Summary:	Arc-theme for Plank dock

Requires:	%{name}	== %{version}-%{release}
Requires:	plank

Supplements:	(%{name} and plank)

%description plank
%{common_desc}

This package contains the %{summary}.


%prep
%autosetup -p 1
%{_bindir}/autoreconf -fiv


%build
%{__mkdir} -p regular solid
pushd regular
%{__ln_s} -f ../configure configure
%configure %{common_configure}
%make_build
popd
pushd solid
%{__ln_s} -f ../configure configure
%configure --disable-transparency %{common_configure}
%make_build
popd


%install
pushd solid
%make_install

# Rename solid theme-variant.
for d in '' -Dark -Darker ; do
	dir="%{buildroot}%{_datadir}/themes/Arc${d}"
	file="%{buildroot}%{_datadir}/themes/Arc${d}/index.theme"
	%{__sed} -e"s!Arc${d}!&-solid!g"		\
		-e's! with transparent elements!!g'	\
		< ${file} > ${file}.new
	/bin/touch -r ${file} ${file}.new
	%{__mv} -f ${file}.new ${file}
	%{__mv} -f ${dir} ${dir}-solid
done
popd
pushd regular
%make_install
popd

# Install Plank-theme.
%{__mkdir} -p %{buildroot}/%{_datadir}/plank/themes/Arc
%{__install} -pm 0644 extra/Arc-Plank/dock.theme	\
	%{buildroot}/%{_datadir}/plank/themes/Arc

# Link duplicate files.
%fdupes -s %{buildroot}%{_datadir}


%files
%license AUTHORS COPYING
%doc README.md
%{_datadir}/themes/*

%files plank
%{_datadir}/plank/themes/*


%changelog
* Thu Jun 15 2017 Leigh Scott <leigh123linux@googlemail.com> - 20170302-4
- Add patch to fix OSD

* Sun May 28 2017 Leigh Scott <leigh123linux@googlemail.com> - 20170302-3
- remove margin:auto as it's not supported

* Mon May 01 2017 Björn Esser <besser82@fedoraproject.org> - 20170302-2
- Add Supplements: (%%{name} and plank) for Plank-theme addon-package

* Fri Mar 03 2017 Björn Esser <besser82@fedoraproject.org> - 20170302-1
- New upstream release (rhbz#1428616)

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20161119-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Sun Jan 29 2017 Björn Esser <besser82@fedoraproject.org> - 20161119-3
- Build a 'solid'-version of the theme, too (rhbz#1415364)
- Symlink all duplicate files to save disk-space

* Sun Jan 29 2017 Björn Esser <besser82@fedoraproject.org> - 20161119-2
- Add Patch0: fix missing gradient warning

* Tue Jan 10 2017 Björn Esser <bjoern.esser@gmail.com> - 20161119-1
- Initial rpm-release (rhbz#1411438)

* Mon Jan 09 2017 Björn Esser <bjoern.esser@gmail.com> - 20161119-0.2
- Add plank-subpkg and require Plank (rhbz#1411438)

* Mon Jan 09 2017 Björn Esser <bjoern.esser@gmail.com> - 20161119-0.1
- Initial package (rhbz#1411438)