Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 80ec3cf0756734f29062dc9c95a77ed4 > files > 4

dotproject-1.0.2-1mdk.src.rpm

%define name dotproject
%define version 1.0.2
%define release 1mdk
%define webroot /var/www/html

Summary:	Web Based Project Management Tool
Name:		%{name}
Version:	%{version}
Release:	%{release}
Source0:	%{name}_%{version}-1.tar.bz2

# S10 - S20 was taken from CVS
Source10:	backup.tar.bz2
Source11:	groups.tar.bz2
Source12:	helpdesk.tar.bz2
Source13:	inventory.tar.bz2
Source14:	invoices.tar.bz2
Source15:	journal.tar.bz2
Source16:	payments.tar.bz2
Source17:	reports.tar.bz2
Source18:	timecard.tar.bz2
Source19:	timesheet.tar.bz2
Source20:	timetrack.tar.bz2

Patch0:		dotproject-1.0.2-default_config.diff.bz2
Patch1:		dotproject-1.0.2-perl_path.diff.bz2

License:	BSD
URL:		http://www.dotproject.net
Group:		System/Servers
BuildRoot:	%{_tmppath}/%{name}-buildroot
Requires:	webserver
Requires:	php-common
Requires:	php-mysql
Requires:	php-gd
Requires:	mod_php
Requires:	xpdf
BuildArch:	noarch

%description
DotProject is a Web-based project management framework that includes modules
for companies, projects, tasks (with Gantt charts), forums, files, a
calendar, contacts, tickets/helpdesk, multi-language support, user/module
permissions, and themes. It is translated into 17 languages and has a modular
design that allows extra modules (such as time sheets and inventory) to be
added in easily.

%prep

%setup -q -n %{name}
%patch0 -p0
%patch1 -p0

# modules
mkdir -p modules_temp
pushd modules_temp
    tar -jxf %{SOURCE10}
    tar -jxf %{SOURCE11}
    tar -jxf %{SOURCE12}
    tar -jxf %{SOURCE13}
    tar -jxf %{SOURCE14}
    tar -jxf %{SOURCE15}
    tar -jxf %{SOURCE16}
    tar -jxf %{SOURCE17}
    tar -jxf %{SOURCE18}
    tar -jxf %{SOURCE19}
    tar -jxf %{SOURCE20}
popd

%build

# fix modules
for i in `find modules_temp -type d -name "modules"`; do
    cp -rp $i/* modules/
    rm -rf $i;
done
cp -rp modules_temp/* modules/
rm -rf modules_temp

# clean up CVS stuff
for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -r $i; fi >&/dev/null
done

# fix dir perms
find . -type d | xargs chmod 755

# fix file perms
find . -type f | xargs chmod 644

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{webroot}/%{name}
cp -aRf * %{buildroot}%{webroot}/%{name}/

# fix dir perms
#chmod -R 707 %{buildroot}%{webroot}/%{name}/files
#chmod -R 707 %{buildroot}%{webroot}/%{name}/locales

# fix file perms
chmod 755 %{buildroot}%{webroot}/%{name}/includes/gateway.pl

# fix config
cp -p %{buildroot}%{webroot}/%{name}/includes/config-dist.php \
    %{buildroot}%{webroot}/%{name}/includes/config.php

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc ChangeLog
%config(noreplace) %attr(0644,root,root) %{webroot}/%{name}/includes/config.php
%{webroot}/%{name}

%changelog
* Mon May 10 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.2-1mdk
- initial package
- added P0 & P1