File web2ldap.spec of Package web2ldap
#
# spec file for package web2ldap
#
# Copyright (c) 2018-2021 SUSE LINUX Products GmbH, Nuernberg, 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.
%global modname web2ldap
Name: web2ldap
Version: 1.8.1
Release: 0
Summary: Full-featured LDAP client running as web application
License: Apache-2.0
Group: Productivity/Networking/LDAP/Clients
Url: https://www.web2ldap.de
Source0: https://www.web2ldap.de/download/%{modname}-%{version}.tar.gz
Source1: https://www.web2ldap.de/download/%{modname}-%{version}.tar.gz.asc
Source2: %{name}.keyring
Source3: %{name}-tmpfiles
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-setuptools
Requires: python3-ldap0 >= 1.0.1
Requires: python3-asn1crypto
Requires: python3-xlwt
Requires: python3-paramiko
Requires: python3-iso3166
Requires(pre): shadow
Recommends: python3-gunicorn
Recommends: python3-defusedxml
Recommends: python3-phonenumbers
Suggests: python3-dnspython >= 2.0.0
Suggests: python3-Pillow
Suggests: python3-prometheus_client >= 0.7.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
web2ldap is:
* A generic LDAPv3 client which does not make any assumptions
about the tree structure or LDAP schema.
* Kind of a swiss-army knife for accessing/manipulating
LDAP servers without having to configure anything.
* A secure LDAP client with clean login behaviour.
* A schema browser which displays references/dependencies
within an LDAPv3 schema.
* A customizable platform for prototyping
LDAP administration use-cases.
%prep
%setup -q -n %{modname}-%{version}
%build
%python3_build
%install
%python3_install --install-data /
%fdupes %{buildroot}
mkdir -p %{buildroot}%{_tmpfilesdir}
install -p -m644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/web2ldap.conf
%pre
# creating group and user web2ldap
%{_bindir}/getent group web2ldap >/dev/null || %{_sbindir}/groupadd -r web2ldap -g 1760
%{_bindir}/getent passwd web2ldap >/dev/null || \
%{_sbindir}/useradd -r -u 1760 -g web2ldap -d / -s /sbin/nologin \
-c "web2ldap service user" web2ldap
%post
%tmpfiles_create %{name}.conf
%files
%defattr(-,root,root,-)
%{python3_sitelib}/*
%{_bindir}/web2ldap
%{_tmpfilesdir}/web2ldap.conf
%dir %{_sysconfdir}/web2ldap
%config(noreplace) %{_sysconfdir}/web2ldap/*
%ghost %attr(0750, web2ldap, web2ldap) %{_rundir}/web2ldap
%license LICENSE
%changelog