%define name tutos %define version 1.1.20031017 %define release 3mdk Summary: The Ultimate Team Organisation Software Name: %name Version: %version Release: %release License: GPL Group: System/Servers Source0: %{name}-php-%{version}.tar.bz2 Source1: %{name}-config.pinc.bz2 URL: http://www.tutos.org/ Requires: webserver mysqlserver php php-mysql mod_php Requires: rcs wv JpGraph transfig BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-buildroot %define tutosdir /var/www/html/tutos %description TUTOS is a webbased groupware or ERP/CRM suite that provides the users with: - personal and group calendars - addressbook - projectmanagement - filemanagement - taskmanagement - bugtracking - notes - installation management - mail interface %prep %setup -q -n %{name} %install perl -p -i -e 's!/usr/share/tutos!%{tutosdir}!g' apache.conf rm -rf $RPM_BUILD_ROOT find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; mkdir -p $RPM_BUILD_ROOT/%tutosdir install -m 755 *.sh $RPM_BUILD_ROOT/%tutosdir/ cp -ar homepage/ php/ html/ $RPM_BUILD_ROOT/%tutosdir/ rm -f $RPM_BUILD_ROOT/%tutosdir/*.spec rm -f $RPM_BUILD_ROOT/%tutosdir/*.in bzcat %SOURCE1 > $RPM_BUILD_ROOT/%tutosdir/php/config.pinc mkdir -p %buildroot%_sysconfdir/httpd/conf.d cp -a apache.conf %buildroot%_sysconfdir/httpd/conf.d/%name.conf # lazy, I want to mark one file as config... well create a file list: find %buildroot%tutosdir/php -type d | sed 's|^%{buildroot}|%%dir |' > %name.filelist find %buildroot%tutosdir/php -type f | sed 's|^%{buildroot}||' >> %name.filelist # This file is config: tag it perl -pi -e 's!(.*php/config.pinc)$!%%config(noreplace) $1!' %name.filelist %clean rm -rf $RPM_BUILD_ROOT %post if [ -f /var/lock/subsys/httpd ]; then /etc/rc.d/init.d/httpd restart 1>&2 else echo "Run \"service httpd start\" to start apache http daemon." fi echo '** Edit /var/www/html/tutos/php/config.pinc to configure your system!' echo '** To setup the database, see http://www.tutos.org/homepage/mysql_setup.html' %preun if [ -f /var/lock/subsys/httpd ]; then /etc/rc.d/init.d/httpd restart 1>&2 fi %files -f %name.filelist %defattr(-,root,root) %dir %{tutosdir} %{tutosdir}/homepage %{tutosdir}/html %{tutosdir}/createdb.sh %{tutosdir}/scheme.sh %{tutosdir}/shellfunc.sh %config(noreplace) %_sysconfdir/httpd/conf.d/%name.conf %doc README INSTALL documentation ToDo ChangeLog *.lsm %changelog * Mon Mar 01 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.1.20031017-3mdk - DIRM again * Sat Feb 28 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.1.20031017-2mdk - Own dir - cleanup - using httpd/conf.d instead changing apache conf * Sat Jan 24 2004 Spencer Anderson <sdander@oberon.ark.com> 1.1.20031017-1mdk - new version * Fri Feb 7 2003 Austin Acton <aacton@yorku.ca> 1.0.20030205-1mdk - initial package