File kbfx.spec of Package kbfx

#
# spec file for package kbfx
#
# Copyright 2009 Buschmann <buschmann23@opensuse.org>
# Copyright (c) 2010, 2011, 2012, 2013 Kyrill Detinov
#
# 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.
#

%define _prefix /opt/kde3

Name:           kbfx
Version:        0.4.9.3.1
Release:        0
License:        GPL-2.0
Summary:        Alternative KDE3 Application Launcher
Url:            http://www.kbfx.net
Group:          System/GUI/KDE
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM kbfx-0.4.9.3.1-gcc45.patch lazy.kent@opensuse.org -- fix build with GCC 4.5
Patch0:         kbfx-0.4.9.3.1-gcc45.patch
BuildRequires:  GraphicsMagick
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  kdelibs3-devel
Requires:       kdebase3
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
KBFX is an alternative to the classical K-Menu button and it's menu. It
improves the user experience by enabling the user to set a bigger (and
thus more visible) start button and by finally replacing the Win95-like
K-Menu. But if you still want the old menu, because you're used to it, it
is still available as an option in KBFX. We recommend, however, that you
give the Spinx bar a try.

%package devel
Summary:        Header Files for KBFX Menu
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}

%description devel
Header Files for the alternative KDE3 application launcher KBFX.

%prep
%setup -q
%if 0%{?suse_version} > 1120
%patch -P 0
%endif
## desktop file missing semicolon at end of mime type line
sed -i '/x-kbfxtheme/s/$/;/' configdialog/kbfx_theme.desktop
## icon file with wrong size
gm mogrify -strip -resize 128 images/hi128-app-kbfx.png
%build
export CFLAGS="%{optflags} -Wl,--add-needed"
export CXXFLAGS="%{optflags} -Wl,--add-needed"
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_SKIP_RPATH:BOOL=ON

%install
pushd build
make %{?_smp_mflags} DESTDIR=%{buildroot} install VERBOSE=1
popd
install -d %{buildroot}%{_docdir}/%{name}/
mv %{buildroot}%{_datadir}/doc/%{name}-%{version}/* %{buildroot}%{_docdir}/%{name}/
rm -f %{buildroot}%{_libdir}/libkbfx*.la
%fdupes -s %{buildroot}%{_datadir}/apps/kbfx/skins/
%find_lang kbfxconfigapp

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f kbfxconfigapp.lang
%defattr(-,root,root,-)
%{_bindir}/kbfxconfigapp
%{_datadir}/apps/%{name}/
%{_datadir}/applications/kde/*.desktop
%{_datadir}/apps/kbfxconfigapp/
%{_datadir}/apps/kicker/
%{_datadir}/apps/konqueror/
%doc %{_datadir}/doc/HTML/en/common/*.jpg
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/mimelnk/application/x-kbfxtheme.desktop
%doc %{_docdir}/%{name}/
%{_libdir}/%{name}/
%{_libdir}/kde3/libkbfxspinx.*
%{_libdir}/libkbfx*

%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}/

%changelog
openSUSE Build Service is sponsored by