commit e2dd05e38aa7663583c94b92f59e5a1389411b50 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:55:54 2019 -0400 Package init diff --git a/libesmtp-1.0.6-openssl-1.1.patch b/libesmtp-1.0.6-openssl-1.1.patch new file mode 100644 index 0000000..53e32c5 --- /dev/null +++ b/libesmtp-1.0.6-openssl-1.1.patch @@ -0,0 +1,14 @@ +diff --git a/configure.ac b/configure.ac +index 556f220..2c0693d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -303,7 +303,7 @@ if test x$with_openssl != xno ; then + ) + fi + if test x$with_openssl != xno ; then +- AC_CHECK_LIB(ssl, SSL_library_init, [ ++ AC_CHECK_LIB(ssl, SSL_new, [ + with_openssl=yes + LIBS="-lssl -lcrypto $LIBS" + ], [ + diff --git a/libesmtp-1.0.6.tar.bz2 b/libesmtp-1.0.6.tar.bz2 new file mode 100644 index 0000000..a6fb659 Binary files /dev/null and b/libesmtp-1.0.6.tar.bz2 differ diff --git a/libesmtp.spec b/libesmtp.spec new file mode 100644 index 0000000..ff4ce17 --- /dev/null +++ b/libesmtp.spec @@ -0,0 +1,96 @@ +%define plugindir %{_libdir}/esmtp-plugins + +Name: libesmtp +Version: 1.0.6 +Release: 17 +Summary: A library for posting electronic mail +License: LGPLv2+ + +URL: https://www.stafford.uklinux.net/%{name}/ +Source: https://www.stafford.uklinux.net/%{name}/%{name}-%{version}.tar.bz2 +Patch0: libesmtp-1.0.6-openssl-1.1.patch +BuildRequires: gcc openssl-devel pkgconfig autoconf automake libtool + +%description +%{name} is an SMTP client which manages posting (or submission of) electronic +mail via a preconfigured Mail Transport Agent (MTA). It may be used as part of +a Mail User Agent (MUA) or other program that must be able to post electronic +mail where mail functionality may not be that program's primary purpose. + +%package devel +Summary: Header and development files for %{name} +License: LGPLv2+ and GPLv2+ +Requires: %{name} = %{version}-%{release}, openssl-devel + +%description devel +%{name}-devel contains the header files for developing +applications that want to make use of %{name}. + +%package_help + +%prep +%autosetup -n %{name}-%{version} -p1 + +autoreconf -fi + +chmod a-x htable.c + +%build + +if pkg-config openssl ; then + export CFLAGS="$CFLAGS $RPM_OPT_FLAGS `pkg-config --cflags openssl`" + export LDFLAGS="$LDFLAGS `pkg-config --libs-only-L openssl`" +fi +%configure --with-auth-plugin-dir=%{plugindir} --enable-pthreads \ + --enable-require-all-recipients --enable-debug \ + --enable-etrn --disable-isoc --disable-more-warnings +make %{?_smp_mflags} +cat << "EOF" > %{name}.pc +prefix=%{_prefix} +exec_prefix=%{_prefix} +libdir=%{_libdir} +includedir=%{_includedir} + +Name: libESMTP +Version: %{version} +Description: SMTP client library. +Requires: openssl +Libs: -pthread -L${libdir} -lesmtp +Cflags: +EOF + +cat << "EOF" > %{name}-config +#! /bin/sh +exec pkg-config "$@" libesmtp +EOF + +%install +%make_install +install -p -m 644 -D %{name}.pc %{buildroot}%{_libdir}/pkgconfig/%{name}.pc + +%delete_la + +%ldconfig_scriptlets + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING COPYING.LIB +%{_libdir}/%{name}.so.* +%{plugindir} + +%files devel +%defattr(-,root,root) +%doc examples +%{_bindir}/%{name}-config +%{_libdir}/%{name}.so +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/%{name}.a +%{_prefix}/include/*.h + +%files help +%defattr(-,root,root) +%doc NEWS Notes README + +%changelog +* Sun Sep 15 2019 openEuler Buildteam - 1.0.6-17 +- Package init