File tine20.spec of Package tine20
#
# spec file for package tine20
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2010,2019 Weberhofer GmbH, Austria
#
# 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 via https://bugs.opensuse.org/
#
%define tine_base %{_datadir}/tine20
%define tine_var %{_localstatedir}/lib/tine20
# directories contained in tine20-base
%define tinebase_dirs "Addressbook Admin Setup Tinebase fonts images library vendor"
%if 0%{?suse_version}
%define apache_conf %{_sysconfdir}/apache2
%define apacheuser wwwrun
%define apachegroup www
BuildRequires: cron
%else
%define apache_conf %{_sysconfdir}/httpd
%define apacheuser apache
%define apachegroup apache
BuildRequires: crontabs
%endif
Name: tine20
Version: 2022.12.1
Release: 0
Summary: Open Source Groupware and CRM
License: AGPL-3.0-only OR GPL-3.0-only OR LGPL-2.0-only OR BSD-2-Clause
Group: System/Libraries
URL: https://www.tine20.org/
Source0: http://packages.tine20.org/source/%{version}/tine20-allinone_%{version}.tar.bz2
Source1: http://packages.tine20.org/source/%{version}/tine20-courses_%{version}.tar.bz2
Source2: http://packages.tine20.org/source/%{version}/tine20-humanresources_%{version}.tar.bz2
Source3: http://packages.tine20.org/source/%{version}/tine20-inventory_%{version}.tar.bz2
Source4: http://packages.tine20.org/source/%{version}/tine20-projects_%{version}.tar.bz2
Source5: http://packages.tine20.org/source/%{version}/tine20-simplefaq_%{version}.tar.bz2
Source6: http://packages.tine20.org/source/%{version}/tine20-voip_%{version}.tar.bz2
#Source7: http://packages.tine20.org/source/%%{version}/tine20-events_%%{version}.tar.bz2
Source100: tine20-admin.sh
Source101: tine20-asyncrunner.sh
Source104: tine20.cron
Source110: README.DISTRIBUTION
Source120: find_php_files.sh
BuildRequires: curl
BuildRequires: fdupes
BuildRequires: php-pear-HTMLPurifier
BuildRequires: php7 >= 7.4
BuildRequires: php7-devel >= 7.4
Requires: php-pear-HTMLPurifier
Requires: php7 >= 7.4
Requires: php7-openssl
Requires: tine20-activesync = %{version}
Requires: tine20-base = %{version}
Requires: tine20-calendar = %{version}
Requires: tine20-crm = %{version}
Requires: tine20-felamimail = %{version}
Requires: tine20-filemanager = %{version}
Requires: tine20-projects = %{version}
Requires: tine20-sales = %{version}
Requires: tine20-tasks = %{version}
Requires: tine20-timetracker = %{version}
BuildArch: noarch
%if 0%{?suse_version} >= 1330
Requires(pre): user(wwwrun)
%endif
%if 0%{?suse_version} < 1340
BuildRequires: php7-macros
%endif
%description
Tine 2.0 is an open source project, which combines groupware, CRM and ERP
into one system and is therefore useful for the the whole company, from
field staff to back office members.
Thanks to their consistent orientation to the users needs, Tine 2.0 makes
business collaboration easier and more enjoyable. Synergies, which the whole
company profits from, are being created through its deft linkage between and
among the different components, and the collective work on one master data
source.
This package provides a typical tine20 installation of the most common modules.
Tine 2.0 includes address book, calendar, email, tasks, time tracking and
CRM. Intelligent functions and links make collaboration in Tine 2.0 a true
pleasure and include:
* Synchronising mobile telephones
* VoiP integration
* Flexible assigning of authorisation rights
* Dynamic lists
* Search functions
* History
* PDF export
%package base
Summary: Tine's core, admin and addressbook module
License: AGPL-3.0-only AND GPL-3.0-only AND BSD-2-Clause AND LGPL-2.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: php >= 5.5
Requires: php-bcmath
Requires: php-calendar
Requires: php-fileinfo
Requires: php-gd
Requires: php-hash
Requires: php-iconv
Requires: php-intl
Requires: php-json
Requires: php-mysql
Requires: php-pear(htmlpurifier/HTMLPurifier) >= 4.3.0
Requires: php-zip
%if 0%{?suse_version}
Requires: apache2
Requires: cron
%if 0%{?sles_version} > 9
Suggests: php-APC
Suggests: php-pecl-memcache
%endif
%if 0%{?suse_version} > 1000
Suggests: php-ldap
Suggests: php-mysql
%endif
%else
Requires: crontabs
Requires: httpd
Requires: vixie-cron
%endif
%description base
This packages contains the core librarys of Tine 2.0 and the addressbook module.
Installing this package enables you to manage user accounts and contacts. Also
provides integration with openstreet map.
%package activesync
Summary: Module to share calendar and contacts via Active-Sync
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
Requires(pre): /bin/sh
Requires(pre): curl
%description activesync
This package allows a simple installation procedure for the
Tine20 ActiveSync-Components. ActiveSync allows you to
synchronize contacts, event, tasks and emails with your mobile phone.
The distribution of the Tine 2.0 ActiveSync module in or to
the United States of America is prohibited due to patent issues.
This package does not contain any files concerned by the above
mentioned patent issues. Only a installer for the module is included.
%package calendar
Summary: Calendar module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description calendar
This package contains the calendar module of Tine 2.0. Installing this package
enables you to schedule events for your self and other Tine 2.0 users.
%package courses
Summary: Courses module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description courses
This package contains the tine20 courses module.
%package crm
Summary: Customer-Relationship-Management module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
Requires: tine20-sales
Requires: tine20-tasks
%description crm
This package contains the CRM module of Tine 2.0. Installing this package
enables you to manage leads. Typically used by sales people.
#%%package events
#Summary: Alternative EMail Module
#License: AGPL-3.0-only
#Group: System/Libraries
#URL: http://www.tine20.org/
#Requires: tine20-events = %%{version}
#%%description events
#This module allows to schedule major events with assembly and disassembly calendar events.
#
%package felamimail
Summary: EMail Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description felamimail
This package contains the email module of Tine 2.0. Installing this package
enables you to read emails stored on a imap server. You can read emails on
multiple imap servers.
%package filemanager
Summary: Filemanager Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description filemanager
This package contains the filemanager module of Tine 2.0. Installing this package
enables you to store files on your webserver.
%package humanresources
Summary: Humanresources Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
Requires: tine20-calendar
Requires: tine20-sales
%description humanresources
Help to allocate the working time and free time (vacation, sickness) of
employees. Current features:
* create a (shared) feast calender: every day having an event in this
calendar could not be used as free time day because it is already a free day.
* create employee records, define how they are working (contract with
working-time-model, vacation days, feast-calendar).
* book free days or sickness days.
%package inventory
Summary: Inventory Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description inventory
This package contains the inventory module.
%package phone
Summary: Telephone Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
Requires: tine20-voipmanager
%description phone
This package contains the telephone module.
%package projects
Summary: Project-Management Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description projects
This package contains the projects module of Tine 2.0.
%package requesttracker
Summary: Request-Tracker Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description requesttracker
This package contains the request-tracker module.
%package sales
Summary: Sales Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description sales
This package contains the sales module of Tine 2.0. Installing this package
enables you to manage products and orders. This package has only very limited
functionality, because it's integrated into other modules (for example the CRM
module)
%package simplefaq
Summary: Simple-FAQ Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description simplefaq
This package contains the Simple-FAQ module.
%package sipgate
Summary: SIPgate Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description sipgate
This package contains the SIPgate module.
%package sso
Summary: SSO Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description sso
This package contains the SSO module.
%package tasks
Summary: Tasks Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description tasks
This package contains the Tasks module.
%package timetracker
Summary: Time-Tracker Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description timetracker
This package contains the tasks module of Tine 2.0. Installing this package
enables you to manage tasks.
%package voipmanager
Summary: VoIP-Manager Module
License: AGPL-3.0-only
Group: System/Libraries
URL: https://www.tine20.org/
Requires: tine20-base = %{version}
%description voipmanager
This package contains the VoIP-Manager module.
%prep
%setup -q -c %{name}-%{version} -a 1 -a 2 -a 3 -a 4 -a 5 -a 6
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
rm vendor/sabre/vobject/.travis.yml \
vendor/sabre/dav/.travis.yml
# remove and symlink
rm -rf vendor/ezyang/htmlpurifier/library/* \
vendor/phpoffice/phpexcel/*
# remove documentation and tests from new zendframework
rm -rf vendor/zendframework/zendframework1/demos
# remove example config
rm -f config.inc.php.dist
# remove files not to be included into distribution
for F in *~ *.yml .gitattributes .git .gitignore .gitmodules .jshintrc .npmignore .editorconfig \
.testem.json .verb.md .jscsrc .tern-project .gitmodules \
.eslintrc.js .eslintrc .eslintignore .min-wd \
.travis_shell_after_success.sh .keep .travis.install.sh \
.hhconfig .sami.php .doctrine-project.json .laminas-ci .laminas-ci.json \
.php-cs-fixer.dist.php .phpcs.xml.dist .github_changelog_generator \
.gitkeep .doctor-rst.yaml .requirements.txt .svnignore\
.php_cs* ; do
find ./ -name "$F" -exec rm -f '{}' \;
done
find ./ -name '.github' -type d -exec rm -rf '{}' \; || true
# remove test-cases
rm -rf \
symfony/dependency-injection/Tests \
Tinebase/js/node_modules/eventsource/test \
twig/twig/lib/Twig/Node/Expression/Test \
vendor/nikic/fast-route/test \
vendor/psr/log/Psr/Log/Test \
vendor/symfony/config/Tests \
vendor/symfony/console/Tests \
vendor/symfony/console/Tests/Fixtures \
vendor/symfony/debug/Tests \
vendor/symfony/filesystem/Tests \
vendor/twig/twig/lib/Twig/Test \
vendor/twig/twig/test \
vendor/zendframework/zendframework1/library/Zend/Test
# remove c-code
rm -f Tinebase/js/node_modules/uuid/benchmark/benchmark-native.c
# remove some .c and .h files
rm -rf vendor/twig/twig/ext/ vendor/symfony/debug/Resources/ext
# remove certs
rm -rf vendor/sentry/sentry/lib/Raven/data/cacert.pem
# remove library internal scripts
rm -rf \
vendor/bin/doctrine* \
vendor/doctrine/dbal/bin \
vendor/doctrine/orm/bin \
vendor/phpoffice/phpspreadsheet/bin
# fix interpretors
for F in "Voipmanager/Fritz/Monitor.php" \
"Voipmanager/Fritz/Monitor.php" \
"vendor/bin/export-plural-rules" \
"vendor/bin/generate-defuse-key" \
"vendor/bin/generate-deps-for-config-factory" \
"vendor/bin/generate-factory-for-class" \
"vendor/bin/generate_vcards" \
"vendor/bin/sabredav" \
"vendor/bin/var-dump-server" \
"vendor/bin/vobject" \
"vendor/defuse/php-encryption/bin/generate-defuse-key" \
"vendor/doctrine/dbal/ci/github/ext/install-ibm_db2.sh" \
"vendor/doctrine/dbal/run-all.sh" \
"vendor/gettext/languages/bin/export-plural-rules" \
"vendor/laminas/laminas-http/.laminas-ci/post-run.sh" \
"vendor/laminas/laminas-http/.laminas-ci/pre-run.sh" \
"vendor/laminas/laminas-servicemanager/bin/generate-deps-for-config-factory" \
"vendor/laminas/laminas-servicemanager/bin/generate-factory-for-class" \
"vendor/paragonie/random_compat/build-phar.sh" \
"vendor/simplesamlphp/simplesamlphp/bin/build-release.sh" \
"vendor/simplesamlphp/simplesamlphp/bin/importPdoMetadata.php" \
"vendor/simplesamlphp/simplesamlphp/bin/initMDSPdo.php" \
"vendor/simplesamlphp/simplesamlphp/bin/ldapattrschemaparser.pl" \
"vendor/simplesamlphp/simplesamlphp/bin/memcacheSync.php" \
"vendor/simplesamlphp/simplesamlphp/bin/pwgen.php" \
"vendor/simplesamlphp/simplesamlphp/bin/translateAttributes.php" \
"vendor/simplesamlphp/simplesamlphp/modules/adfs/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/authYubikey/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/authcrypt/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/authorize/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/authtwitter/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/authwindowslive/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/cas/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/cdc/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/consent/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/consentAdmin/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/cron/bin/cron.php" \
"vendor/simplesamlphp/simplesamlphp/modules/discopower/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/exampleattributeserver/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/ldap/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/metarefresh/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/metarefresh/bin/metarefresh.php" \
"vendor/simplesamlphp/simplesamlphp/modules/oauth/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/preprodwarning/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/riak/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/sanitycheck/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/smartattributes/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/sqlauth/bin/check-syntax.sh" \
"vendor/simplesamlphp/simplesamlphp/modules/statistics/bin/loganalyzer.php" \
"vendor/simplesamlphp/simplesamlphp/modules/statistics/bin/logcleaner.php" \
"vendor/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php" \
"vendor/symfony/var-dumper/Resources/bin/var-dump-server" ; do
sed -i -e 's|^#!%{_bindir}/env \([a-z]*\)|### %{_bindir}/$1|' "$F"
done
for F in langHelper.php tine20.php ; do
sed -i -e 's|^#!%{_bindir}/env php|#!%{_bindir}/php|' "$F"
done
%build
%install
%if 0%{?suse_version} == 1110
export NO_BRP_CHECK_BYTECODE_VERSION=true
%endif
install -d -m 0755 %{buildroot}%{tine_base}
# install files for the base package and symlink duplicates
for F in %{tinebase_dirs} ; do
cp -a $F %{buildroot}%{tine_base}
done
%if 0%{?suse_version} > 1020
%fdupes %{buildroot}%{tine_base}
%endif
# install all other files /do not overwrite)
for FILE in * ; do
if ! [[ %{tinebase_dirs} =~ "$FILE" ]] ; then
cp -a "$FILE" %{buildroot}%{tine_base}
fi
done
pushd %{buildroot}%{tine_base}
# move documentation
# LICENSE and PRIVACY files should stay in the base directory,
# because they are needed during the setup-process
install -d -m 0755 %{buildroot}%{_docdir}/%{name}
for F in RELEASENOTES ; do
mv $F %{buildroot}%{_docdir}/%{name}/
done
install -m 0644 %{SOURCE110} %{buildroot}%{_docdir}/%{name}/
# remove this file from the docs
rm -rf docs
# remove duplicates
%if 0%{?suse_version} > 1020
for DIR in `ls -d **/` ; do
if ! [[ %{tinebase_dirs} =~ "$DIR" ]] ; then
%fdupes %{buildroot}%{tine_base}/$DIR
fi
done
%endif
# link external libraries
for FILE in %{pear_phpdir}/HTMLPurifier* ; do
ln -s "$FILE" vendor/ezyang/htmlpurifier/library/
done
# install admintools
install -d -m 0755 %{buildroot}%{_bindir}
install -m 0750 %{SOURCE100} %{buildroot}%{_bindir}/tine20-admin
install -m 0755 %{SOURCE101} %{buildroot}%{_bindir}/tine20-asyncrunner.sh
# install cronjobs
install -d -m 0755 %{buildroot}%{_sysconfdir}/cron.d
install -m 0644 %{SOURCE104} %{buildroot}%{_sysconfdir}/cron.d/tine20
# create configurations
install -d -m 0755 %{buildroot}%{apache_conf}/conf.d
%{buildroot}%{_bindir}/tine20-admin install "%{tine_var}" --prefix %{buildroot} \
> %{buildroot}%{apache_conf}/conf.d/tine20.conf
sed -i %{buildroot}%{apache_conf}/conf.d/tine20.conf -e 's/^\t//'
popd
# collect the language files
install -m 0755 %{SOURCE120} %{buildroot}%{_bindir}find_php_files
%{buildroot}%{_bindir}find_php_files %{buildroot} base \
"%{tine_base}/Addressbook" "%{tine_base}/Admin" \
"%{tine_base}/CoreData" \
"%{tine_base}/Setup" "%{tine_base}/Tinebase"
for DIR in ActiveSync Calendar Courses Crm Felamimail Filemanager HumanResources \
Inventory Phone Projects \
Sales SimpleFAQ SSO Tasks Timetracker Voipmanager ; do
%{buildroot}%{_bindir}find_php_files %{buildroot} "$DIR" "%{tine_base}/$DIR"
done
rm -f %{buildroot}%{_bindir}find_php_files
# escape spaces in file list
sed -i -e 's/Anleitung fuer die Einrichtung vom ownCloud Client.docx/Anleitung*/' Filemanager.lang
%pre base
# delete the old %%{tine_base}/vendor/zendframework/zendframework1/library/Zend directory:
# rpm is not able to change from a symlink
if [ -L %{tine_base}/vendor/zendframework/zendframework1/library/Zend ] ; then
rm -rf %{tine_base}/vendor/zendframework/zendframework1/library/Zend
fi
if [ -L %{tine_base}/vendor/phpoffice/phpexcel/PHPExcel.php ] ; then
rm -rf %{tine_base}/vendor/phpoffice/phpexcel/PHPExcel.php
fi
if [ -L %{tine_base}/vendor/phpoffice/phpexcel/PHPExcel ] ; then
rm -rf %{tine_base}/vendor/phpoffice/phpexcel/PHPExcel
fi
%post base
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
# relink if installed on an opensuse php5 environment
PHP=`php -v | head -n1 | sed -e 's/[\.].*$// ; s/ //' | tr '[:upper:]' '[:lower:]'`
PEAR_BASE="%{_datadir}/$PHP/PEAR"
for FILE in $PEAR_BASE/HTMLPurifier* ; do
FNAME=`basename $FILE`
if [ -z `readlink -f "%{tine_base}/vendor/ezyang/htmlpurifier/library/$FNAME"` ] ; then
rm "%{tine_base}/vendor/ezyang/htmlpurifier/library/$FNAME"
ln -s "$FILE" "%{tine_base}/vendor/ezyang/htmlpurifier/library/"
fi
done
%post activesync
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun activesync
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post calendar
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun calendar
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post courses
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun courses
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post crm
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun crm
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
#%%post events
#[ $1 -eq 1 ] && %%{_bindir}/tine20-admin addremove || %%{_bindir}/tine20-admin update
#%%postun events
#[ $1 -eq 0 -a -x %%{_bindir}/tine20-admin ] && %%{_bindir}/tine20-admin addremove || exit 0
%post felamimail
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun felamimail
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post filemanager
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun filemanager
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post humanresources
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun humanresources
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post inventory
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun inventory
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post phone
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun phone
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post projects
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun projects
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post requesttracker
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun requesttracker
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post sales
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun sales
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post simplefaq
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun simplefaq
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post sipgate
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun sipgate
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post sso
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun sso
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post tasks
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun tasks
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post timetracker
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun timetracker
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%post voipmanager
[ $1 -eq 1 ] && %{_bindir}/tine20-admin addremove || %{_bindir}/tine20-admin update
%postun voipmanager
[ $1 -eq 0 -a -x %{_bindir}/tine20-admin ] && %{_bindir}/tine20-admin addremove || exit 0
%files
%dir %{tine_base}
%files base -f base.lang
%dir %{tine_base}
%{tine_base}/favicon.ico
%{tine_base}/CREDITS
%{tine_base}/LICENSE
%{tine_base}/PRIVACY
#
%{tine_base}/fonts
%{tine_base}/images
%{tine_base}/library
%{tine_base}/vendor
%exclude %{tine_base}/vendor/sabre/**/bin
%attr(0744, root, root) %{tine_base}/*.php
%doc %{_docdir}/%{name}
%dir %{apache_conf}
%dir %{apache_conf}/conf.d
%config(noreplace) %{apache_conf}/conf.d/%{name}.conf
%config(noreplace) %{_sysconfdir}/cron.d/tine20
%dir %{tine_var}
%dir %{tine_var}/webroot
%{tine_var}/webroot/favicon.ico
%{tine_var}/webroot/CREDITS
%{tine_var}/webroot/LICENSE
%{tine_var}/webroot/PRIVACY
#
%{tine_var}/webroot/Addressbook
%{tine_var}/webroot/Admin
%{tine_var}/webroot/CoreData
%{tine_var}/webroot/Setup
%{tine_var}/webroot/Tinebase
%{tine_var}/webroot/fonts
%{tine_var}/webroot/images
%{tine_var}/webroot/library
%{tine_var}/webroot/vendor
%{tine_var}/webroot/[^c]*.php
%config(noreplace) %{tine_var}/webroot/config.inc.php
%defattr(0644, %{apacheuser}, %{apachegroup}, 0755)
%dir %{tine_var}/files
%dir %{tine_var}/session
%dir %{tine_var}/tmp
%dir %{tine_var}/log
%attr(0750,root,root) %{_bindir}/tine20-admin
%attr(0755,root,root) %{_bindir}/tine20-asyncrunner.sh
%files activesync -f ActiveSync.lang
%{tine_var}/webroot/ActiveSync
%files calendar -f Calendar.lang
%{tine_var}/webroot/Calendar
%files courses -f Courses.lang
%{tine_var}/webroot/Courses
%files crm -f Crm.lang
%{tine_var}/webroot/Crm
#%%files events -f Events.lang
#%%{tine_var}/webroot/Events
%files felamimail -f Felamimail.lang
%{tine_var}/webroot/Felamimail
%files filemanager -f Filemanager.lang
%{tine_var}/webroot/Filemanager
%files humanresources -f HumanResources.lang
%{tine_var}/webroot/HumanResources
%files inventory -f Inventory.lang
%{tine_var}/webroot/Inventory
%files phone -f Phone.lang
%{tine_var}/webroot/Phone
%files projects -f Projects.lang
%{tine_var}/webroot/Projects
%files sales -f Sales.lang
%{tine_var}/webroot/Sales
%files simplefaq -f SimpleFAQ.lang
%{tine_var}/webroot/SimpleFAQ
%files sso -f SSO.lang
%{tine_var}/webroot/SSO
%files tasks -f Tasks.lang
%{tine_var}/webroot/Tasks
%files timetracker -f Timetracker.lang
%{tine_var}/webroot/Timetracker
%files voipmanager -f Voipmanager.lang
%{tine_var}/webroot/Voipmanager
%changelog