add build require of lmdb
(cherry picked from commit 6ca28106b5ca98d7cb2434b22f95743705d7f79f)
This commit is contained in:
parent
22cc459c2b
commit
4233f9b116
21
postfix.spec
21
postfix.spec
@ -23,7 +23,7 @@
|
|||||||
Name: postfix
|
Name: postfix
|
||||||
Summary: Postfix Mail Transport Agent
|
Summary: Postfix Mail Transport Agent
|
||||||
Version: 3.3.1
|
Version: 3.3.1
|
||||||
Release: 16
|
Release: 17
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
URL: http://www.postfix.org
|
URL: http://www.postfix.org
|
||||||
License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+)
|
License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+)
|
||||||
@ -47,7 +47,7 @@ Patch8: fix-build-error-with_glibc2.30-ftbfs.patch
|
|||||||
Patch9: fix-multiple-definition-error-with-gcc-10.patch
|
Patch9: fix-multiple-definition-error-with-gcc-10.patch
|
||||||
Patch10: postfix-3.6.2-glibc-234-build-fix.patch
|
Patch10: postfix-3.6.2-glibc-234-build-fix.patch
|
||||||
|
|
||||||
BuildRequires: perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
|
BuildRequires: lmdb-devel perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
|
||||||
BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel openssl-devel procps-ng
|
BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel openssl-devel procps-ng
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
Requires(post): systemd-sysv %{_sbindir}/alternatives %{_bindir}/openssl
|
Requires(post): systemd-sysv %{_sbindir}/alternatives %{_bindir}/openssl
|
||||||
@ -129,11 +129,13 @@ for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
|
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
|
||||||
CCARGS="-fPIC"
|
CCARGS="-fPIC"
|
||||||
AUXLIBS="-lnsl"
|
AUXLIBS="-lnsl"
|
||||||
CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 %{?with_sasl:-DUSE_LDAP_SASL}"
|
CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 %{?with_sasl:-DUSE_LDAP_SASL}"
|
||||||
AUXLIBS_LDAP="-lldap -llber"
|
AUXLIBS_LDAP="-lldap -llber"
|
||||||
|
CCARGS="${CCARGS} -DHAS_LMDB"
|
||||||
|
AUXLIBS_LMDB="-llmdb"
|
||||||
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre"
|
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre"
|
||||||
AUXLIBS_PCRE="-lpcre"
|
AUXLIBS_PCRE="-lpcre"
|
||||||
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql"
|
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql"
|
||||||
@ -161,7 +163,7 @@ LDFLAGS="%{?__global_ldflags} %{?_hardened_build:-Wl,-z,relro,-z,now}"
|
|||||||
|
|
||||||
make -f Makefile.init makefiles shared=yes dynamicmaps=yes \
|
make -f Makefile.init makefiles shared=yes dynamicmaps=yes \
|
||||||
%{?_hardened_build:pie=yes} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" \
|
%{?_hardened_build:pie=yes} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" \
|
||||||
AUXLIBS_LDAP="${AUXLIBS_LDAP}" AUXLIBS_PCRE="${AUXLIBS_PCRE}" \
|
AUXLIBS_LDAP="${AUXLIBS_LDAP}" AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_PCRE="${AUXLIBS_PCRE}" \
|
||||||
AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
|
AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
|
||||||
AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" AUXLIBS_CDB="${AUXLIBS_CDB}"\
|
AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" AUXLIBS_CDB="${AUXLIBS_CDB}"\
|
||||||
DEBUG="" SHLIB_RPATH="-Wl,-rpath,%{postfix_shlib_dir} $LDFLAGS" \
|
DEBUG="" SHLIB_RPATH="-Wl,-rpath,%{postfix_shlib_dir} $LDFLAGS" \
|
||||||
@ -320,7 +322,7 @@ function split_file
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushd %{buildroot}%{postfix_config_dir}
|
pushd %{buildroot}%{postfix_config_dir}
|
||||||
for map in mysql pgsql sqlite ldap pcre; do
|
for map in mysql pgsql sqlite ldap lmdb pcre; do
|
||||||
rm -f dynamicmaps.cf.d/"$map" "postfix-files.d/$map"
|
rm -f dynamicmaps.cf.d/"$map" "postfix-files.d/$map"
|
||||||
split_file "^\s*$map\b" "$map" dynamicmaps.cf
|
split_file "^\s*$map\b" "$map" dynamicmaps.cf
|
||||||
sed -i "s|postfix-$map\\.so|%{postfix_shlib_dir}/\\0|" "dynamicmaps.cf.d/$map"
|
sed -i "s|postfix-$map\\.so|%{postfix_shlib_dir}/\\0|" "dynamicmaps.cf.d/$map"
|
||||||
@ -498,6 +500,9 @@ fi
|
|||||||
%{_bindir}/rmail.postfix
|
%{_bindir}/rmail.postfix
|
||||||
%{_sbindir}/sendmail.postfix
|
%{_sbindir}/sendmail.postfix
|
||||||
/usr/lib/sendmail.postfix
|
/usr/lib/sendmail.postfix
|
||||||
|
%attr(0644, root, root) %{postfix_config_dir}/dynamicmaps.cf.d/lmdb
|
||||||
|
%attr(0644, root, root) %{postfix_config_dir}/postfix-files.d/lmdb
|
||||||
|
%attr(0755, root, root) %{postfix_shlib_dir}/postfix-lmdb.so
|
||||||
%ghost %{_sysconfdir}/pam.d/smtp
|
%ghost %{_sysconfdir}/pam.d/smtp
|
||||||
%ghost %attr(0755, root, root) %{_bindir}/mailq
|
%ghost %attr(0755, root, root) %{_bindir}/mailq
|
||||||
%ghost %attr(0755, root, root) %{_bindir}/newaliases
|
%ghost %attr(0755, root, root) %{_bindir}/newaliases
|
||||||
@ -547,6 +552,12 @@ fi
|
|||||||
%{postfix_doc_dir}/README_FILES/*
|
%{postfix_doc_dir}/README_FILES/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 01 2022 zhouyihang<zhouyihang3@h-partners.com> - 2:3.3.1-17
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add build require of lmdb
|
||||||
|
|
||||||
* Wed Feb 23 2022 xihaochen<xihaochen@h-partner.com> - 2:3.3.1-16
|
* Wed Feb 23 2022 xihaochen<xihaochen@h-partner.com> - 2:3.3.1-16
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user