mediawiki/mediawiki.spec

361 lines
12 KiB
RPMSpec
Raw Permalink Normal View History

%define majversion %(echo %version | cut -d. -f 1-2)
%define serverdir %(apxs -q htdocsdir 2>/dev/null)
%define openmamba_theme_ver 1.15
# To create a customized installation of mediawiki:
# autospec -u mediawiki -a5 \
# -d "installdir=%serverdir/../wiki.example.com, sitename=example, lang=en"
%if "%{?installdir}" == ""
%define installdir %{serverdir}/wiki
%endif
Name: %{?sitename:%sitename-}mediawiki%{?lang:-%lang}
Version: 1.32.0
Release: 1mamba
Summary: A collaborative editing software that runs Wikipedia and other projects
Group: Applications/Web
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.mediawiki.org
Source: http://download.wikimedia.org/mediawiki/%{majversion}/mediawiki-%{version}.tar.gz
Source1: mediawiki-AuthPress.php
Source2: mediawiki-AuthPress_LocalSettings.php
Source3: mediawiki-theme-openmamba-%{openmamba_theme_ver}.tar.bz2
Source4: mediawiki-PasswordHash.php
Source5: http://mediawiki.narod.ru/QPoll_0.7.0.tgz
Patch0: mediawiki-1.22.2-DefaultSettings.patch
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires: apache-mod_php >= 5
Requires: mysql >= 4
Requires: php-mysql
Requires: diffutils
Requires: ImageMagick
BuildArch: noarch
Requires(pre): php
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
MediaWiki is the collaborative editing software that runs Wikipedia, the free encyclopedia, and other projects.
It's designed to handle a large number of users and pages without imposing too rigid a structure or workflow.
%package theme-openmamba
Summary: openmamba theme for mediawiki
Group: Applications/Web
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description theme-openmamba
MediaWiki is the collaborative editing software that runs Wikipedia, the free encyclopedia, and other projects.
It's designed to handle a large number of users and pages without imposing too rigid a structure or workflow.
This package contains the openmamba theme.
%prep
%setup -q -n mediawiki-%{version} -a3
#%patch0 -p1
%build
# FIXME: ocaml missing
#make -C math
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}%{installdir}
#install -D -m 755 math/texvc \
# %{buildroot}%{installdir}/math/texvc
#make clean -C math
cp -a * %{buildroot}%{installdir}
rm -fr %{buildroot}%{installdir}/{t,tests}
find %{buildroot}%{installdir} -name .svnignore -delete
for docfile in COPYING FAQ HISTORY INSTALL README README.mediawiki RELEASE-NOTES UPGRADE; do
rm -f %{buildroot}%{installdir}/$docfile
done
chmod 770 %{buildroot}%{installdir}/mw-config
chmod 775 %{buildroot}%{installdir}/images
#chmod 640 %{buildroot}%{installdir}/AdminSettings.sample
#chmod -x %{buildroot}%{installdir}/maintenance/hiphop/run-server
install -d %{buildroot}%{_sysconfdir}/httpd/httpd.d
cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{name}.conf << EOF
Alias /wiki%{?lang:-%lang} %{installdir}
<Directory %{installdir}>
AllowOverride Options
Allow from All
</Directory>
EOF
install %{SOURCE1} %{buildroot}%{installdir}/extensions/AuthPress.php
install %{SOURCE2} %{buildroot}%{installdir}/mw-config/LocalSettings.php.AuthPress
install %{SOURCE4} %{buildroot}%{installdir}/includes/PasswordHash.php
tar -xzf %{SOURCE5} -C %{buildroot}%{installdir}/extensions
# FIXME: quick workaround for Apache error on images directory due to RewriteEngine on
rm -f %{buildroot}%{installdir}/images/.htaccess
# Avoid autoreq for /usr/bin/hhvm
chmod -x %{buildroot}%{installdir}/maintenance/hhvm/run-server
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ $1 -ge 1 ]; then
service httpd condrestart
fi
# update (LocalSettings.php have to contain database password)
if [ $1 -gt 1 ] && [ -e %{installdir}/LocalSettings.php ]; then
/usr/bin/php %{installdir}/maintenance/update.php --quick || true
fi
:
%preun
# uninstall
if [ $1 -eq 0 ]; then
service httpd condrestart
fi
:
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{name}.conf
%dir %{installdir}
#%{installdir}/AdminSettings.sample
#%{installdir}/Makefile
%attr(-,root,nobody) %dir %{installdir}/mw-config
%{installdir}/mw-config/*
%attr(-,root,nobody) %{installdir}/images
#%{installdir}/bin
%{installdir}/CREDITS
%{installdir}/Gruntfile.js
%{installdir}/cache/.htaccess
%{installdir}/composer.json
%{installdir}/docs
%{installdir}/extensions
%{installdir}/includes
%{installdir}/jsduck.json
%{installdir}/languages
#%{installdir}/locale
%{installdir}/maintenance
#%{installdir}/math
#%{installdir}/Rakefile
%{installdir}/resources
%{installdir}/skins
#%{installdir}/serialized
%{installdir}/vendor
#%{installdir}/install-utils.inc
%{installdir}/*.php
#%{installdir}/*.php5
#%{installdir}/*.lock
#%{installdir}/*.xml
%{installdir}/*.md
#%{installdir}/redirect.phtml
#%{installdir}/StartProfiler.sample
%{installdir}/composer.local.json-sample
#%{installdir}/wiki.phtml
%{installdir}/RELEASE-NOTES*
%{installdir}/SECURITY
%exclude %{installdir}/skins/openmamba*
%doc COPYING FAQ HISTORY README UPGRADE
%files theme-openmamba
%defattr(-,root,root)
%{installdir}/skins/openmamba.php
%dir %{installdir}/skins/openmamba
%dir %{installdir}/skins/openmamba/*
%changelog
* Sat Feb 02 2019 Automatic Build System <autodist@mambasoft.it> 1.32.0-1mamba
- automatic version update by autodist
* Fri Sep 28 2018 Automatic Build System <autodist@mambasoft.it> 1.31.1-1mamba
- automatic version update by autodist
* Tue Jun 19 2018 Automatic Build System <autodist@mambasoft.it> 1.31.0-1mamba
- automatic version update by autodist
* Wed Feb 07 2018 Automatic Build System <autodist@mambasoft.it> 1.30.0-1mamba
- automatic version update by autodist
* Wed Nov 15 2017 Automatic Build System <autodist@mambasoft.it> 1.29.2-1mamba
- automatic version update by autodist
* Thu Aug 24 2017 Automatic Build System <autodist@mambasoft.it> 1.29.1-1mamba
- automatic version update by autodist
* Tue Aug 08 2017 Automatic Build System <autodist@mambasoft.it> 1.29.0-1mamba
- automatic version update by autodist
* Fri Apr 07 2017 Automatic Build System <autodist@mambasoft.it> 1.28.1-1mamba
- automatic version update by autodist
* Wed Dec 14 2016 Automatic Build System <autodist@mambasoft.it> 1.28.0-1mamba
- automatic version update by autodist
* Fri Aug 26 2016 Automatic Build System <autodist@mambasoft.it> 1.27.1-1mamba
- automatic version update by autodist
* Mon Jul 04 2016 Automatic Build System <autodist@mambasoft.it> 1.27.0-1mamba
- automatic version update by autodist
* Mon May 23 2016 Automatic Build System <autodist@mambasoft.it> 1.26.3-1mamba
- automatic version update by autodist
* Thu Dec 24 2015 Automatic Build System <autodist@mambasoft.it> 1.26.2-1mamba
- automatic version update by autodist
* Thu Dec 24 2015 Automatic Build System <autodist@mambasoft.it> 1.26.0-1mamba
- automatic version update by autodist
* Tue Oct 20 2015 Automatic Build System <autodist@mambasoft.it> 1.25.3-1mamba
- automatic version update by autodist
* Tue Aug 11 2015 Automatic Build System <autodist@mambasoft.it> 1.25.2-1mamba
- automatic version update by autodist
* Fri Jun 05 2015 Automatic Build System <autodist@mambasoft.it> 1.25.1-1mamba
- automatic version update by autodist
* Sun Apr 05 2015 Automatic Build System <autodist@mambasoft.it> 1.24.2-1mamba
- automatic version update by autodist
* Tue Jan 27 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.24.1-2mamba
- fix db update on upgrade and remove .htaccess in images dir as a workaround for Apache error
* Thu Dec 18 2014 Automatic Build System <autodist@mambasoft.it> 1.24.1-1mamba
- automatic update by autodist
* Thu Dec 11 2014 Automatic Build System <autodist@mambasoft.it> 1.24.0-1mamba
- automatic version update by autodist
* Sat Nov 15 2014 Automatic Build System <autodist@mambasoft.it> 1.23.6-1mamba
- automatic update by autodist
* Thu Oct 02 2014 Automatic Build System <autodist@mambasoft.it> 1.23.5-1mamba
- automatic version update by autodist
* Mon Sep 29 2014 Automatic Build System <autodist@mambasoft.it> 1.23.4-1mamba
- automatic version update by autodist
* Thu Sep 18 2014 Automatic Build System <autodist@mambasoft.it> 1.23.3-1mamba
- automatic version update by autodist
* Thu Jul 31 2014 Automatic Build System <autodist@mambasoft.it> 1.23.2-1mamba
- automatic version update by autodist
* Mon Jul 07 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.23.1-1mamba
- update to 1.23.1
* Mon Jun 23 2014 Automatic Build System <autodist@mambasoft.it> 1.23.0-1mamba
- automatic version update by autodist
* Fri May 30 2014 Automatic Build System <autodist@mambasoft.it> 1.22.7-1mamba
- automatic update by autodist
* Wed May 21 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.22.5-2mamba
- remove requirement for hhvm
* Mon Mar 31 2014 Automatic Build System <autodist@mambasoft.it> 1.22.5-1mamba
- automatic version update by autodist
* Sun Mar 23 2014 Automatic Build System <autodist@mambasoft.it> 1.22.3-1mamba
- automatic version update by autodist
* Sun Feb 23 2014 Automatic Build System <autodist@mambasoft.it> 1.22.2-1mamba
- automatic version update by autodist
* Tue Sep 17 2013 Automatic Build System <autodist@mambasoft.it> 1.21.2-1mamba
- automatic version update by autodist
* Tue May 28 2013 Automatic Build System <autodist@mambasoft.it> 1.20.6-1mamba
- automatic version update by autodist
* Mon May 06 2013 Automatic Build System <autodist@mambasoft.it> 1.20.5-1mamba
- automatic version update by autodist
* Mon Apr 22 2013 Automatic Build System <autodist@mambasoft.it> 1.20.4-1mamba
- automatic version update by autodist
* Sun Mar 10 2013 Automatic Build System <autodist@mambasoft.it> 1.20.3-1mamba
- automatic version update by autodist
* Mon Jan 07 2013 Automatic Build System <autodist@mambasoft.it> 1.20.2-1mamba
- automatic version update by autodist
* Thu Nov 08 2012 Automatic Build System <autodist@mambasoft.it> 1.20.0-1mamba
- automatic version update by autodist
* Fri Oct 12 2012 Automatic Build System <autodist@mambasoft.it> 1.19.2-1mamba
- automatic version update by autodist
* Tue Aug 14 2012 Automatic Build System <autodist@mambasoft.it> 1.19.1-1mamba
- automatic version update by autodist
* Wed Aug 31 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.17.0-1mamba
- update to 1.17.0
- added Poll extension
* Thu Jul 29 2010 Automatic Build System <autodist@mambasoft.it> 1.15.5-1mamba
- automatic update by autodist
* Mon Jun 21 2010 Automatic Build System <autodist@mambasoft.it> 1.15.4-1mamba
- automatic update by autodist
* Sun Mar 14 2010 Automatic Build System <autodist@mambasoft.it> 1.15.2-1mamba
- automatic update by autodist
* Thu Jul 16 2009 Automatic Build System <autodist@mambasoft.it> 1.15.1-1mamba
- automatic update by autodist
* Wed Jul 08 2009 Automatic Build System <autodist@mambasoft.it> 1.15.0-1mamba
- update to 1.15.0
* Thu Dec 18 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.13.3-1mamba
- update to 1.13.3
* Mon Jun 16 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.10.4-1mamba
- update to 1.10.4
- AuthPress.php: update to support use of PasswordHash for bbpress >= 0.9
- openmamba theme: update to 1.1.1 (minor fixes)
* Sat Jan 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.10.2-3mamba
- openmamba theme updated
* Wed Jan 02 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.10.2-2mamba
- added openmamba theme package
* Mon Dec 31 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 1.10.2-1mamba
- update to 1.10.2
* Tue May 29 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 1.10.0-2mamba
- added apache configuration file
- added %%installdir, %%sitename and %%lang variables
* Sun May 20 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 1.10.0-1mamba
- update to 1.10.0
- added %%post script
* Sun Apr 15 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 1.9.3-1mamba
- update to version 1.9.3 by autospec
* Fri Jul 28 2006 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 1.7.1-1qilnx
- update to version 1.7.1 by autospec
* Wed Jun 21 2006 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 1.6.7-1qilnx
- update to version 1.6.7 by autospec
- architecture changed to noarch
* Thu Apr 27 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.3-2qilnx
- changed default settings to restrict anonymous and logged user permissions
* Wed Apr 26 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.3-1qilnx
- package created by autospec