File orage.spec of Package orage

#
# spec file for package orage
#
# 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:           orage
Version:        4.8.3
Release:        0
Summary:        Time-managing Application for the Xfce Desktop Environment
License:        GPL-2.0+
Group:          Productivity/Office/Organizers
Url:            http://www.xfce.org/projects#applications
Source:         http://archive.xfce.org/src/apps/orage/4.8/%{name}-%{version}.tar.bz2
Source1:        README.SUSE
# PATCH-FIX-UPSTREAM orage-4.8.2-use-docdir.patch gber@opensuse.org -- Use docdir correctly
Patch0:         orage-4.8.2-use-docdir.patch
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  perl
BuildRequires:  popt-devel
BuildRequires:  update-desktop-files
BuildRequires:  xfce4-dev-tools
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libical)
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(libxfce4panel-1.0)
BuildRequires:  pkgconfig(libxfce4ui-1)
Requires:       xfce4-panel
Recommends:     %{name}-lang = %{version}
Recommends:     %{name}-doc = %{version}
# use /usr/bin/play to play notification sounds
Recommends:     sox
Provides:       xfcalendar = %{version}
Obsoletes:      xfcalendar < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Orage is a fast and easy to use graphical calendar for the Xfce desktop
environment. It uses the portable ical format and includes common calendar
features like repeating appointments and multiple alarming possibilities. Orage
does not have group calendar features and can only be used for single user.

%package        doc
Summary:        Documentation for orage
Group:          Documentation/HTML
BuildArch:      noarch
Requires:       %{name} = %{version}

%description doc
This package contains the documentation for orage.

%lang_package

%prep
%setup -q
%patch0 -p1
cp %{SOURCE1} .
sed -i 's:^Icon=clock:Icon=xfcalendar:' globaltime/globaltime.desktop.in

%build
xdt-autogen
# workaround broken libical headers
export CFLAGS="%{optflags} -I%{_includedir}/libical"
%configure --docdir=%{_datadir}/xfce4/orage/html
make %{?_smp_mflags}

%install
%make_install

install -D -p -m 644 icons/48x48/xfcalendar.png \
    %{buildroot}%{_datadir}/pixmaps/xfcalendar.png

%suse_update_desktop_file -r xfcalendar X-XFCE Office Calendar GTK
%suse_update_desktop_file -r globaltime X-XFCE Utility Clock GTK
%suse_update_desktop_file xfce-xfcalendar-settings

rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,tl_PH,ur_PK}

%fdupes %{buildroot}%{_datadir}

%find_lang %{name} %{?no_lang_C}

%clean
rm -rf %{buildroot}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc README ChangeLog COPYING AUTHORS NEWS README.SUSE
%{_bindir}/orage
%{_bindir}/globaltime
%{_bindir}/tz_convert
%doc %{_mandir}/man1/globaltime.1*
%doc %{_mandir}/man1/orage.1*
%doc %{_mandir}/man1/tz_convert.1*
%dir %{_datadir}/%{name}
%{_datadir}/orage/sounds/
%{_datadir}/applications/*desktop
%{_datadir}/icons/hicolor/*
%{_datadir}/pixmaps/xfcalendar.png
%{_datadir}/dbus-1/services/org.xfce.*
%{_libexecdir}/xfce4/panel-plugins/xfce4-orageclock-plugin
%{_datadir}/xfce4/panel-plugins/xfce4-orageclock-plugin.desktop

%files doc
%defattr(-,root,root)
%dir %{_datadir}/xfce4
%dir %{_datadir}/xfce4/orage
%doc %{_datadir}/xfce4/orage/html/

%files lang -f %{name}.lang

%changelog