Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 005f112ec0f91087a8d4f495ec260e6a > files > 2

dokuwiki-20160626-2.1.mga5.src.rpm

%global	__requires_exclude  pear\\(Crypt/Hash.php\\)|pear\\(Base.php\\)|pear\\(Rijndael.php\\)
%define dir_version  2016-06-26b
%define _localstatedir %{_var}
%define subrel 1

Name:       dokuwiki
Version:    20160626
Release:    %mkrel 2
Summary:    A wiki with plain text files backend
License:    GPLv2
Group:      Networking/WWW
URL:        https://www.dokuwiki.org/dokuwiki
Source0:    http://download.dokuwiki.org/src/dokuwiki/%{name}-%{dir_version}.tgz
Requires:   apache-mod_php
Requires:   php-xml
BuildArch:  noarch

%description
DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at creating
documentation of any kind. It is targeted at developer teams, workgroups and
small companies. It has a simple but powerful syntax which makes sure the
datafiles remain readable outside the Wiki and eases the creation of structured
texts. All data is stored in plain text files -- no database is required.

%prep
%autosetup -n %{name}-%{dir_version}
find . -name '.htaccess' | xargs rm -f

%build

%install
install -d -m 755 %{buildroot}%{_datadir}/%{name}

install -d -m 755 %{buildroot}%{_datadir}/%{name}/bin
install -m 755 bin/* %{buildroot}%{_datadir}/%{name}/bin

cp -pr inc %{buildroot}%{_datadir}/%{name}
cp -pr lib %{buildroot}%{_datadir}/%{name}

install -m 644 *.php %{buildroot}%{_datadir}/%{name}

pushd %{buildroot}%{_datadir}/%{name}
ln -sf ../../../var/lib/dokuwiki data
ln -sf ../../../etc/dokuwiki conf
popd

install -d -m 755 %{buildroot}%{_localstatedir}/lib
cp -pr data %{buildroot}%{_localstatedir}/lib/%{name}

install -d -m 755 %{buildroot}%{_sysconfdir}
cp -pr conf %{buildroot}%{_sysconfdir}/%{name}
rm -f %{buildroot}%{_sysconfdir}/%{name}/*.{dist,example}

# apache configuration
install -d -m 755 %{buildroot}%{_webappconfdir}
cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF
# %{name} Apache configuration
Alias /%{name} %{_datadir}/%{name}

<Directory %{_datadir}/%{name}>
    Require all granted
    DirectoryIndex doku.php
</Directory>

<Directory %{_datadir}/%{name}/bin>
    Require all denied
</Directory>

<Directory %{_datadir}/%{name}/inc>
    Require all denied
</Directory>

<Directory %{_datadir}/%{name}/conf>
    Require all denied
</Directory>

<Directory %{_datadir}/%{name}/data>
    Require all denied
</Directory>
EOF

cat > README.urpmi <<EOF
Mageia RPM specific notes

setup
-----
The setup used here differs from default one, to achieve better FHS compliance, and
follow upstream security recommandations detailed at
http://wiki.splitbrain.org/wiki:security:
- the non-variable files are in %{_datadir}/%{name}
- the variable files are in %{_localstatedir}/lib/%{name}
- the configuration files are in %{_sysconfdir}/%{name}
EOF

# missing composer file
mkdir -p %{buildroot}/%{_datadir}/%{name}/vendor
touch %{buildroot}/%{_datadir}/%{name}/vendor/autoload.php
	

%pre
if [ $1 = "2" ]; then
    # fix for old setup
    if [ -d %{_localstatedir}/lib/%{name}/data ]; then
        mv %{_localstatedir}/lib/%{name}/data/* %{_localstatedir}/lib/%{name}
        rmdir %{_localstatedir}/lib/%{name}/data
    fi
fi

%files
%doc README VERSION README.urpmi conf/*.{dist,example}
%config(noreplace) %{_webappconfdir}/%{name}.conf
%attr(-,apache,apache) %config(noreplace) %{_sysconfdir}/%{name}
%{_datadir}/%{name}
%attr(-,apache,apache) %{_localstatedir}/lib/%{name}


%changelog
* Thu Mar 16 2017 tarakbumba <tarakbumba> 20160626-2.1.mga5
+ Revision: 1093194
- Fix unaccesible start page
- Update to 2016-06-26b stable version

* Thu Mar 19 2015 tarakbumba <tarakbumba> 20140929-6.mga5
+ Revision: 818971
- Update to 2014-09-29d hotfix release

* Tue Mar 03 2015 tarakbumba <tarakbumba> 20140929-5.mga5
+ Revision: 817380
- Update to 2014-09-29c version (mga#15402) (CVE-2015-2172)

* Mon Dec 15 2014 tarakbumba <tarakbumba> 20140929-4.mga5
+ Revision: 803278
- Update to 20140929b hotfix release (mga#14807)
- Fixes CVE-2014-9253

* Wed Oct 15 2014 umeabot <umeabot> 20140929-3.mga5
+ Revision: 742590
- Second Mageia 5 Mass Rebuild

* Mon Oct 13 2014 tarakbumba <tarakbumba> 20140929-2.mga5
+ Revision: 738495
- Use hotfix version for source (mga#14252)
- Bump rel

* Wed Oct 08 2014 tarakbumba <tarakbumba> 20140929-1.mga5
+ Revision: 737593
- Update to 2014-09-29 version (fixes mga#14252)

* Fri Sep 26 2014 tv <tv> 20140505-4.mga5
+ Revision: 725050
- rebuild for bogus file deps

* Thu Sep 18 2014 joequant <joequant> 20140505-3.mga5
+ Revision: 694767
- fix autorequires

* Tue Sep 16 2014 umeabot <umeabot> 20140505-2.mga5
+ Revision: 678803
- Mageia 5 Mass Rebuild

  + tv <tv>
    - use %%global for req/prov exclude
    - autoconvert to new prov/req excludes

* Wed Jun 04 2014 tarakbumba <tarakbumba> 20140505-1.mga5
+ Revision: 633261
- Update to version 20140505

* Thu Dec 12 2013 spuhler <spuhler> 20131208-2.mga4
+ Revision: 556461
- added %%define _requires_exceptions  pear(Crypt.Hash.php)
 * the package is checking if we provide Crypt/Hash.php and we don't

* Mon Dec 09 2013 tarakbumba <tarakbumba> 20131208-1.mga4
+ Revision: 556039
-Update to 20131208

* Sat Oct 19 2013 umeabot <umeabot> 20130510-2.mga4
+ Revision: 532861
- Mageia 4 Mass Rebuild

* Fri Aug 23 2013 luigiwalser <luigiwalser> 20130510-1.mga4
+ Revision: 469961
- 20130510a

* Fri Jan 11 2013 umeabot <umeabot> 20121013-2.mga3
+ Revision: 349056
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Dec 11 2012 luigiwalser <luigiwalser> 20121013-1.mga3
+ Revision: 329685
- 2012-10-13 (fixes CVE-2011-3727 and CVE-2012-3354)

* Sun Sep 09 2012 guillomovitch <guillomovitch> 20120125-3.mga3
+ Revision: 291155
- make webapp configuration file compatible with apache 2.4
- install everything under %%{_datadir}/dokuwiki
- use symlinks rather than prepended file for achieving FHS setup
- don't change anything in configuration file, it prevents installation
- make webapp configuration file compatible with apache 2.4
- install everything under %%{_datadir}/%%{name}

* Wed Aug 08 2012 luigiwalser <luigiwalser> 20120125-2.mga3
+ Revision: 280024
- 2012-01-25b
- add link to images directory to fix padlock icon (mga #6480/6166)

* Fri Jun 01 2012 dams <dams> 20120125-1.mga3
+ Revision: 252765
- new version 2012-01-25a

* Tue Jun 21 2011 dmorgan <dmorgan> 20110525-2.mga2
+ Revision: 111382
- Fix requires
  Clean spec file

* Wed Jun 15 2011 kharec <kharec> 20110525-1.mga2
+ Revision: 106561
- imported package dokuwiki