%define _enable_debug_packages %{nil} %define debug_package %{nil} Summary: A user-friendly and flexible issue tracking system Name: eventum Version: 2.1.1 Release: %mkrel 3 License: GPL Group: System/Servers URL: http://eventum.mysql.org/ Source0: %{name}-%{version}.tar.gz Patch0: eventum-2.0.1-access_from.diff Requires(post): rpm-helper Requires(postun): rpm-helper Requires: apache-mod_php php-gd php-gettext php-imap php-mysql #Requires: php-smarty >= 2.3.0 BuildArch: noarch BuildRequires: apache-base >= 2.0.54 # require these because otherwise php-gettext won't show the chosen language Requires: locales-de locales-en locales-es locales-fi locales-fr locales-it locales-nl locales-pl locales-ru locales-sv BuildRoot: %{_tmppath}/%{name}-buildroot %description Eventum is a user-friendly and flexible issue tracking system that can be used by a support department to track incoming technical support requests, or by a software development team to quickly organize tasks and bugs. %prep %setup -q -n %{name}-%{version} %patch0 -p1 # unbundle pear find -type f | xargs perl -pi -e "s|APP_PEAR_PATH\ \.\ ||g" find -type f | xargs perl -pi -e "s|^define\(\'APP_PEAR_PATH\'.*||sg;" find -type f | xargs perl -pi -e "s|define\(\'APP_PEAR_PATH\', APP_INC_PATH \. \'pear/\'\)\;|define\(\'APP_PEAR_PATH\', \'%{_datadir}/pear/\'\)\;|g" find -type f | xargs perl -pi -e "s|Text_Diff/|Text/|g" find -type f | xargs perl -pi -e "s|XML_RPC/RPC\.php|XML/RPC\.php|g" find -type f | xargs perl -pi -e "s|XML_RPC/Server\.php|XML/RPC/Server\.php|g" # unbundle smarty #find -type f | xargs perl -pi -e "s|APP_SMARTY_PATH\ \.\ |\'%{_datadir}/smarty/\'\ \.\ |g" #find -type f | xargs perl -pi -e "s|define\(\'APP_SMARTY_PATH\', APP_INC_PATH \. \'Smarty/\'\)\;|define\(\'APP_SMARTY_PATH\', \'%{_datadir}/smarty/\'\)\;|g" #find -type f | xargs perl -pi -e "s|^define\(\'APP_SMARTY_PATH\'.*||sg;" find -type f | xargs perl -pi -e "s|define\(\'APP_TPL_COMPILE_PATH\', APP_PATH \. \'templates_c\'\)\;|define\(\'APP_TPL_COMPILE_PATH\', \'%{_localstatedir}/lib/%{name}/smarty/templates_c\'\)\;|g" find -type f | xargs perl -pi -e "s|APP_PATH \. \'templates_c\'\;|\'%{_localstatedir}/lib/%{name}/smarty/templates_c\'\;|g" # fix some other issues find -type f | xargs perl -pi -e "s|^set_include_path|\/\/ set_include_path|g" # config path find -type f | xargs perl -pi -e "s|file_exists\(dirname\(__FILE__\) \. \'/config/config\.php\'\)\)|file_exists\(\'%{_sysconfdir}/%{name}/config\.php\'\)\)|g" find -type f | xargs perl -pi -e "s|file_exists\(INSTALL_PATH \. \'/config/config\.php\'\)\)|file_exists\(\'%{_sysconfdir}/%{name}/config\.php\'\)\)|g" find -type f | xargs perl -pi -e "s|Can\'t find config\.php from \"\. INSTALL_PATH \. \"/config\. Did you forgot to copy config from old install|Can\'t find config.php from %{_sysconfdir}/%{name}\. Did you forgot to copy config from old install|g" find -type f | xargs perl -pi -e "s|define\(\'APP_CONFIG_PATH\', APP_PATH \. \'config/\'\)\;|define\(\'APP_CONFIG_PATH\', \'%{_sysconfdir}/%{name}/\'\)\;|g" find -type f | xargs perl -pi -e "s|APP_PATH \. \'config/config\.php\'|\'%{_sysconfdir}/%{name}/config\.php\'|g" # log path find -type f | xargs perl -pi -e "s|define\(\'APP_LOG_PATH\', APP_PATH \. \'logs/\'\)\;|define\(\'APP_LOG_PATH\', \'/var/log/%{name}/\'\)\;|g" # locks path find -type f | xargs perl -pi -e "s|define\(\'APP_LOCKS_PATH\', APP_PATH \. \'locks/\'\)\;|define\(\'APP_LOCKS_PATH\', \'%{_localstatedir}/lib/%{name}/locks/\'\)\;|g" # misc path find -type f | xargs perl -pi -e "s|define\(\'APP_ROUTED_MAILS_SAVEDIR\', APP_PATH \. \'misc/\'\)\;|define\(\'APP_ROUTED_MAILS_SAVEDIR\', \'%{_localstatedir}/lib/%{name}/misc/\'\)\;|g" find -type f | xargs perl -pi -e "s|APP_PATH \. \'misc/routed_emails\'|APP_ROUTED_MAILS_SAVEDIR \. \'misc/routed_emails\'|g" find -type f | xargs perl -pi -e "s|APP_PATH \. \'misc/routed_notes\'|APP_ROUTED_MAILS_SAVEDIR \. \'misc/routed_notes\'|g" %build %install rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/cron.d install -d %{buildroot}%{_sysconfdir}/logrotate.d install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}/var/www/%{name} install -d %{buildroot}%{_localstatedir}/lib/%{name}/smarty/templates_c install -d %{buildroot}%{_localstatedir}/lib/%{name}/misc/routed_drafts install -d %{buildroot}%{_localstatedir}/lib/%{name}/misc/routed_emails install -d %{buildroot}%{_localstatedir}/lib/%{name}/misc/routed_notes install -d %{buildroot}%{_localstatedir}/lib/%{name}/locks install -d %{buildroot}/var/log/%{name} cp -aRf * %{buildroot}/var/www/%{name}/ touch %{buildroot}/var/log/%{name}/cli.log touch %{buildroot}/var/log/%{name}/errors.log touch %{buildroot}/var/log/%{name}/irc_bot.log touch %{buildroot}/var/log/%{name}/login_attempts.log cat > %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf << EOF Alias /%{name} /var/www/%{name} <Directory /var/www/%{name}> php_admin_value allow_call_time_pass_reference 1 php_admin_value memory_limit 32M Allow from All </Directory> <Directory /var/www/%{name}/setup> Order Deny,Allow Deny from All Allow from 127.0.0.1 ErrorDocument 403 "Access denied per %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf" </Directory> EOF cat > %{buildroot}%{_sysconfdir}/cron.d/%{name} << EOF # Mail Queue Process * * * * * root %{_bindir}/php -q /var/www/%{name}/misc/process_mail_queue.php # Reminder System */10 * * * * root %{_bindir}/php -q /var/www/%{name}/misc/check_reminders.php # Heartbeat Monitor */10 * * * * root %{_bindir}/php -q /var/www/%{name}/misc/monitor.php EOF # install log rotation stuff cat > %{buildroot}%{_sysconfdir}/logrotate.d/%{name} << EOF /var/log/%{name}/cli.log /var/log/%{name}/errors.log /var/log/%{name}/irc_bot.log /var/log/%{name}/login_attempts.log { rotate 5 monthly missingok notifempty } EOF # cleanup rm -rf %{buildroot}/var/www/%{name}/include/pear rm -rf %{buildroot}/var/www/%{name}/misc/cli/include/pear #rm -rf %{buildroot}/var/www/%{name}/include/Smarty rm -rf %{buildroot}/var/www/%{name}/misc/routed_drafts rm -rf %{buildroot}/var/www/%{name}/misc/routed_emails rm -rf %{buildroot}/var/www/%{name}/misc/routed_notes rm -rf %{buildroot}/var/www/%{name}/locks rm -rf %{buildroot}/var/www/%{name}/logs rm -rf %{buildroot}/var/www/%{name}/config rm -rf %{buildroot}/var/www/%{name}/templates_c rm -f %{buildroot}/var/www/%{name}/CONTRIB rm -f %{buildroot}/var/www/%{name}/COPYING rm -f %{buildroot}/var/www/%{name}/ChangeLog rm -f %{buildroot}/var/www/%{name}/FAQ rm -f %{buildroot}/var/www/%{name}/INSTALL rm -f %{buildroot}/var/www/%{name}/README rm -f %{buildroot}/var/www/%{name}/TODO rm -f %{buildroot}/var/www/%{name}/UPGRADE %post %_post_webapp %create_ghostfile /var/log/%{name}/cli.log apache apache 0644 %create_ghostfile /var/log/%{name}/errors.log apache apache 0644 %create_ghostfile /var/log/%{name}/irc_bot.log apache apache 0644 %create_ghostfile /var/log/%{name}/login_attempts.log apache apache 0644 %postun %_postun_webapp %clean rm -rf %{buildroot} %files %defattr(0644,root,root,0755) %doc CONTRIB COPYING ChangeLog FAQ INSTALL README TODO UPGRADE %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf %attr(0755,root,root) %config(noreplace) %{_sysconfdir}/cron.d/%{name} %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %attr(0700,apache,apache) %dir %{_sysconfdir}/%{name} #%attr(0640,apache,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.php /var/www/%{name} %attr(0700,apache,apache) %dir %{_localstatedir}/lib/%{name} %attr(0700,apache,apache) %dir %{_localstatedir}/lib/%{name}/smarty %attr(0700,apache,apache) %dir %{_localstatedir}/lib/%{name}/smarty/templates_c %attr(0700,apache,apache) %dir %{_localstatedir}/lib/%{name}/misc %attr(0700,apache,apache) %dir %{_localstatedir}/lib/%{name}/misc/routed_drafts %attr(0700,apache,apache) %dir %{_localstatedir}/lib/%{name}/misc/routed_emails %attr(0700,apache,apache) %dir %{_localstatedir}/lib/%{name}/misc/routed_notes %attr(0700,apache,apache) %dir %{_localstatedir}/lib/%{name}/locks %attr(0700,apache,apache) %dir /var/log/%{name} %attr(0640,apache,apache) %ghost /var/log/%{name}/cli.log %attr(0640,apache,apache) %ghost /var/log/%{name}/errors.log %attr(0640,apache,apache) %ghost /var/log/%{name}/irc_bot.log %attr(0640,apache,apache) %ghost /var/log/%{name}/login_attempts.log %changelog * Thu Jul 24 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.1.1-3mdv2009.0 + Revision: 244995 - rebuild + Pixel <pixel@mandriva.com> - adapt to %%_localstatedir now being /var instead of /var/lib (#22312) * Thu Jan 10 2008 Oden Eriksson <oeriksson@mandriva.com> 2.1.1-1mdv2008.1 + Revision: 147553 - 2.1.1 + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Wed Nov 21 2007 Oden Eriksson <oeriksson@mandriva.com> 2.1-1mdv2008.1 + Revision: 110944 - 2.1 * Thu Jun 28 2007 Oden Eriksson <oeriksson@mandriva.com> 2.0.1-1mdv2008.0 + Revision: 45443 - Import eventum * Thu Jun 28 2007 Oden Eriksson <oeriksson@mandriva.com> 2.0.1-1mdv2008.0 - initial Mandriva package - added P0 to set access rights in mysql for the eventum user