%define tgzname phpgroupware %define name phpgroupware %define version 0.9.14 %define release 2mdk #so that we don't get screwed by fhs. %define httpdroot /var/www Summary: PhpGroupWare is a web-based groupware suite written in php. Name: %{name} Version: %{version} Release: %{release} Source0: ftp://ftp.sourceforge.net/pub/sourceforge/phpgroupware/%{tgzname}-%{version}.tar.bz2 URL: http://www.phpgroupware.org/ License: GPL Group: Networking/WWW BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot Requires: mod_php, php, perl, apache Requires: php-xml BuildArchitectures: noarch %description phpgroupware is a web-based groupware suite written in PHP. It provides calendar, todo-list, addressbook, email and a news reader. It also provides an APi for developikng additional applications. See the phpgroupware apps project for add-on apps. %prep rm -rf $RPM_BUILD_ROOT %setup -q -n phpgroupware %build find . -type f -exec perl -pi -e 's|/home/httpd|%{httpdroot}|g' {} \; # Set doc files are regular files chmod 0644 doc/CHANGELOG chmod 0644 doc/CREDITS chmod 0644 doc/LICENSE chmod 0644 doc/README chmod 0644 doc/SECURITY # Fix link to phpgroupware SECURITY doc # TODO: move phpgwapi/doc into %_docdir ? perl -pi -e "s|phpgwapi/doc|%{httpdroot}/html/phpgroupware/phpgwapi/doc|" doc/SECURITY # Great. The CVS directories are not removed. # Anyone see anyting wrong with this command ? I keep getting # No such file or directory so I had to use this hack .. find . -type d -name 'CVS' -exec rm -rf {} \; 2> /dev/null || true %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{httpdroot}/html/phpgroupware cp -aRf * $RPM_BUILD_ROOT%{httpdroot}/html/phpgroupware cd $RPM_BUILD_ROOT%{httpdroot}/html/phpgroupware rm -rf doc mv header.inc.php.template header.inc.php #bzip2 -dc %SOURCE1 > $RPM_BUILD_ROOT%{httpdroot}/html/phpgroupware/header.inc.php %clean rm -rf $RPM_BUILD_ROOT %post echo Please create a database in MySQL or PostgreSQL for phpGroupWare to use. echo Then edit header.inc.php to match your database config and change the config_passwd. echo Finish by browsing to http://yourmachine/phpgroupware/setup to create the tables and configure your environment. %postun echo To complete the removal you must remove the databases manually. %files %defattr(-,root,root) # (gb) the phpgroupware root directory should not belong to apache # because upon first installation, a user could make some changes via # the web interface. %dir %{httpdroot}/html/phpgroupware %doc doc/* %defattr(-,root,root) # TODO: build a more decent file list %{httpdroot}/html/phpgroupware/[a-z]* #%{httpdroot}/html/phpgroupware/[a-e]* #%{httpdroot}/html/phpgroupware/[h-z]* #%{httpdroot}/html/phpgroupware/filemanager #%attr(0700,root,root)%{httpdroot}/html/phpgroupware/files %changelog * Thu Feb 27 2003 Planel Nicolas <nplanel@mandrakesoft.com> 0.9.14-2mdk - rename apache:apache in root:root * Sun Nov 17 2002 Daouda LO <daouda@mandrakesoft.com> 0.9.14-1mdk - new version * Mon Mar 04 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 0.9.12-3mdk - Add Requires: php-xml since xml support is now an external module in PHP. * Wed Sep 19 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.9.12-2mdk - Try and fix buggy package. * Fri Aug 24 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.9.12-1mdk - New and shiny source. * Sat Apr 28 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.9.10-1mdk - Make a new and shiny RPM from a new and shiny source. * Sat Apr 14 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9.9-4mdk - changed ownership of phpgroupware home directory to root * Fri Apr 13 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.9.9-3mdk - sanitized specfile (s/Copyright/License, Requires, %%doc, etc.) - apache now owns files in %{httpdroot}/html/phpgroupware * Tue Mar 06 2001 Geoffrey lee <snailtalk@mandrakesoft.com> 0.9.9-2mdk - Don't install Source1 anymore. - Make sure that we do have /var/www as our httpd root. - Don't exit 1 on uninstall. * Tue Feb 13 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.9.9-1mdk - bump up to 0.9.9 in cooker. * Wed Jan 03 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.9.7-1mdk - new and shiny source. * Sat Sep 16 2000 Dan Kuykendall <dan@kuykendall.org> 0.9.3-1mdk - Upgraded to new 0.9.3 version. - Removed lots of unneeded code that was needed for the pre-beta versions. - Geoff <snailtalk@mandrakesoft.com> -- fix build as user. * Sat Sep 16 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 09072000-2mdk - Add url. - turn off autorequires. - use /var/www. * Wed Sep 13 2000 <snailtalk@mandrakesoft.com> 09072000-1mdk - first rpm-zed distribution. - cutom configuration files from Dan Kuykendall. - suggestions on packaging from Dan. # end of file