File xfce-theme-manager.spec of Package xfce-theme-manager

#
# spec file for package xfce-theme-manager
#
# Copyright (c) 2017 SUSE LINUX 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/
#


Name:           xfce-theme-manager
Version:        0.3.8
Release:        0
Summary:        Xfce Theme Manager
License:        GPL-2.0+
Group:          System/GUI/XFCE
Url:            http://khapplications.darktech.org/pages/apps.html#themeed
Source0:        Xfce-Theme-Manager-%{version}.tar.gz
BuildRequires:  ImageMagick
BuildRequires:  autoconf
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  unzip
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libxfce4ui-1)
BuildRequires:  pkgconfig(xcursor)
Recommends:     unzip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Theme manager allowing easy configuration of themes, window borders,
controls, icons and cursors for Xfce.

%prep
%setup -q -n Xfce-Theme-Manager-%{version}
chmod -x Xfce-Theme-Manager/resources/scripts/*

%build
%configure
make %{?_smp_mflags} CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"

%install
%make_install

# Remove installed docs and a pixmap.
rm -rf \
    %{buildroot}%{_datadir}/Xfce-Theme-Manager/ \
    %{buildroot}%{_datadir}/pixmaps/%{name}.png

# Install icons of various sizes into icons/hicolor.
install -Dpm 0644 Xfce-Theme-Manager/resources/pixmaps/%{name}.png \
    %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
for size in 128x128 96x96 64x64 48x48 32x32 22x22 16x16 ; do
    install -dm 0755 \
        %{buildroot}%{_datadir}/icons/hicolor/${size}/apps/
    convert -strip -resize ${size} \
        Xfce-Theme-Manager/resources/pixmaps/%{name}.png \
        %{buildroot}%{_datadir}/icons/hicolor/${size}/apps/%{name}.png
done

%suse_update_desktop_file -G 'Xfce Theme Manager' Xfce-Theme-Manager

%post
%icon_theme_cache_post

%postun
%icon_theme_cache_postun

%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING README Xfce-Theme-Manager/resources/scripts/
%{_bindir}/%{name}
%{_datadir}/applications/Xfce-Theme-Manager.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.*
%{_mandir}/man?/*
%doc %lang(de) %{_mandir}/de/man1/%{name}.*
%doc %lang(es) %{_mandir}/es/man1/%{name}.*
%doc %lang(fr) %{_mandir}/fr/man1/%{name}.*
%doc %lang(pl) %{_mandir}/pl/man1/%{name}.*

%changelog
openSUSE Build Service is sponsored by