File compton.spec of Package compton

#
# spec file for package compton
#
# 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:           compton
Version:        0.1_beta2
Release:        0
Summary:        A compositor for X11
License:        MIT
Group:          System/X11/Utilities
URL:            https://github.com/chjj/compton
Source:         %{name}-%{version}.tar.xz
BuildRequires:  asciidoc
BuildRequires:  gcc-c++
BuildRequires:  git
BuildRequires:  hicolor-icon-theme
BuildRequires:  libxslt-tools
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(libconfig)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libpcre)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcomposite)
BuildRequires:  pkgconfig(xdamage)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xrender)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Compton was forked from Dana Jansens' fork of xcompmgr and refactored. I fixed
whatever bug I found, and added features I wanted. Things seem stable, but
don't quote me on it. I will most likely be actively working on this until I
get the features I want. This is also a learning experience for me. That is,
I'm partially doing this out of a desire to learn Xlib.

%prep
%setup -q

%build
# Extract the snapshot somewhere...
# Export the COMPTON_VERSION variable (you may also pass it to make directly)
export COMPTON_VERSION=%{version}
export CFLAGS="%{optflags}"
make %{?_smp_mflags}
make %{?_smp_mflags} docs

%install
sed -i '/GenericName/d' %{name}.desktop
%suse_update_desktop_file -N "Compton" -G "A compositor for X11" %{name} "DesktopUtility"
%make_install
install -Dm 0644 %{name}.sample.conf %{buildroot}%{_sysconfdir}/xdg/%{name}.conf

%post
%icon_theme_cache_post

%postun
%icon_theme_cache_postun

%files
%doc README.md LICENSE
%config %{_sysconfdir}/xdg/%{name}.conf
%{_datadir}/applications/%{name}.desktop
%{_bindir}/%{name}*
%{_mandir}/man?/%{name}*%{ext_man}
%{_datadir}/icons/hicolor/*/apps/%{name}.??g

%changelog