File bmpanel2.spec of Package bmpanel2

# vim: set sw=4 ts=4 et nu:
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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/

%{!?python_sitelib:  %global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

Name:               bmpanel2
Version:            2.0.99+pre1
%define pkg_version 2.1pre1
Release:            0
Summary:            NETWM Compliant Panel for X
Source:             http://bmpanel2.googlecode.com/files/bmpanel2-%{pkg_version}.tar.gz
URL:                http://code.google.com/p/bmpanel2/
Group:              System/X11/Utilities
License:            MIT
BuildRoot:          %{_tmppath}/build-%{name}-%{version}
BuildRequires:      cmake
BuildRequires:      cairo-devel
BuildRequires:      pango-devel
BuildRequires:      glib2-devel
%if 0%{?suse_version} > 1210
BuildRequires:      libXext-devel
%endif
%if 0%{?suse_version} < 1 || 0%{?suse_version} >= 1020
BuildRequires:      xorg-x11-libXext-devel
%endif
BuildRequires:      gcc-c++ make glibc-devel pkgconfig
BuildRequires:      fdupes
BuildRequires:      python-devel

%description
Nice NETWM-compatible panel for X11.

Features:
* Look'n'feel customization via themes (see ThemeGallery)
* A bunch of widgets: desktop switcher, taskbar, launchbar, systray, clock,
  decor, empty
* Pseudo-transparency support
* Written in C with speed and clarity in mind
* Small number of dependencies, briefly: glib2, cairo, pango, libX11
* Small memory footprint (about 2-4 megabytes)

%prep
%setup -q -n "%{name}-%{pkg_version}"

%build
%__install -d build
pushd build
OPTFLAGS="%{optflags}" \
cmake \
    -DCMAKE_VERBOSE_MAKEFILE=TRUE \
    -DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \
    -DCMAKE_SKIP_RPATH=TRUE \
    -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
    -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
    -DCMAKE_BUILD_TYPE=release \
    -DCMAKE_STRIP="/usr/bin/touch" \
    ..

%__make %{?_smp_mflags}
popd
%install
pushd build
%makeinstall
popd

fdupes -s "%{_datadir}/bmpanel2/themes"

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-,root,root)
%doc WMs.txt COPYING
%doc extra/*.vim
%{_bindir}/bmpanel2
%{_bindir}/bmpanel2cfg
%dir %{_datadir}/bmpanel2
%dir %{_datadir}/bmpanel2/themes
%{_datadir}/bmpanel2/themes/*
%{python_sitelib}/bmpanel2.py*
%{python_sitelib}/bmpanel2cfg-1.0-py%{py_ver}.egg-info

%changelog
openSUSE Build Service is sponsored by