/[packages]/updates/4/mediawiki/current/SPECS/mediawiki.spec
ViewVC logotype

Annotation of /updates/4/mediawiki/current/SPECS/mediawiki.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 618272 - (hide annotations) (download)
Sat Apr 26 19:07:41 2014 UTC (6 years, 5 months ago) by luigiwalser
File size: 5532 byte(s)
1.22.6
1 luigiwalser 584851 %define basever 1.22
2 luigiwalser 618272 %define subver 6
3 guillomovitch 409876 %define _requires_exceptions pear(\\(extensions/.*\\|core/includes/WebStart.php\\|phase3/includes/WebStart.php\\|PHPUnit/Framework.php\\))
4 obgr_seneca 269190
5     Name: mediawiki
6     Version: %{basever}.%{subver}
7 luigiwalser 554660 Release: %mkrel 1
8 boklm 72073 Summary: A wiki engine
9 boklm 72063 License: GPLv2+
10     Group: System/Servers
11 luigiwalser 584851 BuildArch: noarch
12 obgr_seneca 269190 Url: http://www.mediawiki.org/wiki/MediaWiki
13    
14 luigiwalser 599476 Source0: http://releases.wikimedia.org/mediawiki/%{basever}/%{name}-%{version}.tar.gz
15 cjw 97620 Source1: mediawiki.conf
16 obgr_seneca 269190
17     # to make sure the "apache" group is created before mediawiki is installed
18 luigiwalser 455129 Requires(pre): webserver-base
19 luigiwalser 475117 Requires: webserver-base
20 obgr_seneca 290105 # suggest apache-mod_php
21 luigiwalser 455129 Suggests: apache-mod_php
22 obgr_seneca 269190 # for diff3:
23 luigiwalser 455129 Requires: diffutils
24 obgr_seneca 269190 # for convert:
25 luigiwalser 455129 Requires: imagemagick
26 luigiwalser 584851 Requires(post): php-cli
27 luigiwalser 455129 Requires: php-gd
28 obgr_seneca 269190 Requires: %{name}-sql = %{version}-%{release}
29 luigiwalser 455129 Requires: php-xml
30     Suggests: php-intl
31 obgr_seneca 269190
32 luigiwalser 455129 Conflicts: mediawiki < 0:1.16.5-0
33 obgr_seneca 269190 # make upgrading from mediawiki < 1.19 painless
34 luigiwalser 455129 Obsoletes: %{name}-minimal < 1.19.1
35 obgr_seneca 269190
36 luigiwalser 455979 # RenameUser extension bundled with MediaWiki as of 1.20
37     Obsoletes: mediawiki-renameuser < %{version}-%{release}
38 luigiwalser 597415 # GraphViz extension unmaintained and vulnerable to XSS attacks
39     Obsoletes: mediawiki-graphviz < 0.9-2
40 luigiwalser 455979
41 cjw 97620 %description
42     MediaWiki is the software used for Wikipedia and the other Wikimedia
43     Foundation websites. Compared to other wikis, it has an excellent
44     range of features and support for high-traffic websites using multiple
45     servers
46    
47     This package includes math rendering support for mediawiki.
48    
49 luigiwalser 584851 %package mysql
50     Summary: Mediawiki with mysql database
51     Group: System/Servers
52     Provides: %{name}-sql = %{version}-%{release}
53     Requires: php-mysql
54 boklm 72063
55 luigiwalser 584851 %description mysql
56 obgr_seneca 269190 This meta package installs the neccessary packages to use mediawiki
57     with a mariadb or mysql database.
58     This does not install the database server itself, because you can run
59     mediawiki with a remote database server.
60 boklm 72063
61 luigiwalser 584851 %package pgsql
62     Summary: Mediawiki with postgresql database
63     Group: System/Servers
64     Provides: %{name}-sql = %{version}-%{release}
65     Requires: php-pgsql
66 boklm 72063
67 luigiwalser 584851 %description pgsql
68 obgr_seneca 269190 This meta package installs the neccessary packages to use mediawiki
69     with a postgresql database.
70     This does not install the database server itself, because you can run
71     mediawiki with a remote database server.
72    
73 luigiwalser 584851 %package sqlite
74     Summary: Mediawiki with sqlite database
75     Group: System/Servers
76     Provides: %{name}-sql = %{version}-%{release}
77     Requires: php-sqlite3
78     Requires: php-pdo_sqlite
79 obgr_seneca 269190
80 luigiwalser 584851 %description sqlite
81 obgr_seneca 269190 This meta package installs the neccessary packages to use mediawiki
82     with an sqlite database.
83     If you are using sqlite you can't use a remote database server.
84    
85 boklm 72063 %prep
86 cjw 97620 %setup -q
87 boklm 72063
88     %build
89 kharec 409801 :
90 boklm 72063
91     %install
92     rm -rf %{buildroot}
93    
94 cjw 97620 # now copy the rest to the buildroot.
95 guillomovitch 409876 mkdir -p %{buildroot}%{_datadir}/mediawiki
96     cp -a * %{buildroot}%{_datadir}/mediawiki/
97 cjw 97620
98 guillomovitch 409876 # remove documentation
99 luigiwalser 584851 rm -f %{buildroot}%{_datadir}/mediawiki/{COPYING,FAQ,HISTORY,README,README.mediawiki,RELEASE-NOTES-1.22,UPGRADE,CREDITS,INSTALL}
100 guillomovitch 409876 rm -rf %{buildroot}%{_datadir}/mediawiki/docs
101    
102 cjw 97620 # remove unneeded parts
103 guillomovitch 409876 rm -fr %{buildroot}%{_datadir}/mediawiki/{t,test,tests}
104 luigiwalser 584851 find %{buildroot}%{_datadir}/mediawiki/ -name .htaccess -exec rm -f {} +
105 cjw 97620
106     # fix permissions
107 luigiwalser 584851 find %{buildroot}%{_datadir}/mediawiki -name \*.pl -exec chmod +x {} +
108 cjw 97620
109     # remove version control/patch files
110 luigiwalser 584851 find %{buildroot} -name .git\* -exec rm -f {} +
111 cjw 97620
112 boklm 72063 %{__install} -d -m 755 %{buildroot}%{webappconfdir}
113 cjw 97620 install -p -m 0644 %{SOURCE1} \
114     %{buildroot}%{webappconfdir}/mediawiki.conf
115 boklm 72063
116 cjw 97620 mkdir %{buildroot}%{_sysconfdir}/mediawiki
117    
118     # placeholder for a default instance
119 obgr_seneca 269190 mkdir -p %{buildroot}/%{_localstatedir}/www/mediawiki
120 cjw 97620
121 luigiwalser 455129 # move editable things out of /usr
122     mv %{buildroot}%{_datadir}/mediawiki/images %{buildroot}%{_localstatedir}/www/mediawiki/images
123     ln -s %{_sysconfdir}/mediawiki/LocalSettings.php %{buildroot}%{_datadir}/mediawiki/LocalSettings.php
124    
125 guillomovitch 409876 install -d -m 755 %{buildroot}/%{_localstatedir}/lib/mediawiki
126    
127 luigiwalser 455129 %pretrans
128 luigiwalser 584851 if [ -f %{_datadir}/mediawiki/LocalSettings.php -a ! -L %{_datadir}/mediawiki/LocalSettings.php ]; then
129 luigiwalser 455129 if [ -e %{_sysconfdir}/mediawiki/LocalSettings.php ]; then
130 luigiwalser 584851 mv -f %{_sysconfdir}/mediawiki/LocalSettings.php %{_sysconfdir}/mediawiki/LocalSettings.php.rpmsave
131 luigiwalser 455129 fi
132     mv %{_datadir}/mediawiki/LocalSettings.php %{_sysconfdir}/mediawiki/LocalSettings.php
133     ln -s %{_sysconfdir}/mediawiki/LocalSettings.php %{_datadir}/mediawiki/LocalSettings.php
134     fi
135 luigiwalser 584851 if [ -d %{_datadir}/mediawiki/images -a ! -L %{_datadir}/mediawiki/images ]; then
136 luigiwalser 455129 if [ -e %{_localstatedir}/www/mediawiki/images ]; then
137 luigiwalser 584851 mv -f %{_localstatedir}/www/mediawiki/images %{_localstatedir}/www/mediawiki/images.rpmsave
138 luigiwalser 455129 fi
139     mv %{_datadir}/mediawiki/images %{_localstatedir}/www/mediawiki/images
140     ln -s %{_localstatedir}/www/mediawiki/images %{_datadir}/mediawiki/images
141     chown -R apache:apache %{_localstatedir}/www/mediawiki/images
142     fi
143    
144 boklm 72063 %post
145 luigiwalser 604014 php %{_datadir}/mediawiki/maintenance/update.php --quick > /dev/null
146 luigiwalser 584851 if [ ! -e %{_datadir}/mediawiki/images ]; then
147     ln -s %{_localstatedir}/www/mediawiki/images %{_datadir}/mediawiki/images
148     fi
149 boklm 72063
150     %files
151 luigiwalser 584851 %doc COPYING FAQ HISTORY README RELEASE-NOTES-1.22 UPGRADE CREDITS INSTALL docs
152 guillomovitch 409876 %{_datadir}/mediawiki
153     %attr(-,apache,apache) %dir %{_datadir}/mediawiki/mw-config
154 cjw 97620 %config(noreplace) %{webappconfdir}/mediawiki.conf
155     %dir %{_sysconfdir}/mediawiki
156 luigiwalser 455129 %dir %{_localstatedir}/www/mediawiki
157     %attr(-,apache,apache) %dir %{_localstatedir}/www/mediawiki/images
158     %attr(-,apache,apache) %{_localstatedir}/www/mediawiki/images/README
159 obgr_seneca 269190
160     %files mysql
161    
162     %files pgsql
163    
164     %files sqlite
165 guillomovitch 409876 %attr(-,apache,apache) %{_localstatedir}/lib/mediawiki

  ViewVC Help
Powered by ViewVC 1.1.28