Projects
home:mollekopf:branches:Kolab:Winterfell
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
pykolab.spec
Changed
@@ -2,11 +2,18 @@ #!BuildIgnore: systemd %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 +%if 0%{?rhel} >= 8 +%global py2 3 +%global use_python3 1 +%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%global pykolab_python_sitelib %{python3_sitelib} +%else %global py2 2 +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%global pykolab_python_sitelib %{python2_sitelib} %endif -%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + %if 0%{?suse_version} || 0%{?fedora} > 17 || 0%{?rhel} > 6 %global with_systemd 1 @@ -31,6 +38,17 @@ %global kolabr_group kolab-r %global kolabr_group_id 414 + +%if 0%{?suse_version} +%global pythonmysql python-mysql +%else +%if 0%{?rhel} >= 8 +%global pythonmysql python3-PyMySQL +%else +%global pythonmysql MySQL-python +%endif +%endif + Summary: Kolab Groupware Solution Name: pykolab Version: 0.8.23 @@ -59,13 +77,7 @@ BuildRequires: gettext BuildRequires: glib2-devel BuildRequires: intltool - -%if 0%{?suse_version} -BuildRequires: python-mysql -%else -BuildRequires: MySQL-python -%endif - +BuildRequires: %{pythonmysql} BuildRequires: python%{?py2} BuildRequires: python%{?py2}-augeas BuildRequires: python%{?py2}-gnupg @@ -74,7 +86,6 @@ BuildRequires: python%{?py2}-kolabformat BuildRequires: python%{?py2}-ldap BuildRequires: python%{?py2}-nose -BuildRequires: python%{?py2}-pep8 BuildRequires: python%{?py2}-pyasn1 BuildRequires: python%{?py2}-pyasn1-modules %if 0%{?rhel} < 8 && 0%{?fedora} < 1 @@ -85,7 +96,8 @@ BuildRequires: python%{?py2}-sievelib BuildRequires: python%{?py2}-six BuildRequires: python%{?py2}-sqlalchemy -BuildRequires: python%{?py2}-twisted-core +#FIXME only used for unittests +#BuildRequires: python%{?py2}-twisted-core BuildRequires: python%{?py2}-tzlocal Requires: kolab-cli = %{version}-%{release} @@ -140,10 +152,10 @@ Summary: Kolab XML format wrapper for %{name} Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: python-icalendar -Requires: python-kolab -Requires: python-kolabformat >= 0.5 -Requires: python-tzlocal +Requires: python{?py2}-icalendar +Requires: python{?py2}-kolab +Requires: python{?py2}-kolabformat >= 0.5 +Requires: python{?py2}-tzlocal %description xml Kolab Format XML bindings wrapper for %{name} @@ -155,9 +167,9 @@ Summary: Kolab CLI components Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: python-augeas -Requires: python-cheetah -Requires: python-sqlalchemy +Requires: python{?py2}-augeas +Requires: python{?py2}-cheetah +Requires: python{?py2}-sqlalchemy %description -n kolab-cli Kolab CLI utilities @@ -171,7 +183,7 @@ Requires: %{name} = %{version}-%{release} Requires: cyrus-sasl Requires: cyrus-sasl-plain -Requires: python-sqlalchemy +Requires: python{?py2}-sqlalchemy %description -n kolab-saslauthd Kolab SASL Authentication Daemon for multi-domain, multi-authn database deployments @@ -198,12 +210,8 @@ %endif Requires: postfix Requires: %{name} = %{version}-%{release} -Requires: python-sqlalchemy -%if 0%{?suse_version} -Requires: python-mysql -%else -Requires: MySQL-python -%endif +Requires: python{?py2}-sqlalchemy +Requires: %{pythonmysql} %description -n postfix-kolab Kolab SMTP Access Policy for Postfix @@ -215,15 +223,11 @@ Summary: Kolab Content-Filter Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: python-sqlalchemy -%if 0%{?suse_version} -Requires: python-mysql -%else -Requires: MySQL-python -%endif -Requires: python-gnupg -Requires: python-icalendar >= 3.0 -Requires: python-tzlocal +Requires: python{?py2}-sqlalchemy +Requires: %{pythonmysql} +Requires: python{?py2}-gnupg +Requires: python{?py2}-icalendar >= 3.0 +Requires: python{?py2}-tzlocal Requires: %{name}-xml = %{version}-%{release} %description -n wallace @@ -232,8 +236,21 @@ %prep %setup -q +%if 0%{?use_python3} +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' kolabd.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' saslauthd.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' conf.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' setup-kolab.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' wallace.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' kolab-cli.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' bin/kolab_parse_telemetry.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' bin/kolab_smtp_access_policy.py +%endif + + %build autoreconf -v || automake --add-missing && autoreconf -v + %configure %install @@ -275,11 +292,11 @@ %find_lang pykolab %if 0%{?suse_version} -%fdupes %{buildroot}/%{python_sitelib} +%fdupes %{buildroot}/%{pykolab_python_sitelib} %endif %if 0%{?kolab_enterprise} -rm -rf %{buildroot}%{python_sitelib}/pykolab/setup/setup_manticore.py* +rm -rf %{buildroot}%{pykolab_python_sitelib}/pykolab/setup/setup_manticore.py* %endif %pre @@ -413,27 +430,34 @@ %attr(0750,kolab-n,kolab) %dir %{_sysconfdir}/kolab %attr(0640,kolab-n,kolab) %config(noreplace) %{_sysconfdir}/kolab/kolab.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%dir %{python_sitelib}/pykolab/ -%exclude %{python_sitelib}/pykolab/telemetry.* -%{python_sitelib}/pykolab/*.py -%{python_sitelib}/pykolab/*.pyc -%{python_sitelib}/pykolab/*.pyo -%{python_sitelib}/pykolab/auth/ -%{python_sitelib}/pykolab/conf/ -%{python_sitelib}/pykolab/imap/ -%{python_sitelib}/pykolab/itip/ -%dir %{python_sitelib}/pykolab/plugins/ -%{python_sitelib}/pykolab/plugins/*.py -%{python_sitelib}/pykolab/plugins/*.pyc -%{python_sitelib}/pykolab/plugins/*.pyo -%{python_sitelib}/pykolab/plugins/defaultfolders -%{python_sitelib}/pykolab/plugins/dynamicquota -%{python_sitelib}/pykolab/plugins/recipientpolicy -%exclude %{python_sitelib}/pykolab/plugins/sievemgmt + + +%dir %{pykolab_python_sitelib}/pykolab/ +%exclude %{pykolab_python_sitelib}/pykolab/telemetry.* +%{pykolab_python_sitelib}/pykolab/*.py +%{pykolab_python_sitelib}/pykolab/*.pyc +%{pykolab_python_sitelib}/pykolab/*.pyo +%{pykolab_python_sitelib}/pykolab/__pycache__/ +%{pykolab_python_sitelib}/pykolab/auth/ +%{pykolab_python_sitelib}/pykolab/conf/ +%{pykolab_python_sitelib}/pykolab/imap/ +%{pykolab_python_sitelib}/pykolab/itip/ +%dir %{pykolab_python_sitelib}/pykolab/plugins/ +%{pykolab_python_sitelib}/pykolab/plugins/*.py +%{pykolab_python_sitelib}/pykolab/plugins/*.pyc +%{pykolab_python_sitelib}/pykolab/plugins/*.pyo +%{pykolab_python_sitelib}/pykolab/plugins/__pycache__/ +%{pykolab_python_sitelib}/pykolab/plugins/defaultfolders +%{pykolab_python_sitelib}/pykolab/plugins/dynamicquota +%{pykolab_python_sitelib}/pykolab/plugins/recipientpolicy +%exclude %{pykolab_python_sitelib}/pykolab/plugins/sievemgmt %if 0%{?suse_version} -%exclude %{python_sitelib}/kolab/ +%exclude %{pykolab_python_sitelib}/kolab/ %endif -%{python_sitelib}/cyruslib.py* +%{pykolab_python_sitelib}/cyruslib.py* +%pycached %{pykolab_python_sitelib}/cyruslib.py + + %attr(0775,kolab,kolab-n) %dir %{_localstatedir}/lib/kolab/ %attr(0775,kolab,kolab-n) %dir %{_localstatedir}/log/kolab/ @@ -441,15 +465,16 @@ %defattr(-,root,root,-) %doc AUTHORS COPYING %{_sbindir}/kolab_parse_telemetry -#%{python_sitelib}/pykolab/cli/commandgroups/telemetry.py -%{python_sitelib}/pykolab/telemetry.* -%{python_sitelib}/pykolab/cli/telemetry/ +#%{pykolab_python_sitelib}/pykolab/cli/commandgroups/telemetry.py +%{pykolab_python_sitelib}/pykolab/telemetry.* +%{pykolab_python_sitelib}/pykolab/cli/telemetry/ %files xml -%dir %{python_sitelib}/pykolab/xml -%{python_sitelib}/pykolab/xml/*.py -%{python_sitelib}/pykolab/xml/*.pyc -%{python_sitelib}/pykolab/xml/*.pyo +%dir %{pykolab_python_sitelib}/pykolab/xml +%{pykolab_python_sitelib}/pykolab/xml/*.py +%{pykolab_python_sitelib}/pykolab/xml/*.pyc +%{pykolab_python_sitelib}/pykolab/xml/*.pyo +%{pykolab_python_sitelib}/pykolab/xml/__pycache__/ %files -n kolab-cli %defattr(-,root,root,-) @@ -459,23 +484,27 @@ %dir %{_sysconfdir}/kolab/templates %dir %{_datadir}/kolab %{_datadir}/kolab/templates -%dir %{python_sitelib}/pykolab/cli/ -%{python_sitelib}/pykolab/cli/*.py -%{python_sitelib}/pykolab/cli/*.pyc -%{python_sitelib}/pykolab/cli/*.pyo -%exclude %{python_sitelib}/pykolab/cli/sieve -%dir %{python_sitelib}/pykolab/cli/wap -%{python_sitelib}/pykolab/cli/wap/*.py -%{python_sitelib}/pykolab/cli/wap/*.pyc -%{python_sitelib}/pykolab/cli/wap/*.pyo -%dir %{python_sitelib}/pykolab/setup/ -%{python_sitelib}/pykolab/setup/*.py -%{python_sitelib}/pykolab/setup/*.pyc -%{python_sitelib}/pykolab/setup/*.pyo -%dir %{python_sitelib}/pykolab/wap_client/ -%{python_sitelib}/pykolab/wap_client/*.py -%{python_sitelib}/pykolab/wap_client/*.pyc -%{python_sitelib}/pykolab/wap_client/*.pyo +%dir %{pykolab_python_sitelib}/pykolab/cli/ +%{pykolab_python_sitelib}/pykolab/cli/*.py +%{pykolab_python_sitelib}/pykolab/cli/*.pyc +%{pykolab_python_sitelib}/pykolab/cli/*.pyo +%exclude %{pykolab_python_sitelib}/pykolab/cli/sieve +%dir %{pykolab_python_sitelib}/pykolab/cli/wap +%{pykolab_python_sitelib}/pykolab/cli/wap/*.py +%{pykolab_python_sitelib}/pykolab/cli/wap/*.pyc +%{pykolab_python_sitelib}/pykolab/cli/wap/*.pyo +%{pykolab_python_sitelib}/pykolab/cli/wap/__pycache__/ +%{pykolab_python_sitelib}/pykolab/cli/__pycache__/ +%dir %{pykolab_python_sitelib}/pykolab/setup/ +%{pykolab_python_sitelib}/pykolab/setup/*.py +%{pykolab_python_sitelib}/pykolab/setup/*.pyc +%{pykolab_python_sitelib}/pykolab/setup/*.pyo +%{pykolab_python_sitelib}/pykolab/setup/__pycache__/ +%dir %{pykolab_python_sitelib}/pykolab/wap_client/ +%{pykolab_python_sitelib}/pykolab/wap_client/*.py +%{pykolab_python_sitelib}/pykolab/wap_client/*.pyc +%{pykolab_python_sitelib}/pykolab/wap_client/*.pyo +%{pykolab_python_sitelib}/pykolab/wap_client/__pycache__/ %files -n kolab-saslauthd %defattr(-,root,root,-) @@ -495,7 +524,7 @@ %config(noreplace) %{_sysconfdir}/sysconfig/kolab-saslauthd %endif %{_sbindir}/kolab-saslauthd -%{python_sitelib}/saslauthd/ +%{pykolab_python_sitelib}/saslauthd/ %if 0%{?suse_version} > 0 || 0%{?fedora} > 17 || 0%{?rhel} > 6 %ghost %dir %{_rundir}/kolab-saslauthd %ghost %dir %{_rundir}/saslauthd @@ -525,7 +554,7 @@ %config(noreplace) %{_sysconfdir}/sysconfig/kolabd %endif %{_sbindir}/kolabd -%{python_sitelib}/kolabd/ +%{pykolab_python_sitelib}/kolabd/ %if 0%{?suse_version} > 0 || 0%{?fedora} > 17 || 0%{?rhel} > 6 %ghost %dir %{_rundir}/kolabd %else @@ -562,7 +591,7 @@ %config(noreplace) %{_sysconfdir}/sysconfig/wallace %endif %{_sbindir}/wallaced -%{python_sitelib}/wallace +%{pykolab_python_sitelib}/wallace %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.