File benno-web.spec of Package benno-web
#
# spec file for package benno-web
#
# Copyright (c) 2012,2013,2017,2018,2019 FSP Computer & Netzwerke, Schotten, Germany
#
# 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 to stefan.schaefer@fsproductions.de
#
# norootforbuild
Name: benno-web
Version: 2.10.2
Release: 1
Group: Productivity/Networking/Email/Servers
Summary: Email Archive - Benno MailArchiv Webfrontend
License: AGPL-3.0
Autoreqprov: on
URL: http://www.benno-mailarchiv.de
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl benno-archive sqlite3
BuildRequires: apache2
BuildRequires: fdupes
%if 0%{?sles_version} >= 11
Requires: mod_php_any
%else
Requires: mod_php_any php-pear
%endif
Requires: apache2 php
Requires: perl(Net::LDAP) perl(DBI) perl(DBD::mysql) perl(DBD::SQLite) sqlite3 perl perl(Crypt::Blowfish)
Requires: perl(Crypt::Eksblowfish) perl(Data::Entropy)
Requires: php-mysql php-ldap php-curl php-smarty php-pdo php-mbstring
BuildArch: noarch
Source1: README.openSUSE
Source2: README.SLES
Source3: benno-mysql.sql
Source5: BMA2_Tutorial_Erfolgreich_suchen_im_Archiv.pdf
Source6: benno-web.conf
Source7: 01_benno-attributes.ldif
Source8: 02_benno-objectclass.ldif
Source9: benno.schema
Source10: mkbennouserdb
Source11: vh-benno.conf.dist
%description
Benno MailArchiv Webfrontend
Using Benno MailArchiv is not free of charge. It is possible to get a
30 day evaluation license for testing.
For further information about licensing have a look at:
http://www.benno-mailarchiv.de or
http://www.fsproductions.de (Benno MailArchiv Partner)
Authors:
--------
Martin Werthmoeller <mw@lw-systems.de>
Stefan Schaefer <stefan.schaefer@fsproductions.de>
%prep
%setup -n %{name}-%{version}
%build
%install
export NO_BRP_CHECK_BYTECODE_VERSION=true
mkdir -p %{buildroot}
rm -rf install
mv * %{buildroot}
mkdir -p %{buildroot}%{_bindir}
#mv %{buildroot}/srv/benno/bennoweb/templates/en/header_auth.tpl.orig %{buildroot}/srv/benno/bennoweb/templates/en/header_auth.tpl.dist
#rm -f %{buildroot}/srv/benno/bennoweb/templates/.header_auth.tpl.swp
mkdir %{buildroot}%{_defaultdocdir}
mkdir -p %{buildroot}%{_sysconfdir}/apache2/conf.d
mkdir -p %{buildroot}%{_sysconfdir}/apache2/vhosts.d
mv %{buildroot}/usr/share/doc/%{name} %{buildroot}/%{_defaultdocdir}
mkdir %{buildroot}%{_defaultdocdir}/%{name}/ldap
%{__cp} %{S:1} %{buildroot}%{_defaultdocdir}/%{name}/README.openSUSE
%{__cp} %{S:2} %{buildroot}%{_defaultdocdir}/%{name}/README.SLES
%{__cp} %{S:7} %{buildroot}%{_defaultdocdir}/%{name}/ldap/01_benno-attributes.ldif
%{__cp} %{S:8} %{buildroot}%{_defaultdocdir}/%{name}/ldap/02_benno-objectclass.ldif
%{__cp} %{S:9} %{buildroot}%{_defaultdocdir}/%{name}/ldap/benno.schema
%{__cp} %{S:3} %{buildroot}/usr/share/%{name}/benno-mysql.sql
%{__cp} %{S:5} %{buildroot}%{_defaultdocdir}/%{name}/
%{__cp} %{S:6} %{buildroot}%{_sysconfdir}/apache2/conf.d/
%{__cp} %{S:10} %{buildroot}%{_bindir}/
%{__cp} %{S:11} %{buildroot}%{_sysconfdir}/apache2/vhosts.d/
rm -f %{buildroot}%{_sysconfdir}/apache2/conf.d/benno
mkdir -p %{buildroot}/var/cache/benno-web/templates_c
mkdir -p %{buildroot}%{_sysconfdir}/benno-web/auth.d
%fdupes %{buildroot}
%post
if [ ! -f /var/lib/benno-web/bennoweb.sqlite ] ; then
sqlite3 /var/lib/benno-web/bennoweb.sqlite < /usr/share/benno-web/db-create.sql > /dev/null 2>&1
sqlite3 /var/lib/benno-web/bennoweb.sqlite < /usr/share/benno-web/db-update_2.0.1.sql > /dev/null 2>&1
chown wwwrun.www /var/lib/benno-web/bennoweb.sqlite
fi
rm -f /var/cache/benno-web/templates_c/default/*.php
%files
%defattr(644,root,root,755)
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/auth.d
%config(noreplace) %{_sysconfdir}/%{name}/*
%config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}.conf
%config %{_sysconfdir}/apache2/vhosts.d/vh-benno.conf.dist
%dir /srv/benno/bennoweb
%dir %attr(775,root,www) /var/lib/%{name}
%attr(-,wwwrun,www) /srv/benno/bennoweb/*
%dir %doc %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/*
%doc %{_defaultdocdir}/%{name}/ldap/*
%attr(750,root,root) %{_sbindir}/benno-useradmin
%attr(755,roo,roo) %{_bindir}/mkbennouserdb
%dir %attr(775,root,root) /usr/lib/%{name}
%attr (755,root,root) /usr/lib/%{name}/benno_ldapauth
%attr (755,root,root) /usr/lib/%{name}/benno_sqliteauth
%attr (755,root,root) /usr/lib/%{name}/benno_dbauth
%attr (755,root,root) /usr/lib/%{name}/benno_ldapgroups
%attr (755,root,root) /usr/lib/%{name}/99_adminfilter
%dir /var/cache/%{name}/
%dir %attr(775,wwwrun,www) /var/cache/%{name}/templates_c
%attr(755,root,root) %{_sbindir}/benno-client
%attr(755,root,root) %{_sbindir}/benno_auth.d
%attr(755,root,root) %{_sbindir}/benno-filter
%attr(755,root,root) %{_sbindir}/benno-ptf
%dir /usr/share/%{name}
%attr(644,root,root) /usr/share/%{name}/Benno.pm
%dir /usr/share/%{name}/Benno
%attr(644,root,root) /usr/share/%{name}/Benno/Config.pm
%attr(644,root,root) /usr/share/%{name}/Benno/LDAP.pm
%dir /usr/share/%{name}/Benno/LDAP
%attr(644,root,root) /usr/share/%{name}/Benno/LDAP/Config.pm
%attr(644,root,root) /usr/share/%{name}/benno-mysql.sql
%attr(644,root,root) /usr/share/%{name}/bennoSchema.ldif
%attr(644,root,root) /usr/share/%{name}/Passwords.pm
%attr(644,root,root) /usr/share/%{name}/db-create.sql
%attr(644,root,root) /usr/share/%{name}/db-update_2.0.1.sql
%attr(644,root,root) /usr/share/%{name}/db-update_2.8.4.pl
%attr(644,root,root) /usr/share/%{name}/benno-authz.conf
%attr(644,root,root) /usr/share/%{name}/sendmail_mark
%changelog