%define serverdir %(/usr/sbin/apxs -q htdocsdir 2>/dev/null) # To create a customized installation of bbPress: # autospec -u bbpress -a5 \ # -d "installdir=%serverdir/../www.example.com, \ # sitename=example, \ # adminmail=webmaster@example.com" %if "%{?installdir}" == "" %define installdir %{serverdir}/mantis %endif %if "%{?sitename}" != "" %if "%{?servername}" == "" %define servername %(basename %installdir 2>/dev/null) %endif %define serverlogdir %(/usr/sbin/apxs -q logfiledir 2>/dev/null) %else %if "%{?aliasdir}" == "" %define aliasdir /mantis %endif %endif Name: %{?sitename:%sitename-website-}mantis Version: 1.2.0a2 Release: 1mamba Summary: A free popular web-based bugtracking system Group: Applications/Web Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.mantisbt.org/ Source: http://kent.dl.sourceforge.net/sourceforge/mantisbt/mantis-%{version}.tar.gz License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildArch: noarch %description Mantis is a free popular web-based bugtracking system. It is written in the PHP scripting language and works with MySQL, MS SQL, and PostgreSQL databases and a webserver. Mantis has been installed on Windows, Linux, Mac OS, OS/2, and others. Almost any web browser should be able to function as a client. It is released under the terms of the GNU General Public License (GPL). %prep %setup -q -n mantis-%{version} %build %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" install -d %{buildroot}%{installdir} cp -a * %{buildroot}%{installdir} install -d %{buildroot}%{_sysconfdir}/httpd/httpd.d %if "%{?sitename}" != "" cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{servername}.conf << EOF %else cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{name}.conf << EOF %endif %if "%{?sitename}" == "" %if "%(dirname %installdir)" != "%{serverdir}" Alias %{aliasdir} %{installdir} %endif %endif AllowOverride Options Order allow,deny Allow from All %if "%{?sitename}" != "" %if "%(dirname %installdir)" != "%{serverdir}" %{?adminmail:ServerAdmin %adminmail} DocumentRoot %{installdir} ServerName %{servername} ErrorLog %{serverlogdir}/%{servername}-error_log CustomLog %{serverlogdir}/%{servername}-access_log common %endif %endif EOF %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post if [ $1 -ge 1 ]; then [ -e %{_localstatedir}/lock/subsys/httpd ] && service httpd reload || : fi : %preun if [ $1 -eq 0 ]; then #erase [ -e %{_localstatedir}/lock/subsys/httpd ] && service httpd reload || : fi : %files %defattr(-,root,root) %dir %{installdir} %{installdir}/* %if "%{?sitename}" != "" %config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{servername}.conf %else %config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{name}.conf %endif %changelog * Wed Jul 01 2009 Automatic Build System 1.2.0a2-1mamba - automatic update by autodist * Tue Dec 02 2008 Silvan Calarco 1.1.4-1mamba - update to 1.1.4 * Tue Dec 04 2007 Silvan Calarco 1.1.0rc3-1mamba - package created by autospec