File horde3-nag.spec of Package horde3-nag

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

# norootforbuild

%define _hordedir %(%{_sbindir}/apxs2 -q datadir)/htdocs/horde
%define _nagdir %{_hordedir}/nag
%define _pversion 2.3.6

Name:           horde3-nag
Version:        2.3.6
Release:        2
Summary:        Nag is the Horde task list application
License:        GPL
Group:          Productivity/Networking/Other
Url:            http://www.horde.org/nag
Source0:        nag-h3-%{_pversion}.tar.bz2
#Patch0:			HK-JS-nag_2.2_RC1-Fix_library_import.patch
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       nag = %{version}
Obsoletes:      nag <= 2.3.5

Requires:       horde3 >= 3.3.0
Requires:       php5-pear-DB
BuildRequires:  apache2-devel horde3

%description
Nag is the Horde task list application. It stores todo items, things
due later this week, etc. It is very similar in functionality to the
Palm ToDo application.


Authors:
--------
	Jon Parise
	Chuck Hagenbuch
	Jan Schneider

%prep
%setup -qn nag-h3-%{_pversion}
#%patch0 -p2

%build
pushd scripts/
sed -i 's|/usr/bin/php|%{_bindir}/php5|g' {upgrades/create_missing_add_histories_sql.php,upgrades/2004-09-13_add_uid_field.php,upgrades/2006-04-18_add_creator_and_assignee_fields.php,import_vtodos.php}
popd

pushd config/
for i in *.dist; do %__mv $i ${i%.dist}; done
popd

%install
%__mkdir_p %{buildroot}%{_nagdir}
%__cp -r ./* %{buildroot}%{_nagdir}
%__rm -rf %{buildroot}%{_nagdir}/{docs,README,COPYING}
%find_lang nag

%clean
%__rm -rf %{buildroot}

%files -f nag.lang
%defattr(-, root, root)
%doc docs README COPYING
%dir %{_nagdir}
%{_nagdir}/*.php
%{_nagdir}/js
%{_nagdir}/lib
%dir %{_nagdir}/locale
%{_nagdir}/locale/en_US
%{_nagdir}/po
%{_nagdir}/scripts
%{_nagdir}/templates
%{_nagdir}/tasks
%{_nagdir}/tasklists
%{_nagdir}/themes
%attr(0750, wwwrun, www) %dir %{_nagdir}/config
%attr(0640, wwwrun, www) %config(noreplace) %{_nagdir}/config/*
%attr(0640, wwwrun, www) %config(noreplace) %{_nagdir}/config/.htaccess

%changelog
openSUSE Build Service is sponsored by