File awesome-copycats-themes.spec of Package awesome-copycats-themes

#
# spec file for package awesome-copycats-themes
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define  _name  awesome
Name:           awesome-copycats-themes
Version:        @service@
Release:        0
License:        CC-BY-NC-SA-4.0
Summary:        Power themes for Awesome WM 4.0+
Url:            https://github.com/copycat-killer/awesome-copycats
Group:          System/GUI/Other
Source:         awesome-copycats-%{version}.tar.xz
BuildRequires:  fdupes
Requires:       awesome >= 4.0
Requires:       awesome-freedesktop
Requires:       awesome-lain
Recommends:     rxvt-unicode
Recommends:     unclutter
Recommends:     xsel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
A set of themes with the aim of making Awesome appearance awesome too!
Notable features:
 * Autohide widgets (tell me only when you have to)
 * Autostart applications
 * Fast MPD and volume shortcuts (first time this trick has been used in Awesome)
 * Other shortcuts for copying to the clipboard (no need for clipboard managers),
   toggle wiboxes, widgets popups, screenshots capture, moving and magnifying clients
 * Quake drop-down terminal
 * Calendar with current day highlighted and months switch with a click/scroll
 * Notifications for new mails, current song, volume level, hdd critical state, low battery
 * OpenWeatherMap integration
 * Net carrier status notifier
 * Colorful autoupdating icons
 * Symbolic tag names
 * TXT layoutbox
 * PNG wibox bar
 * Custom layouts
 * No borders when there's only one visible client
 * Freedesktop.org compliant menu and desktop icons
 * Vi-like client focus
 * Non-empty tag browsing
 * Dynamic client borders (colors change along with processes status)
 * Dynamic useless gaps
 * Dynamic tagging

%package -n awesome-branding-copycats
Summary:        Upstream Branding for awesome
Group:          System/GUI/Other
Requires:       awesome-copycats-themes = %{version}-%{release}
Supplements:    packageand(%{_name}:branding-copycats)
Conflicts:      otherproviders(%{_name}-branding)
Provides:       %{_name}-branding = %{version}
BuildArch:      noarch

%description -n awesome-branding-copycats
This package provides the upstream look and feel for awesome.

%prep
%setup -q -n awesome-copycats-%{version}
sed -i "s/\"\(Tamzen\)/\"Misc \1/g;s/'\(Tamzen\)/'Misc \1/g" themes/copland/theme.lua
sed -i 's/HOME.*config/XDG_DATA_DIRS") .. "/' themes/*/theme.lua
sed -i 's/\.config\///;s/HOME/XDG_DATA_DIRS/' rc.lua.template
sed -i '/local chosen_theme/s/\[.*\]/\[7\]/' rc.lua.template

%build

%install
install -dm 0755 %{buildroot}%{_sysconfdir}/xdg/%{_name}
install -Dm 0644 rc.lua.template %{buildroot}%{_sysconfdir}/xdg/%{_name}/rc.lua
install -dm 0755 %{buildroot}%{_datadir}/%{_name}
cp -a themes %{buildroot}%{_datadir}/%{_name}/
install -dm 0755 %{buildroot}%{_datadir}/%{_name}/lib/themes/powerarrow
mv %{buildroot}%{_datadir}/%{_name}/themes/powerarrow/binclock.lua %{buildroot}%{_datadir}/%{_name}/lib/themes/powerarrow/
%fdupes %{buildroot}%{_datadir}/%{_name}/themes

%files
%defattr(0644,root,root,0755)
%doc README.rst
%dir %{_datadir}/%{_name}
%{_datadir}/%{_name}/themes
%dir %{_datadir}/%{_name}/lib
%dir %{_datadir}/%{_name}/lib/themes
%dir %{_datadir}/%{_name}/lib/themes/powerarrow
%{_datadir}/%{_name}/lib/themes/powerarrow/binclock.lua

%files -n awesome-branding-copycats
%defattr(-,root,root)
%dir %{_sysconfdir}/xdg
%dir %{_sysconfdir}/xdg/%{_name}
%config(noreplace) %{_sysconfdir}/xdg/%{_name}/rc.lua

%changelog
openSUSE Build Service is sponsored by