Sisyphus repository
Last update: 30 january 2023 | SRPMs: 18151 | Visits: 26596077
en ru br
ALT Linux repos
5.0: 1.13.0-alt3
4.1: 1.13.0-alt2.M41.2
4.0: 1.13.0-alt2.M40.1

Group :: Networking/WWW
RPM: mediawiki

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# for distr selected
%def_with M41
%def_without M40

# for set release

%define release_pre alt
%define release_base_num 3
%define release_suff %nil

# for set distr

%define release_distr_num 2

# set distr

%define distr_switch %nil
%if_with M40
%define distr_switch M40
%if_with M41
%define distr_switch M41

%if "%distr_switch" == ""
%define release_num %release_base_num
%define release_distr %nil
%define release_num %(expr %release_base_num - 1)
%define release_distr .%distr_switch.%release_distr_num

# release_base set

%define release_base %release_pre%release_num%release_distr

# set macros_release

%define macros_release %release_base%release_suff

%define webappdir %webserver_webappsdir/mediawiki

%if "%distr_switch" != ""
# new apache2 macros sets
%define apache2_confdir %a_sysconfdir
%define apache2_dname %a_dname
%define apache2_mods_start %a_mods_start
%define apache2_extra_available %a_extra_available

Summary: A wiki engine
Name: mediawiki
Version: 1.13.0
Release: %macros_release
License: %gpl2plus
Group: Networking/WWW

Packager: Aleksey Avdeev <solo at>

Source10: mediawiki-apache2-alt-configs-0.2.tar
Source11: mediawiki-fedora-docs-0.1.tar
Source12: README.ALT-ru_RU.UTF-8
Source2: %name.httpd2.conf
Source3: %name.httpd.conf
Patch0: mediawiki-1.13.0-commoncode.patch

BuildRequires(pre): rpm-macros-webserver-common
BuildPreReq: rpm-build-licenses
BuildPreReq: apache2-devel
%if "%distr_switch" != ""
BuildPreReq: rpm-build-webserver-common

# Automatically added by buildreq on Tue Jun 03 2008 (-ba)

BuildRequires: ocaml perl-DBI

BuildRequires: ocaml >= 3.06

# to make sure the "%webserver_group" group is created before mediawiki is installed

PreReq: webserver-common
Requires: php-engine >= 5
Requires: php5-mysql, php5-pgsql
Requires: php5-gd2
Requires: diffutils, ImageMagick
#Requires: tetex-latex, tetex-dvips
Requires: apache2-configs-dirs2 >= 2.2.0
Requires: apache2-config-tools >= 0.1.1

MediaWiki is the software used for Wikipedia and the other Wikimedia
Foundation websites. Compared to other wikis, it has an excellent
range of features and support for high-traffic websites using multiple

This package supports wiki farms. Copy %webappdir over to the
desired wiki location and configure it through the web
interface. Remember to remove the config dir after completing the

%package apache
Summary: apache-related config
Group: Networking/Other
Requires: %name = %version-%release
Requires: apache apache-mod_php5

%description apache

%package apache2
Summary: apach2e-related config
Group: Networking/Other
Requires: %name = %version-%release
Requires: apache2 apache2-mod_php5

%description apache2

%setup -q
%patch0 -p1 -b .commoncode

cd math

mkdir -p %buildroot%_datadir/mediawiki
cp -a * %buildroot%_datadir/mediawiki/

install %SOURCE12 ./
mkdir -p Fedora
pushd Fedora
tar xvSf %SOURCE11

# remove undeeded parts

rm -fr %buildroot%_datadir/mediawiki/{t,test}
rm -fr %buildroot%_datadir/mediawiki/includes/zhtable
find %buildroot%_datadir/mediawiki/ \
 \( -name .htaccess -or -name \*.cmi \) \
 -print0 \
 | xargs -r0 rm

# fix permissions

chmod +x %buildroot%_datadir/mediawiki/bin/*
find %buildroot%_datadir/mediawiki -name \*.pl -print0 | xargs -r0 chmod +x

# move arch dependent parts

if test ! -d %buildroot%_libdir/mediawiki/math; then
 mkdir -p %buildroot%_libdir/mediawiki
 mv %buildroot%_datadir/mediawiki/math \

find %buildroot -name .svnignore -print0 | xargs -r0 rm
find %buildroot -name \*.commoncode -print0 | xargs -r0 rm

mkdir -p %buildroot%webappdir
cd %buildroot%webappdir/
mkdir images
cp -a %buildroot%_datadir/mediawiki/config .
ln -s %_datadir/mediawiki/index.php index.php
ln -s %_datadir/mediawiki/skins skins

mkdir -p %buildroot%apache2_confdir
pushd %buildroot%apache2_confdir
tar xvSf %SOURCE10

install -pD -m0644 %SOURCE2 %buildroot%_sysconfdir/httpd2/conf/addon.d/A.%name.conf
install -pD -m0644 %SOURCE3 %buildroot%_sysconfdir/httpd/conf/addon-modules.d/%name.conf

%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
control apache2-mod_php5 relaxed
%_initdir/httpd2 reload
exit 0

%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
%_initdir/httpd2 reload
exit 0

%post apache
chown -R root:apache %webappdir
control apache-mod_php5 relaxed
%_initdir/httpd reload

%postun apache
%_initdir/httpd reload

%post apache2
chown -R root:apache2 %webappdir
control apache2-mod_php5 relaxed
%_initdir/httpd2 reload

%postun apache2
%_initdir/httpd2 reload

%doc Fedora
%dir %_datadir/mediawiki
%dir %_datadir/mediawiki/config
%dir %_datadir/mediawiki/skins
%attr(2770,root,%webserver_group) %dir %webappdir
%attr(2770,root,%webserver_group) %dir %webappdir/config
%attr(2770,root,%webserver_group) %dir %webappdir/images

%files apache
%config(noreplace) %_sysconfdir/httpd/conf/addon-modules.d/%name.conf

%files apache2
%config(noreplace) %_sysconfdir/httpd2/conf/addon.d/A.%name.conf


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin