123 lines
2.5 KiB
RPMSpec
123 lines
2.5 KiB
RPMSpec
|
%bcond_without luajit
|
||
|
|
||
|
Summary: addons for the OpenSMTPD SMTP server
|
||
|
Name: opensmtpd-extras
|
||
|
Version: 6.7.1
|
||
|
Release: 1%{?dist}
|
||
|
|
||
|
License: ISC
|
||
|
URL: http://www.opensmtpd.org/
|
||
|
|
||
|
Source0: https://github.com/OpenSMTPD/%{name}/archive/%{version}/opensmtpd-extras-%{version}.tar.gz
|
||
|
|
||
|
|
||
|
BuildRequires: libtool
|
||
|
BuildRequires: hiredis-devel
|
||
|
BuildRequires: krb5-devel
|
||
|
|
||
|
%if 0%{?rhel} <= 7
|
||
|
BuildRequires: postgresql-devel
|
||
|
%else
|
||
|
BuildRequires: libpq-devel
|
||
|
%endif
|
||
|
BuildRequires: sqlite-devel
|
||
|
BuildRequires: mysql-devel
|
||
|
%if 0%{?rhel} >= 7
|
||
|
BuildRequires: automake autoconf m4
|
||
|
BuildRequires: libevent-devel
|
||
|
BuildRequires: python3-devel
|
||
|
%global __py_name python3
|
||
|
%else
|
||
|
BuildRequires: automake1.16 autoconf2.69 m4_next
|
||
|
BuildRequires: libevent2-devel
|
||
|
BuildRequires: python38-devel
|
||
|
%global __py_name python3.8
|
||
|
%endif
|
||
|
|
||
|
%if 0%{?rhel} < 9
|
||
|
BuildRequires: openssl3-devel
|
||
|
%else
|
||
|
BuildRequires: openssl-devel
|
||
|
%endif
|
||
|
|
||
|
%if %{with luajit}
|
||
|
BuildRequires: luajit-devel
|
||
|
%else
|
||
|
BuildRequires: lua-devel
|
||
|
%endif
|
||
|
|
||
|
Requires: opensmtpd
|
||
|
|
||
|
%description
|
||
|
This package provides a subset of addons for OpenSMTPD, including
|
||
|
experimental ones. Please see each for a description of additional
|
||
|
dependencies.
|
||
|
* Tables:
|
||
|
+ ldap: support lookup against LDAP
|
||
|
+ mysql: support lookup against MySQL
|
||
|
+ passwd: support lookup in passwd-format tables
|
||
|
+ postgres: support lookup against PostgreSQL
|
||
|
+ redis: support lookup against a Redis server
|
||
|
+ socketmap: support lookups against sockets
|
||
|
+ sqlite: support lookup in SQLite tables
|
||
|
|
||
|
%prep
|
||
|
%autosetup -p1
|
||
|
|
||
|
%build
|
||
|
|
||
|
export REDIS_CPPFLAGS='-I /usr/include/hiredis'
|
||
|
%if 0%{?rhel} == 6
|
||
|
. /etc/profile.d/modules.sh
|
||
|
module load automake
|
||
|
module load autoconf
|
||
|
module load m4
|
||
|
%endif
|
||
|
|
||
|
%if 0%{?rhel} < 9
|
||
|
export CFLAGS="-I%{_includedir}/openssl3 -fPIC $CFLAGS"
|
||
|
%endif
|
||
|
|
||
|
./bootstrap
|
||
|
|
||
|
%configure \
|
||
|
--prefix=/usr \
|
||
|
--sysconfdir=/etc/smtpd \
|
||
|
--with-pie \
|
||
|
--with-mantype=man \
|
||
|
--with-queue-ram \
|
||
|
--with-scheduler-ram \
|
||
|
--with-scheduler-stub \
|
||
|
--with-table-ldap \
|
||
|
--with-table-mysql \
|
||
|
--with-table-passwd \
|
||
|
--with-table-postgres \
|
||
|
--with-table-redis \
|
||
|
--with-table-socketmap \
|
||
|
--with-table-sqlite \
|
||
|
--with-table-stub \
|
||
|
%if %{with luajit}
|
||
|
--with-lua-type=luajit \
|
||
|
%else
|
||
|
--with-lua-type=lua \
|
||
|
%endif
|
||
|
--with-python=%{_prefix} \
|
||
|
--with-python-type=%{__py_name}
|
||
|
|
||
|
make %{?_smp_mflags}
|
||
|
|
||
|
%install
|
||
|
make install DESTDIR=%{buildroot}
|
||
|
|
||
|
|
||
|
%files
|
||
|
%{_libexecdir}/opensmtpd/queue-*
|
||
|
%{_libexecdir}/opensmtpd/scheduler-*
|
||
|
%{_libexecdir}/opensmtpd/table-*
|
||
|
%{_mandir}/man5/table-*.5.*
|
||
|
|
||
|
|
||
|
%changelog
|
||
|
* Wed Oct 4 2023 Raven <raven@sysadmins.ws> - 6.7.1-1
|
||
|
- Initial release
|