File horde3-mnemo.spec of Package horde3-mnemo

# spec file for package horde3-mnemo
# 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

# norootforbuild

%define _hordedir %(%{_sbindir}/apxs2 -q datadir)/htdocs/horde
%define _mnemodir %{_hordedir}/mnemo

Name:           horde3-mnemo
Version:        2.2.4
Release:        2
Summary:        The Horde notes and memos application
License:        Horde Apache-like License
Group:          Productivity/Networking/Other
Source0:        mnemo-h3-%{version}.tar.bz2
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Requires:       horde3 >= 3.3.0
BuildRequires:  apache2-devel horde3
%if 0%{?sles_version} != 10 
BuildRequires:  fdupes

Mnemo is the Horde notes and memos application. It lets users keep
free-text notes and other bits of information which doesn't fit as a
contact, a todo item, an event, etc. It is very similar in
functionality to the Palm Memo application.

%setup -qn mnemo-h3-%{version}

%if %suse_version >= 1010
sed -i 's|/usr/bin/php|%{_bindir}/php5|g' scripts/import_vnotes.php
sed -i 's|/usr/bin/php|%{_bindir}/php5|g' scripts/import_text_note.php
sed -i 's|/usr/bin/php|%{_bindir}/php5|g' scripts/upgrades/convert_datatree_shares_to_sql.php
pushd config/
for i in *.dist; do %__mv $i ${i%.dist}; done

%__mkdir_p %{buildroot}%{_mnemodir}
%__cp -r ./* %{buildroot}%{_mnemodir}
%__rm -rf %{buildroot}%{_mnemodir}/{docs,README,LICENSE}
%if 0%{?sles_version} != 10 
 %fdupes %buildroot%{_mnemodir}
%find_lang mnemo

%__rm -rf %{buildroot}

%files -f mnemo.lang
%defattr(-, root, root)
%dir %{_mnemodir}
%dir %{_mnemodir}/locale
%attr(0750, wwwrun, www) %dir %{_mnemodir}/config
%attr(0640, wwwrun, www) %config(noreplace) %{_mnemodir}/config/*
%attr(0640, wwwrun, www) %config(noreplace) %{_mnemodir}/config/.htaccess

openSUSE Build Service is sponsored by