[packages/libetpan] - updated to 1.9.4; upstream replaced libetpan-config with libetpan.pc file - added pc patch (move e

qboosh qboosh at pld-linux.org
Thu May 14 18:58:27 CEST 2020


commit 1102c95221ae63407c33c8f19026a9e7b9d75bfa
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu May 14 18:58:51 2020 +0200

    - updated to 1.9.4; upstream replaced libetpan-config with libetpan.pc file
    - added pc patch (move external Libs to Libs.pc, drop LDFLAGS from Libs)
    - updated link patch to also drop outdated list of gnutls private libs from LIBS
    - dropped .la file

 libetpan-link.patch |  9 +++++++++
 libetpan-pc.patch   | 10 ++++++++++
 libetpan.spec       | 47 ++++++++++++++++++++++++++++++++++-------------
 3 files changed, 53 insertions(+), 13 deletions(-)
---
diff --git a/libetpan.spec b/libetpan.spec
index 3c4644e..767dc9b 100644
--- a/libetpan.spec
+++ b/libetpan.spec
@@ -1,26 +1,37 @@
+#
+# Conditional build:
+%bcond_with	lmdb	# LMDB instead of BerkeleyDB
+%bcond_with	openssl	# OpenSSL instead of GnuTLS
+
 Summary:	Portable mail access library
 Summary(pl.UTF-8):	Przenośna biblioteka dostępu do poczty
 Name:		libetpan
-Version:	1.9.3
+Version:	1.9.4
 Release:	1
 License:	BSD
 Group:		Libraries
-Source0:	https://github.com/dinhviethoa/libetpan/archive/%{version}.tar.gz
-# Source0-md5:	42462e839b7d78c057e485dcb80d7d1c
+Source0:	https://github.com/dinhviethoa/libetpan/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	66bc8ccb241123aa61d405a576763a44
 Patch0:		%{name}-link.patch
 Patch1:		%{name}-db.patch
+Patch2:		%{name}-pc.patch
 URL:		https://github.com/dinhviethoa/libetpan
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
 BuildRequires:	curl-devel
 BuildRequires:	cyrus-sasl-devel >= 2
-BuildRequires:	db-devel >= 4
+%{!?with_lmdb:BuildRequires:	db-devel >= 4}
 BuildRequires:	docbook-style-dsssl
 BuildRequires:	expat-devel
-BuildRequires:	gnutls-devel
+%{!?with_openssl:BuildRequires:	gnutls-devel}
 BuildRequires:	liblockfile-devel
 BuildRequires:	libtool
+%{?with_lmdb:BuildRequires:	lmdb-devel}
 BuildRequires:	openjade
+%{?with_openssl:BuildRequires:	openssl-devel}
+BuildRequires:	pkgconfig
+BuildRequires:	zlib-devel >= 1.2.0.4
+Requires:	zlib >= 1.2.0.4
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -44,10 +55,13 @@ Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
 Requires:	curl-devel
 Requires:	cyrus-sasl-devel >= 2
-Requires:	db-devel >= 4
+%{!?with_lmdb:Requires:	db-devel >= 4}
 Requires:	expat-devel
+%{!?with_openssl:Requires:	gnutls-devel}
 Requires:	liblockfile-devel
-Requires:	openssl-devel
+%{?with_lmdb:Requires:	lmdb-devel}
+%{?with_openssl:Requires:	openssl-devel}
+Requires:	zlib-devel >= 1.2.0.4
 
 %description devel
 Header files for libEtPan library.
@@ -71,18 +85,23 @@ Statyczna biblioteka libEtPan.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
 %{__automake}
 %configure \
 	--enable-ipv6 \
-	--with-gnutls=yes \
-	--with-openssl=no
+%if %{without openssl}
+	--with-gnutls \
+	--without-openssl
+%endif
+
 %{__make}
+
 %{__make} -C doc doc \
 	DSL=%{_datadir}/sgml/docbook/dsssl-stylesheets/html/docbook.dsl
 
@@ -92,6 +111,9 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libetpan.la
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -100,18 +122,17 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc COPYRIGHT ChangeLog NEWS
+%doc COPYRIGHT ChangeLog NEWS README.md
 %attr(755,root,root) %{_libdir}/libetpan.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libetpan.so.20
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc/API/*.htm
-%attr(755,root,root) %{_bindir}/libetpan-config
 %attr(755,root,root) %{_libdir}/libetpan.so
-%{_libdir}/libetpan.la
 %{_includedir}/libetpan
 %{_includedir}/libetpan.h
+%{_pkgconfigdir}/libetpan.pc
 
 %files static
 %defattr(644,root,root,755)
diff --git a/libetpan-link.patch b/libetpan-link.patch
index 0a5df6f..11b8f23 100644
--- a/libetpan-link.patch
+++ b/libetpan-link.patch
@@ -1,5 +1,14 @@
 --- libetpan-1.7.2/configure.ac~	2016-05-26 07:27:47.000000000 +0200
 +++ libetpan-1.7.2/configure.ac	2016-08-05 14:44:19.882952496 +0200
+@@ -255,7 +255,7 @@
+ if test "x$with_gnutls" = "xyes"; then
+   AC_DEFINE([USE_GNUTLS],1, [Define to use GnuTLS])
+   AC_DEFINE([USE_SSL], 1, [Define to use OpenSSL])
+-  GNUTLSLIB="-lgnutls -lgcrypt -lgpg-error -lz"
++  GNUTLSLIB="-lgnutls"
+ else
+   GNUTLSLIB=""
+ fi
 @@ -618,12 +618,12 @@ else
        AC_CHECK_HEADER(curl/curl.h, [libcurl=yes])
        if test "x$libcurl" = "xyes"; then
diff --git a/libetpan-pc.patch b/libetpan-pc.patch
new file mode 100644
index 0000000..525d350
--- /dev/null
+++ b/libetpan-pc.patch
@@ -0,0 +1,10 @@
+--- libetpan-1.9.4/libetpan.pc.in.orig	2019-11-01 18:58:50.000000000 +0100
++++ libetpan-1.9.4/libetpan.pc.in	2020-05-14 18:34:36.122143355 +0200
+@@ -6,5 +6,6 @@
+ Name: libetpan
+ Description: Libetpan C library.
+ Version: @VERSION@
+-Libs: -L${libdir} -letpan at LIBSUFFIX@ @LDFLAGS@ @SSLLIBS@ @GNUTLSLIB@ @LIBICONV@ @DBLIB@ @LIBS@ @SASLLIBS@
++Libs: -L${libdir} -letpan at LIBSUFFIX@
++Libs.private: @SSLLIBS@ @GNUTLSLIB@ @LIBICONV@ @DBLIB@ @LIBS@ @SASLLIBS@
+ Cflags: -I${includedir}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libetpan.git/commitdiff/1102c95221ae63407c33c8f19026a9e7b9d75bfa



More information about the pld-cvs-commit mailing list