Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
server:php:applications
mediawiki
mediawiki.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mediawiki.spec of Package mediawiki
# # spec file for package mediawiki # # Copyright (c) 2024 SUSE LLC # Copyright (c) 2010, 2016 Weberhofer GmbH, Vienna, Austria # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define mediawiki_shared %{_datadir}/php/%{name} %define mediawiki_base /srv/www/%{name} %define mediawiki_webroot %{mediawiki_base}/webroot %define main_version 1.39 Name: mediawiki Version: 1.39.10 Release: 0 Summary: A Web-based Collaborative Editing Environment License: GPL-2.0-or-later Group: Productivity/Networking/Web/Utilities URL: https://www.mediawiki.org Source0: https://releases.wikimedia.org/mediawiki/%{main_version}/mediawiki-%{version}.tar.gz Source1: https://releases.wikimedia.org/mediawiki/%{main_version}/mediawiki-%{version}.tar.gz.sig Source2: mediawiki-admin Source3: mediawiki.cron Source4: README.DISTRIBUTION # mediawiki-use-localsettings-from-webroot.patch fixes the handling of paths for our smylinked files Patch0: mediawiki-use-localsettings-from-webroot.patch BuildRequires: apache-rpm-macros BuildRequires: cron BuildRequires: fdupes Requires: ImageMagick >= 6.5.6 Requires: cron Requires: php-ctype Requires: php-dom Requires: php-fileinfo Requires: php-gettext Requires: php-iconv Requires: php-intl Requires: php-json Requires: php-mbstring Requires: php-mysql Requires: php-openssl Requires: php-session Requires: php-xml Requires: php-zlib Recommends: php-curl Recommends: php-intl Recommends: php-openssl BuildArch: noarch %description MediaWiki is the collaborative editing software that runs Wikipedia, the free encyclopedia, and other projects. It is designed to handle a large number of users and pages without imposing a structure or workflow too rigidly. %package apache Summary: Apache configuration for %{name} Group: Productivity/Networking/Web/Utilities BuildRequires: apache2 Requires: %{name} = %{version} Requires: apache2 Requires: mod_php_any < 8.4.0 Requires: mod_php_any >= 7.4.3 Supplements: (apache2 and %{name}) %description apache This subpackage contains the Apache configuration files %prep %autosetup -p1 ## don't need cache directory in shared dir rm -rf cache ## remove tests find . -depth -type d -name 'tests' -exec rm -rf {} \; ## remove development files find . -depth -type d -name '.phan' -exec rm -rf {} \; find . -name '.easymin' -exec rm {} \; ## don't need lua binaries in the distribution #rm -rf maintenance/hhvm rm extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_32_generic/lua rm extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua ## fix interpreters for F in \ extensions/SyntaxHighlight_GeSHi/pygments/create_pygmentize_bundle \ maintenance/language/zhtable/Makefile.py \ ; do sed -i -e 's|^#!%{_bindir}/env python[34]*|#!%{_bindir}/python|' $F done for F in \ extensions/MultimediaViewer/importml.sh \ extensions/VisualEditor/bin/pre-commit.sh \ maintenance/mwjsduck-gen \ skins/MinervaNeue/dev-scripts/setup-storybook.sh \ skins/MinervaNeue/dev-scripts/svg_check.sh \ vendor/wikimedia/shellbox/src/Command/limit.sh \ \ maintenance/mediawiki.Title/generatePhpCharToUpperMappings.php \ maintenance/update.php \ vendor/justinrainbow/json-schema/bin/validate-json \ vendor/symfony/yaml/Resources/bin/yaml-lint \ vendor/wikimedia/cdb/bin/cdb \ vendor/wikimedia/equivset/bin/console \ vendor/wikimedia/less.php/bin/lessc \ vendor/wikimedia/idle-dom/bin/idledom-build \ vendor/wikimedia/minify/bin/minify \ vendor/wikimedia/remex-html/bin/fuzz.php \ vendor/wikimedia/remex-html/bin/generate-htmldata \ vendor/wikimedia/remex-html/bin/test.php \ \ extensions/Math/modules/ve-math/tools/makeSvgsAndCss.js \ extensions/VisualEditor/lib/ve/rebaser/src/tools/dump-mongo.js \ extensions/VisualEditor/lib/ve/rebaser/src/server.js \ vendor/wikimedia/parsoid/bin/domdiff.test.js \ vendor/wikimedia/parsoid/bin/inspectTokenizer.js \ vendor/wikimedia/parsoid/bin/langconv-test.js \ vendor/wikimedia/parsoid/bin/normalize.test.js \ vendor/wikimedia/parsoid/bin/roundtrip-test.js \ vendor/wikimedia/parsoid/bin/diff.html.js \ ; do sed -i -e 's|^#!%{_bindir}/env |#!%{_bindir}/| ; s|#!%{_bindir}/bash|#!%{_bindir}/sh|' $F done ## fix permissions chmod 0744 \ extensions/ConfirmEdit/captcha-old.py \ extensions/ConfirmEdit/captcha.py \ extensions/PdfHandler/scripts/retrieveMetaData.sh \ extensions/VisualEditor/lib/ve/rebaser/src/server.js \ maintenance/language/generate-collation-data \ vendor/wikimedia/parsoid/bin/diff.html.js \ vendor/wikimedia/shellbox/src/Command/limit.sh chmod 0644 \ vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdData.php \ vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdDataInterface.php \ vendor/wikimedia/less.php/lib/Less/Less.php.combine \ vendor/pear/net_url2/Net/URL2.php \ vendor/pear/net_url2/docs/6470.php \ vendor/pear/net_url2/docs/example.php %build %install install -d -m 0755 %{buildroot}%{_bindir} install -d -m 0755 %{buildroot}%{mediawiki_shared} install -d -m 0755 %{buildroot}%{_docdir}/%{name} cp -a ./* %{buildroot}%{mediawiki_shared} ## install scripts install -m 0750 %{SOURCE2} %{buildroot}%{_bindir} ## fix in scripts for non-suse installations sed -e 's/wwwrun/%{apache_user}/' -i %{buildroot}%{_bindir}/* ## install cronjobs install -d -m 0755 %{buildroot}%{_sysconfdir}/cron.d install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/cron.d/%{name} ## create empty composer.lock file touch %{buildroot}%{mediawiki_shared}/composer.lock ## install/move documentation install -m 0644 %{SOURCE4} %{buildroot}%{_docdir}/%{name}/ MW_DOCFILES="CREDITS FAQ HISTORY README.md RELEASE-NOTES-* UPGRADE docs" for i in $MW_DOCFILES ; do mv %{buildroot}%{mediawiki_shared}/$i %{buildroot}%{_docdir}/%{name} done ## create list of files to install pushd %{buildroot}%{mediawiki_shared} echo "MW_DOCFILES='$MW_DOCFILES'" \ >> %{buildroot}%{mediawiki_shared}/mediawiki-files echo "MW_MAKEDIRS='images'" \ >> %{buildroot}%{mediawiki_shared}/mediawiki-files echo "MW_LINKFILES='"`ls *.php`" composer.lock extensions languages maintenance resources'" \ >> %{buildroot}%{mediawiki_shared}/mediawiki-files echo "MW_REMOVEFILES='config/'" \ >> %{buildroot}%{mediawiki_shared}/mediawiki-files echo "MW_SYSDIRS='session cache tmp webroot'" \ >> %{buildroot}%{mediawiki_shared}/mediawiki-files popd ## install for usage via mediawiki-makealias mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d %{buildroot}%{_bindir}/mediawiki-admin install "%{mediawiki_base}" %{buildroot} | \ sed -e 's/^ //' > %{buildroot}%{apache_sysconfdir}/conf.d/%{name}.conf ## remove duplicates %fdupes -s %{buildroot} > /dev/null rm %{buildroot}%{mediawiki_shared}/COPYING %pre ## remove extension directory from default webroot if not already symlink if [ -d "%{mediawiki_webroot}/extensions" ] ; then if [ ! -L "%{mediawiki_webroot}/extensions" ] ; then echo rm -f "%{mediawiki_webroot}/extensions" fi fi %post ## run the update script to upgrade from older versions if [ $1 == 2 ] ; then %{_bindir}/mediawiki-admin upgrade --all || true fi %files %{_bindir}/* %doc %{_docdir}/%{name} %license COPYING %dir %{mediawiki_base} %dir %{_datadir}/php %{mediawiki_shared} %dir %{mediawiki_webroot} %config(noreplace) %{_sysconfdir}/cron.d/%{name} %{mediawiki_webroot}/[^i]* %{mediawiki_webroot}/img* %{mediawiki_webroot}/index* %defattr(0640,%{apache_user},%{apache_group},0750) %{mediawiki_webroot}/images %{mediawiki_base}/tmp %{mediawiki_base}/session %{mediawiki_base}/cache %files apache %config(noreplace) %{apache_sysconfdir}/conf.d/%{name}.conf %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor