update code

This commit is contained in:
zhuchunyi 2019-11-06 19:47:54 +08:00
parent 28210317ed
commit fd0caa1f0b

View File

@ -23,7 +23,7 @@
Name: postfix
Summary: Postfix Mail Transport Agent
Version: 3.3.1
Release: 6
Release: 7
Epoch: 2
URL: http://www.postfix.org
License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
@ -54,8 +54,8 @@ Patch4: postfix-3.2.0-large-fs.patch
Patch9: pflogsumm-1.1.5-datecalc.patch
Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch
BuildRequires: libdb-devel perl-generators pkgconfig zlib-devel systemd libicu-devel libnsl2-devel gcc m4 openldap-devel
BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel tinycdb-devel openssl-devel
BuildRequires: libdb-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 tinycdb-devel openssl-devel procps-ng
%description
Postfix is a Mail Transport Agent (MTA).
@ -114,6 +114,8 @@ maps with Postfix, you need this.
sed -i \
's|^\(\s*#define\s\+DEF_SHLIB_DIR\s\+\)"/usr/lib/postfix"|\1"%{_libdir}/postfix"|' \
src/global/mail_params.h
sed -i -e "s/DB_VERSION_MAJOR == 6/DB_VERSION_MAJOR >= 6/" \
src/util/dict_db.c
gzip -dc %{SOURCE53} | tar xf -
pushd pflogsumm-1.1.5
@ -130,36 +132,36 @@ done
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
CCARGS="-fPIC"
AUXLIBS="-lnsl"
CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 %{?with_sasl:-DUSE_LDAP_SASL}"
AUXLIBS_LDAP="-lldap -llber"
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre"
AUXLIBS_PCRE="-lpcre"
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql"
AUXLIBS_MYSQL="-L%{_libdir}/mariadb -lmysqlclient -lm"
CCARGS="${CCARGS} -DHAS_PGSQL -I%{_includedir}/pgsql"
AUXLIBS_PGSQL="-lpq"
CCARGS="${CCARGS} -DHAS_SQLITE `pkg-config --cflags sqlite3`"
AUXLIBS_SQLITE="`pkg-config --libs sqlite3`"
CCARGS="${CCARGS} -DHAS_CDB `pkg-config --cflags libcdb`"
AUXLIBS_CDB="`pkg-config --libs libcdb`"
CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I%{_includedir}/sasl"
AUXLIBS="${AUXLIBS} -L%{_libdir}/sasl2 -lsasl2"
CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 %{?with_sasl:-DUSE_LDAP_SASL}"
AUXLIBS_LDAP="-lldap -llber"
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre"
AUXLIBS_PCRE="-lpcre"
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql"
AUXLIBS_MYSQL="-L%{_libdir}/mariadb -lmysqlclient -lm"
CCARGS="${CCARGS} -DHAS_PGSQL -I%{_includedir}/pgsql"
AUXLIBS_PGSQL="-lpq"
CCARGS="${CCARGS} -DHAS_SQLITE `pkg-config --cflags sqlite3`"
AUXLIBS_SQLITE="`pkg-config --libs sqlite3`"
CCARGS="${CCARGS} -DHAS_CDB `pkg-config --cflags libcdb`"
AUXLIBS_CDB="`pkg-config --libs libcdb`"
CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I%{_includedir}/sasl"
AUXLIBS="${AUXLIBS} -L%{_libdir}/sasl2 -lsasl2"
if pkg-config openssl ; then
if pkg-config openssl ; then
CCARGS="${CCARGS} -DUSE_TLS `pkg-config --cflags openssl`"
AUXLIBS="${AUXLIBS} `pkg-config --libs openssl`"
else
else
CCARGS="${CCARGS} -DUSE_TLS -I/usr/include/openssl"
AUXLIBS="${AUXLIBS} -lssl -lcrypto"
fi
fi
CCARGS="${CCARGS} -DDEF_CONFIG_DIR=\\\"%{postfix_config_dir}\\\""
CCARGS="${CCARGS} $(getconf LFS_CFLAGS)"
LDFLAGS="%{?__global_ldflags} -Wl,-z,relro,-z,now"
LDFLAGS="%{?__global_ldflags} %{?_hardened_build:-Wl,-z,relro,-z,now}"
make -f Makefile.init makefiles shared=yes dynamicmaps=yes \
pie=yes CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" \
%{?_hardened_build:pie=yes} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" \
AUXLIBS_LDAP="${AUXLIBS_LDAP}" AUXLIBS_PCRE="${AUXLIBS_PCRE}" \
AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" AUXLIBS_CDB="${AUXLIBS_CDB}"\
@ -377,7 +379,6 @@ fi
/sbin/chkconfig --del postfix >/dev/null 2>&1 || :
/bin/systemctl try-restart postfix.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root)
%config(noreplace) %{sasl_config_dir}/smtpd.conf
@ -503,5 +504,11 @@ fi
%{postfix_doc_dir}/README_FILES/*
%changelog
* Tue Oct 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:3.3.1-7
- Type:NA
- ID:NA
- SUG:NA
- DESC:Solve the problem of compilation failures
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:3.3.1-6
- Package init