File flamerobin.spec of Package flamerobin

#
# spec file for package flamerobin
#
# Copyright (c) 2015 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/
#


%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
Name:           flamerobin
Version:        0.9.2
Release:        0
Summary:        Graphical client for Firebird
License:        MIT and LGPL-2.1+
Group:          Productivity/Databases/Tools
Url:            http://www.flamerobin.org/
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}-src.tar.gz
Patch0:         flamerobin-0.9.2-wxWindowListNode.patch
BuildRequires:  desktop-file-utils
BuildRequires:  gcc-c++
BuildRequires:  libfbclient2-devel >= 2.0.0.12748
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets-devel >= 2.8
Requires(post): update-desktop-files
Requires(postun): update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
FlameRobin is a database administration tool for Firebird DBMS based on wxgtk
toolkit.

%prep
%setup -q -n %{name}-%{version}-src
%patch0

%build
export CFLAGS="%{optflags} -fpermissive"
export CXXFLAGS="$CFLAGS"
%configure
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
rm -f %{buildroot}/%{_datadir}/pixmaps/%{name}.png
cp -f ./res/%{name}.xpm %{buildroot}/%{_datadir}/%{name}/%{name}.xpm
sed	"s@Categories=Development;Database;GTK@Categories=System;Database;@"	-i	%{buildroot}/%{_datadir}/applications/%{name}.desktop
sed	"s@Icon=%{_datadir}/pixmaps/flamerobin.png@Icon=%{_datadir}/%{name}/%{name}.xpm@"	-i	%{buildroot}/%{_datadir}/applications/%{name}.desktop
mv %{buildroot}%{_datadir}/applications/%{name}.desktop $RPM_SOURCE_DIR/%{name}.desktop
%suse_update_desktop_file -i -n %{name} System Database
rm -rf %{buildroot}%{_datadir}/%{name}/docs

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
%defattr(-,root,root)
%doc docs/*
%{_mandir}/man1/flamerobin.1*
%{_bindir}/%{name}
%{_datadir}/applications/*
%{_datadir}/%{name}

%changelog