File geany.spec of Package geany

#
# spec file for package geany
#
# Copyright (c) 2011 SUSE LINUX Products 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:           geany
Version:        0.20
Release:        2
License:        GPLv2+
Summary:        Small and lightweight IDE
Url:            http://geany.org/
Group:          Development/Tools/IDE
Source:         http://download.geany.org/%{name}-%{version}.tar.bz2
Source1:        %{name}-rpmlintrc
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  update-desktop-files
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Geany is a small and lightweight integrated development environment.
It was developed to provide a small and fast IDE, which has only a
few dependencies from other packages. Another goal was to be as
independent as possible from a special Desktop Environment like KDE
or GNOME. So it is using only the GTK2 toolkit and therefore you need
only the GTK2 runtime libraries to run Geany.

%package devel
License:        GPLv2+
Summary:        Small and lightweight IDE -- Development Files
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       gtk2-devel

%description devel
Geany is a small and lightweight integrated development environment.
It was developed to provide a small and fast IDE, which has only a
few dependencies from other packages. Another goal was to be as
independent as possible from a special Desktop Environment like KDE
or GNOME. So it is using only the GTK2 toolkit and therefore you need
only the GTK2 runtime libraries to run Geany.

%lang_package
%prep
%setup -q

%build
%configure --docdir=%{_defaultdocdir}/%{name}
make %{?jobs:-j%jobs}

%install
%makeinstall
# FIXME: add lb to filesystem?
%{__rm} %{buildroot}%{_datadir}/locale/lb/LC_MESSAGES/*
find %{buildroot} -type f -name "*.la" -delete -print
%suse_update_desktop_file %{name}
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}%{_datadir}

%clean
rm -rf %{buildroot}

%if 0%{?suse_version} > 1130

%post
%desktop_database_post
%icon_theme_cache_post
%endif

%if 0%{?suse_version} > 1130

%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files
%defattr(-,root,root)
# AUTHORS, COPYING, README, etc. are installed during make install
%doc %{_defaultdocdir}/geany/
%doc %{_mandir}/man1/geany.1.gz
%{_bindir}/geany
%{_datadir}/applications/geany.desktop
%{_datadir}/geany/
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%dir %{_libdir}/geany
%{_libdir}/geany/*.so

%files devel
%defattr(-,root,root)
%{_includedir}/geany/
%{_libdir}/pkgconfig/geany.pc

%files lang -f %{name}.lang

%changelog