File alacarte.spec of Package alacarte

#
# spec file for package alacarte
#
# Copyright (c) 2012 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:           alacarte
Version:        0.13.4
Release:        0
Url:            http://www.realistanew.com/projects/alacarte
Summary:        Menu editor for GNOME
License:        LGPL-2.1+
Group:          System/GUI/GNOME
Source:         http://download.gnome.org/sources/alacarte/0.13/%{name}-%{version}.tar.xz
# PATCH-NEEDS-REBASE alacarte_system_edit_mode.patch sreeves@novell.com (was PATCH-FEATURE-OPENSUSE)
Patch1:         alacarte_system_edit_mode.patch
# PATCH-FEATURE-UPSTREAM alacarte-support-exo-desktop-item-edit.patch bnc#728482 bgo#664114 gber@opensuse.org -- Add support for exo-desktop-item-edit as an alternative to gnome-desktop-item-edit
Patch2:         alacarte-support-exo-desktop-item-edit.patch
BuildRequires:  fdupes
BuildRequires:  glib2-devel
# Needed for the typelib() dependency parser
BuildRequires:  gobject-introspection
# Needed for %%icon_theme_cache_* macros.
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  python
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(libgnome-menu-3.0) >= 3.2.0.1
BuildRequires:  pkgconfig(pygobject-3.0)
Requires:       python-xml
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}
%endif

%description
Alacarte is a simple freedesktop.org compliant menu editor for GNOME
that lets you change your menus, simply and quickly. Just click and
type to edit, add, and delete any menu entry.

%lang_package
%prep
%setup -q
translation-update-upstream
# Needs rebase. Reenable suse_update_desktop_file call below when enabling
# again
# %patch1 -p0
%patch2 -p1

%build
# Patch is disabled
#autoreconf -f  -i
%configure
make %{?_smp_mflags}

%install
%makeinstall
%if 0%{?suse_version} <= 1110
%{__rm} %{buildroot}%{_datadir}/locale/bem/LC_MESSAGES/*
%endif
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%suse_update_desktop_file -r alacarte GNOME Utility DesktopUtility
# Patch is disabled
# suse_update_desktop_file alacarte-system X-SuSE-ControlCenter-LookAndFeel
%find_lang %{name} %{?no_lang_C}
%fdupes $RPM_BUILD_ROOT

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/alacarte
%{_datadir}/alacarte
%{_datadir}/applications/alacarte.desktop
# Patch is disabled
# %{_datadir}/applications/alacarte-system.desktop
%{_datadir}/icons/hicolor/*/*/*.*
%{python_sitelib}/Alacarte

%files lang -f %name.lang

%changelog