/[smecontribs]/rpms/dokuwiki/contribs10/dokuwiki.spec
ViewVC logotype

Annotation of /rpms/dokuwiki/contribs10/dokuwiki.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Oct 4 14:39:37 2021 UTC (3 years, 1 month ago) by jcrisp
Branch: MAIN
CVS Tags: dokuwiki-20200729-1_el7_sme, HEAD
Initial import

1 jcrisp 1.1 %define realversion 2020-07-29
2     %define version %(echo %{realversion} | sed -e 's/-//g')
3     %define releasenum 1
4    
5     %if 0%{?fedora} >= 11 || 0%{?rhel} >= 5
6     %global useselinux 1
7     %else
8     %global useselinux 0
9     %endif
10    
11     Name: dokuwiki
12     Version: %{version}
13     Release: %{releasenum}%{?dist}
14     Summary: Standards compliant simple to use wiki
15     Group: Applications/Internet
16     License: GPLv2
17     URL: http://www.dokuwiki.org/dokuwiki
18     Source: http://download.dokuwiki.org/src/dokuwiki/%{name}-%{realversion}.tgz
19    
20     BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
21     BuildArch: noarch
22     Requires: php
23     Requires: php-gd
24     Requires: php-imap
25     Requires: php-ldap
26     Requires: httpd
27    
28     %description
29     DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at creating
30     documentation of any kind. It has a simple but powerful syntax which makes sure
31     the data files remain readable outside the Wiki and eases the creation of
32     structured texts.
33    
34     All data is stored in plain text files no database is required.
35    
36    
37     %prep
38     %setup -q -n %{name}-%{realversion}
39    
40     chmod a-x inc/lang/az/*.{txt,html}
41    
42     mv -f conf/mysql.conf.php.example .
43    
44     sed -i "s:'./data':'%{_localstatedir}/lib/%{name}/data':" conf/%{name}.php
45     sed -i "s:ALL 8:ALL 1:" conf/acl.auth.php.dist
46    
47     # Use admin as default superuser
48     echo "\$conf['superuser'] = 'admin';" >> conf/local.php.dist
49    
50     cat <<EOF >%{name}.httpd
51     # %{name}
52     # %{summary}
53     # %{version}
54     #
55    
56     Alias /%{name} %{_datadir}/%{name}
57    
58     <Directory %{_datadir}/%{name}>
59     Options +FollowSymLinks
60     <IfModule !mod_authz_core.c>
61     Order Allow,Deny
62     Allow from 127.0.0.1 ::1
63     </IfModule>
64     <IfModule mod_authz_core.c>
65     Require ip 127.0.0.1 ::1
66     </IfModule>
67     </Directory>
68    
69     <Directory %{_datadir}/%{name}/inc>
70     <IfModule !mod_authz_core.c>
71     Order Deny,Allow
72     Deny from all
73     </IfModule>
74     <IfModule mod_authz_core.c>
75     Require all denied
76     </IfModule>
77     </Directory>
78    
79     <Directory %{_datadir}/%{name}/inc/lang>
80     <IfModule !mod_authz_core.c>
81     Order Deny,Allow
82     Deny from all
83     </IfModule>
84     <IfModule mod_authz_core.c>
85     Require all denied
86     </IfModule>
87     </Directory>
88    
89     <Directory %{_datadir}/%{name}/lib/_fla>
90     <IfModule !mod_authz_core.c>
91     Order allow,deny
92     Deny from all
93     </IfModule>
94     <IfModule mod_authz_core.c>
95     Require all denied
96     </IfModule>
97     </Directory>
98    
99     <Directory %{_sysconfdir}/%{name}>
100     <IfModule !mod_authz_core.c>
101     Order Deny,Allow
102     Deny from all
103     </IfModule>
104     <IfModule mod_authz_core.c>
105     Require all denied
106     </IfModule>
107     </Directory>
108     <Directory %{_datadir}/%{name}/conf>
109     <IfModule !mod_authz_core.c>
110     Order allow,deny
111     Deny from all
112     </IfModule>
113     <IfModule mod_authz_core.c>
114     Require all denied
115     </IfModule>
116     </Directory>
117    
118     <Directory %{_localstatedir}/lib/%{name}/>
119     <IfModule !mod_authz_core.c>
120     Order Deny,Allow
121     Deny from all
122     </IfModule>
123     <IfModule mod_authz_core.c>
124     Require all denied
125     </IfModule>
126     </Directory>
127     <Directory %{_datadir}/%{name}/data>
128     <IfModule !mod_authz_core.c>
129     Order allow,deny
130     Deny from all
131     </IfModule>
132     <IfModule mod_authz_core.c>
133     Require all denied
134     </IfModule>
135     </Directory>
136    
137     EOF
138    
139     cat <<EOF >DOKUWIKI-SELINUX.README
140     %{name}-selinux
141     ====================
142    
143     This package configures dokuwiki to run in
144     SELinux enabled environments
145    
146     EOF
147    
148     %build
149     # nothing to do here
150    
151     %install
152     rm -rf $RPM_BUILD_ROOT
153     install -d -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
154     install -d -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
155     install -d -p $RPM_BUILD_ROOT%{_datadir}/%{name}
156     install -d -p $RPM_BUILD_ROOT%{_datadir}/%{name}/bin
157     install -d -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
158     mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/data/{index,tmp,media,attic,pages,cache,meta,locks,media_attic,media_meta}
159     rm -f install.php
160     rm -f inc/.htaccess
161     rm -f inc/lang/.htaccess
162     rm -f lib/_fla/{.htaccess,README}
163     rm -f lib/plugins/revert/lang/sk/intro.txt
164     cp -rp data/pages/* $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/data/pages/
165     cp -rp conf/* $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
166     cp -rp bin/* $RPM_BUILD_ROOT%{_datadir}/%{name}/bin
167     cp -rp lib $RPM_BUILD_ROOT%{_datadir}/%{name}/
168     cp -rp inc $RPM_BUILD_ROOT%{_datadir}/%{name}/
169     cp -rp vendor $RPM_BUILD_ROOT%{_datadir}/%{name}/
170     install -p -m0644 VERSION $RPM_BUILD_ROOT%{_datadir}/%{name}
171     install -p -m0644 *.php $RPM_BUILD_ROOT%{_datadir}/%{name}
172     install -p -m0644 %{name}.httpd $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
173    
174     pushd $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
175     for d in *.dist; do
176     d0=`basename $d .dist`
177     if [ ! -f "$d0" ]; then
178     mv -f $d $d0
179     fi
180     done
181     popd
182    
183     pushd $RPM_BUILD_ROOT%{_datadir}/%{name}
184     ln -sf ../../../etc/%name conf
185     ln -sf ../../../%{_localstatedir}/lib/%{name}/data/ data
186     popd
187    
188     %clean
189     rm -rf $RPM_BUILD_ROOT
190    
191     %post
192     %if %{useselinux}
193     (
194     semanage fcontext -a -t httpd_sys_content_t '%{_sysconfdir}/%{name}(/.*)?'
195     semanage fcontext -a -t httpd_sys_content_t '%{_datadir}/%{name}(/.*)?'
196     semanage fcontext -a -t httpd_sys_content_t '%{_datadir}/%{name}/lib/plugins(/.*)?'
197     restorecon -R '%{_sysconfdir}/%{name}'
198     restorecon -R '%{_datadir}/%{name}'
199     restorecon -R '%{_datadir}/%{name}/lib/plugins'
200     ) &> /dev/null || :
201     %endif
202    
203    
204     %postun
205     %if %{useselinux}
206     (
207     if [ $1 -eq 0 ] ; then
208     semanage fcontext -d -t httpd_sys_content_t '%{_sysconfdir}/%{name}(/.*)?'
209     semanage fcontext -d -t httpd_sys_content_t '%{_datadir}/%{name}(/.*)?'
210     semanage fcontext -d -t httpd_sys_content_t '%{_datadir}/%{name}/lib/plugins(/.*)?'
211     fi
212     ) &> /dev/null || :
213     %endif
214    
215     %files
216     %defattr(-,root,root,-)
217     %doc COPYING README mysql.conf.php.example DOKUWIKI-SELINUX.README
218     %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
219     %config(noreplace) %attr(0644,apache,apache) %{_sysconfdir}/%{name}/*
220     %dir %attr(0755,apache,apache) %{_sysconfdir}/%{name}
221     %attr(0755,apache,apache) %{_datadir}/%{name}/bin/*.php
222     %dir %{_datadir}/%{name}
223     %{_datadir}/%{name}/conf
224     %{_datadir}/%{name}/data
225     %{_datadir}/%{name}/*.php
226     %{_datadir}/%{name}/VERSION
227     %dir %{_datadir}/%{name}/lib
228     %{_datadir}/%{name}/lib/exe
229     %{_datadir}/%{name}/lib/images
230     %{_datadir}/%{name}/lib/index.html
231     %{_datadir}/%{name}/lib/scripts
232     %{_datadir}/%{name}/lib/styles
233     %{_datadir}/%{name}/lib/tpl
234     #%{_datadir}/%{name}/lib/_fla
235     %attr(0755,apache,apache) %dir %{_datadir}/%{name}/lib/plugins
236     %{_datadir}/%{name}/lib/plugins/*
237     %{_datadir}/%{name}/inc
238     %{_datadir}/%{name}/vendor
239     %dir %{_localstatedir}/lib/%{name}
240     %attr(0750,apache,apache) %dir %{_localstatedir}/lib/%{name}/data
241     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/media
242     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/media_attic
243     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/media_meta
244     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/attic
245     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/cache
246     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/meta
247     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/locks
248     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/tmp
249     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/index
250     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/pages
251     #%attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/pages/playground
252     %attr(0755,apache,apache) %dir %{_localstatedir}/lib/%{name}/data/pages/wiki
253     %attr(0644,apache,apache) %{_localstatedir}/lib/%{name}/data/pages/*/*
254    
255     %changelog
256     * Mon Oct 04 2021 John Crisp <jcrisp@safeandsoundit.co.uk> -2020-07-29-1
257     - First import to Contribs [SME: 11702]
258    
259     * Mon Aug 28 2017 Daniel Berteaud <daniel@firewall-services.com> - 20170219e-1
260     - Update to 2017-02-19e
261    
262     * Wed Aug 23 2017 Daniel Berteaud <daniel@firewall-services.com> - 20170219d-1
263     - Update to 2017-02-19d
264    
265     * Thu Mar 9 2017 Daniel Berteaud <daniel@firewall-services.com> - 20170219b-1
266     - Update to 2017-02-19b
267    
268     * Tue Feb 21 2017 Daniel Berteaud <daniel@firewall-services.com> - 20170219a-1
269     - Update to 2017-02-19a
270    
271     * Mon Feb 20 2017 Daniel Berteaud <daniel@firewall-services.com> - 20170219-1
272     - Update to 2017-02-19
273    
274     * Mon Jul 4 2016 Daniel Berteaud <daniel@firewall-services.com> - 20160626a-1
275     - Update to 2016-06-26a
276    
277     * Tue Jun 28 2016 Daniel Berteaud <daniel@firewall-services.com> - 20160626-1
278     - Update to 2016-06-26
279    
280     * Thu Oct 22 2015 Daniel Berteaud <daniel@firewall-services.com> - 20150810a-3
281     - Fix SELinux labels
282    
283     * Mon Oct 19 2015 Daniel Berteaud <daniel@firewall-services.com> - 20150810a-2
284     - Adapt default conf for apache 2.4
285    
286     * Tue Sep 1 2015 Daniel Berteaud <daniel@firewall-services.com> - 20150810a-1
287     - Update to 2015-08-10a
288    
289     * Fri Mar 20 2015 Daniel Berteaud <daniel@firewall-services.com> - 20140929d-1
290     - Update to 2014-09-29d
291    
292     * Thu Feb 26 2015 Daniel Berteaud <daniel@firewall-services.com> - 20140929c-1
293     - Update to 2014-09-29c
294    
295     * Thu Dec 4 2014 Daniel Berteaud <daniel@firewall-services.com> - 20140929b-1
296     - Update to 2014-09-29b
297    
298     * Fri Oct 17 2014 Daniel Berteaud <daniel@firewall-services.com> - 20140929a-2
299     - Put the VERSION file in the doc root
300    
301     * Tue Oct 14 2014 Daniel Berteaud <daniel@firewall-services.com> - 20140929a-1
302     - Update to 2014-09-29a
303    
304     * Fri Jun 27 2014 Daniel Berteaud <daniel@firewall-services.com> - 20140505a-1
305     - update to 2014-05-05a (security fix)
306    
307     * Tue May 6 2014 Daniel Berteaud <daniel@firewall-services.com> - 20140505-1
308     - update to 2014-05-05
309    
310     * Mon Dec 9 2013 Daniel Berteaud <daniel@firewall-services.com> - 20131208-1
311     - update to 2013-12-08
312    
313     * Fri Nov 15 2013 Daniel Berteaud <daniel@firewall-services.com> - 20130510a-4
314     - Cleanup the spec file
315    
316     * Tue Sep 3 2013 Daniel Berteaud <daniel@firewall-services.com> - 20130510a-3
317     - Add a dependency on php
318    
319     * Wed Aug 28 2013 Daniel Berteaud <daniel@firewall-services.com> - 20130510a-2
320     - Fix permission on data dir and playground page
321    
322     * Wed Aug 21 2013 Daniel Berteaud <daniel@firewall-services.com> - 20130510a-1
323     - update to 2013-05-10a
324    
325     * Wed May 15 2013 Daniel Berteaud <daniel@firewall-services.com> - 20130510-1
326     - update to 2013-05-10
327    
328     * Mon Oct 15 2012 Daniel Berteaud <daniel@firewall-services.com> - 20121013-1
329     - update to 2012-10-13
330    
331     * Tue Sep 11 2012 Daniel Berteaud <daniel@firewall-services.com> - 20120910-1
332     - update to 2012-09-10
333    
334     * Sun Jul 15 2012 Daniel Berteaud <daniel@firewall-services.com> - 20120125b-1
335     - update to 2012-01-25b
336    
337     * Mon Apr 23 2012 Daniel Berteaud <daniel@firewall-services.com> - 20120125a-4
338     - upstream upgrade to 2012-01-25a
339    
340     * Fri Jan 27 2012 Daniel Berteaud <daniel@firewall-services.com> - 20120125-4
341     - Upstream upgrade to 2012-01-25
342    
343     * Mon Dec 19 2011 Daniel Berteaud <daniel@firewall-services.com> - 20110525a-3
344     - Link data dir to the real path
345    
346     * Thu Sep 29 2011 Daniel Berteaud <daniel@firewall-services.com> - 20110525a-2
347     - Don't exit with error if SELinux is disabled
348    
349     * Fri Jul 08 2011 Daniel Berteaud <daniel@firewall-services.com> - 20110525a-1
350     - Upstream upgrade to 2011-05-25a (based on EPEL RPM from Andrew Colin Kissa)
351    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed