From 2b20d31832dc73c16bab14f9c4091f27e1fec313 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 04:11:22 +0100 Subject: [PATCH] fix libdir in pkg-config file [release 1.0.6-3mamba;Mon Mar 25 2013] --- README.md | 5 ++ libesmtp.spec | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 libesmtp.spec diff --git a/README.md b/README.md index 2d8f901..19c8233 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # libesmtp +LibESMTP is a library to manage posting (or submission of) electronic mail using SMTP to a +preconfigured Mail Transport Agent (MTA) such as Exim. It may be used as part of a Mail User +Agent (MUA) or another program that must be able to post electronic mail but where mail +functionality is not the program's primary purpose. + diff --git a/libesmtp.spec b/libesmtp.spec new file mode 100644 index 0000000..a379676 --- /dev/null +++ b/libesmtp.spec @@ -0,0 +1,143 @@ +Name: libesmtp +Version: 1.0.6 +Release: 3mamba +Summary: SMTP client library +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.stafford.uklinux.net/libesmtp/ +Source: http://www.stafford.uklinux.net/libesmtp/libesmtp-%{version}.tar.gz +#Source: ftp://mirror.ovh.net/gentoo-distfiles/distfiles/libesmtp-%{version}.tar.bz2 +License: GPL, LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libopenssl-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +#************************* +#*** libESMTP features *** +#************************* +# --with-auth-plugin-dir: /usr/lib/esmtp-plugins +# --with-lwres: no +# --with-openssl: yes +# --enable-pthreads: yes +# --enable-etrn: yes +# --enable-ntlm: no +# --enable-chunking: yes +# --enable-xusr: yes +# --enable-nsauth: yes +# --enable-debug: yes + +%description +LibESMTP is a library to manage posting (or submission of) electronic mail using SMTP to a +preconfigured Mail Transport Agent (MTA) such as Exim. It may be used as part of a Mail User +Agent (MUA) or another program that must be able to post electronic mail but where mail +functionality is not the program's primary purpose. + +%package devel +Group: Development/Libraries +Summary: Libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +SMTP client library. + +This package contains libraries and header files need for development. + +%package static +Group: Development/Libraries +Summary: Static libraries for %{name} +Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description static +SMTP client library. + +This package contains static libraries need for development. + +%prep + +%setup -q + +chmod a-x htable.c + +%build +%configure \ + --with-auth-plugin-dir=%{_libdir}/esmtp-plugins \ + --enable-pthreads \ + --enable-require-all-recipients \ + --enable-debug \ + --enable-etrn \ + --disable-isoc \ + --disable-more-warnings + +%make + +cat > libesmtp.pc << EOF +prefix=%{_prefix} +exec_prefix=%{_prefix} +libdir=%{_libdir} +includedir=%{_includedir} + +Name: libESMTP +Version: 1.0.6 +Description: SMTP client library. +Requires: openssl +Libs: -pthread -L\${libdir} -lesmtp +Cflags: +EOF + +cat > libesmtp-config << EOF +#! /bin/sh +exec pkg-config "\$@" libesmtp +EOF + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +mkdir -p %{buildroot}%{_exec_prefix}/lib/pkgconfig +install -pm 644 libesmtp.pc %{buildroot}%{_exec_prefix}/lib/pkgconfig/libesmtp.pc + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/libesmtp.so.* +%dir %{_libdir}/esmtp-plugins +%{_libdir}/esmtp-plugins/sasl-cram-md5.so +%{_libdir}/esmtp-plugins/sasl-login.so +%{_libdir}/esmtp-plugins/sasl-plain.so +%doc AUTHORS COPYING.LIB + +%files devel +%defattr(-,root,root) +%{_bindir}/libesmtp-config +%{_includedir}/*.h +%{_libdir}/libesmtp.so +%{_exec_prefix}/lib/pkgconfig/libesmtp.pc +%doc examples COPYING +%doc ChangeLog NEWS README TODO + +%files static +%defattr(-,root,root) +%{_libdir}/libesmtp.*a +%{_libdir}/esmtp-plugins/sasl-*a + +%changelog +* Mon Mar 25 2013 Silvan Calarco 1.0.6-3mamba +- fix libdir in pkg-config file + +* Thu Feb 03 2011 gil 1.0.6-2mamba +- rebuilt devel + +* Thu Dec 23 2010 gil 1.0.6-1mamba +- update to 1.0.6 + +* Thu Oct 21 2010 gil 1.0.4-1mamba +- package created by autospec