[packages/cone] - updated to 0.96.2 - configure hacks replaced by curses patch - package all .html files in the same

qboosh qboosh at pld-linux.org
Fri Mar 23 17:57:49 CET 2018


commit b848eaf88f46d6766b92fe009bc924a89cf41d1d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Mar 23 18:00:06 2018 +0100

    - updated to 0.96.2
    - configure hacks replaced by curses patch
    - package all .html files in the same directory (there are cross references)

 cone-curses.patch |  55 ++++++++++++++
 cone.spec         | 209 +++++++++++++++++++++++++++++-------------------------
 2 files changed, 166 insertions(+), 98 deletions(-)
---
diff --git a/cone.spec b/cone.spec
index c6bde80..1be7342 100644
--- a/cone.spec
+++ b/cone.spec
@@ -1,32 +1,47 @@
 #
-# TODO:
-#   - review devel doc files
-#
+# Conditional build:
+%bcond_without	tests	# "make check"
+%bcond_with	gnutls	# GnuTLS instead of OpenSSL
+%bcond_with	socks	# (Courier) Socks support
+
 Summary:	CONE - Console Newsreader and Emailer
 Summary(pl.UTF-8):	CONE - tekstowy klient poczty i czytnik newsów
 Name:		cone
-Version:	0.89
-Release:	2
-License:	GPL
+Version:	0.96.2
+Release:	1
+License:	GPL v3 with OpenSSL exception
 Group:		Applications/Mail
 Source0:	http://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2
-# Source0-md5:	7ee8b8c0fe89d96bca3e93a2b82adfb9
+# Source0-md5:	ea8925d531b43fd8ee36b0363434b1b8
 Patch0:		%{name}-maildir.patch
+Patch1:		%{name}-curses.patch
 URL:		http://www.courier-mta.org/cone/
 BuildRequires:	aspell-devel
-BuildRequires:	autoconf
+BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake
+%{?with_socks:BuildRequires:	courier-sox-devel}
+BuildRequires:	courier-unicode-devel >= 2.0
 BuildRequires:	fam-devel
+# or gnupg2 --with-gpg2, will use the same at runtime
+BuildRequires:	gnupg
+%{?with_gnutls:BuildRequires:	gnutls-devel >= 3.0}
+%{?with_gnutls:BuildRequires:	libgcrypt-devel}
+%{?with_gnutls:BuildRequires:	libgpg-error-devel}
+BuildRequires:	libidn-devel >= 0.0.0
 BuildRequires:	libstdc++-devel
-BuildRequires:	libtool
-BuildRequires:	libxml2-devel
-BuildRequires:	ncurses-devel
-BuildRequires:	openssl-devel
-BuildRequires:	openssl-tools-perl
+BuildRequires:	libtool >= 2:1.5
+BuildRequires:	libxml2-devel >= 2.0
+BuildRequires:	ncurses-devel >= 5
+BuildRequires:	openldap-devel
+%{!?with_gnutls:BuildRequires:	openssl-devel >= 0.9.7d}
+BuildRequires:	pcre-devel
 BuildRequires:	perl-base
+BuildRequires:	pkgconfig
+BuildRequires:	procps
 BuildRequires:	sysconftool
 BuildRequires:	zlib-devel
 Requires:	ca-certificates
+Suggests:	gnupg
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -38,34 +53,25 @@ CONE jest prostym, tekstowym klientem pocztowym, a także prostym
 czytnikiem newsów.
 
 %package devel
-Summary:	Header files for LibMAIL
-Summary(pl.UTF-8):	Pliki nagłówkowe LibMAIL
-Group:		Development/Languages
-Requires:	%{name} = %{version}-%{release}
+Summary:	Header files and static LibMAIL library
+Summary(pl.UTF-8):	Pliki nagłówkowe i biblioteka statyczna LibMAIL
+Group:		Development/Libraries
+Requires:	courier-unicode-devel >= 2.0
+%{?with_gnutls:Requires:	gnutls-devel >= 3.0}
+Requires:	libidn-devel >= 0.0.0
+Requires:	libstdc++-devel
+%{!?with_gnutls:Requires:	openssl-devel >= 0.9.7d}
+Obsoletes:	cone-static < 0.96
 
 %description devel
-This package includes the header files for developing applications
-using LibMAIL - a high level, C++ OO library for mail clients.
+This package includes the header files and static library for
+developing applications using LibMAIL - a high level, C++ OO library
+for mail clients.
 
 %description devel -l pl.UTF-8
-Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji z
-użyciem LibMAIL - wysokopoziomowej, zorientowanej obiektowo
-biblioteki C++ dla klientów pocztowych.
-
-%package static
-Summary:	Static LibMAIL library
-Summary(pl.UTF-8):	Biblioteka statyczna LibMAIL
-Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
-
-%description static
-This package contains static library for developing application using
-LibMAIL - a high level, C++ OO library for mail clients.
-
-%description static -l pl.UTF-8
-Ten pakiet zawiera statyczną bibliotekę do tworzenia aplikacji z
-użyciem LibMAIL - wysokopoziomowej, zorientowanej obiektowo
-biblioteki C++ dla klientów pocztowych.
+Ten pakiet zawiera pliki nagłówkowe i bibliotekę statyczną do
+tworzenia aplikacji z użyciem LibMAIL - wysokopoziomowej,
+zorientowanej obiektowo biblioteki C++ dla klientów pocztowych.
 
 %package -n leaf
 Summary:	Console text file editor
@@ -78,47 +84,40 @@ word-wrapping and spell checking. Leaf is based on the text editor in
 the Cone mail reader and composer.
 
 %description -n leaf -l pl.UTF-8
-Leaf jest prostym konsolowym edytorem plików tekstowych. Jest oparty
-na edytorze używanym w czytniku poczty Cone.
+Leaf jest prostym konsolowym edytorem plików tekstowych, z zawijaniem
+wierszy w akapitach i sprawdzaniem pisowni. Jest oparty na edytorze
+używanym w czytniku poczty Cone.
 
 %prep
 %setup -q
 %patch0 -p1
 
 %build
-#%{__libtoolize}
-#%{__aclocal}
-#%{__autoconf}
-#%{__automake}
-
-#cd cone
-#%{__aclocal}
-#%{__autoconf}
-#%{__automake}
-
-#cd ../libmail
-#%{__aclocal}
-#%{__autoconf}
-#%{__automake}
-
-#cd ../maildir
-#%{__aclocal}
-#%{__autoconf}
-#%{__automake}
-#cd ..
-
-
-CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses"
-LDFLAGS="%{rpmldflags} -ltinfow"
-PATH=$PATH:%{_prefix}/%{_lib}/openssl; export PATH
+%{__libtoolize}
+for d in $(sed -ne 's/.*AC_CONFIG_SUBDIRS(\([^)]*\))/\1/p' configure.ac) . ; do
+	if [ -d "$d" ]; then
+		cd $d
+		%{__aclocal}
+		%{__autoconf}
+		if grep -q AC_CONFIG_HEADER configure.ac ; then
+			%{__autoheader}
+		fi
+		%{__automake}
+		cd -
+	fi
+done
+
 %configure \
-	--with-devel \
+	SENDMAIL=/usr/lib/sendmail \
 	--with-certdb=%{_sysconfdir}/certs/ca-certificates.crt \
-	SENDMAIL=%{_sbindir}/sendmail
+	--with-devel \
+	%{?with_gnutls:--with-gnutls}
 
 %{__make}
 
-#%{__make} check
+%if %{with tests}
+%{__make} check
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -126,53 +125,67 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-# start cone directly
-#mv -f $RPM_BUILD_ROOT%{_libdir}/cone $RPM_BUILD_ROOT%{_bindir}
-cp cone.sh $RPM_BUILD_ROOT%{_bindir}/cone
-mv -f $RPM_BUILD_ROOT%{_sysconfdir}/cone.dist $RPM_BUILD_ROOT%{_sysconfdir}/cone
-
-# move devel docs from datadir
-mkdir devel
-for file in account-* address.html e*.html folder-* \
-header* libmail*.html mail-* mimestruct* misc* native* synchronous.html; do
-mv -f $RPM_BUILD_ROOT%{_datadir}/cone/$file devel
-done
-
-# leaf doc
-mv -f $RPM_BUILD_ROOT%{_datadir}/cone/leaf.html .
+%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/cone.dist $RPM_BUILD_ROOT%{_sysconfdir}/cone
 
-# rest *.html will go to primary docs
-mkdir docs
-mv -f $RPM_BUILD_ROOT%{_datadir}/cone/*.html docs
-mv -f $RPM_BUILD_ROOT%{_datadir}/cone/manpage.css docs
+# move docs to more specific location
+install -d $RPM_BUILD_ROOT%{_docdir}/%{name}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/cone/{*.html,manpage.css} $RPM_BUILD_ROOT%{_docdir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README NEWS docs/
-%config(noreplace)  %verify(not md5 mtime size) %{_sysconfdir}/cone
+%doc AUTHORS COPYING ChangeLog NEWS README
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cone
 %attr(755,root,root) %{_bindir}/cone
 %attr(755,root,root) %{_bindir}/mailtool
-%attr(755,root,root) %{_libdir}/cone
+%attr(755,root,root) %{_libexecdir}/cone
 %{_datadir}/cone
-%{_mandir}/man1/cone*
-%{_mandir}/man1/mailtool*
+%{_mandir}/man1/cone.1*
+%{_mandir}/man1/mailtool.1*
+%dir %{_docdir}/%{name}
+%{_docdir}/%{name}/FAQ.html
+%{_docdir}/%{name}/INSTALL.html
+%{_docdir}/%{name}/README.html
+%{_docdir}/%{name}/add.html
+%{_docdir}/%{name}/attributes.html
+%{_docdir}/%{name}/bk01-toc.html
+%{_docdir}/%{name}/cone*.html
+%{_docdir}/%{name}/conn.html
+%{_docdir}/%{name}/index.html
+%{_docdir}/%{name}/maillist.html
+%{_docdir}/%{name}/mailtool.html
+%{_docdir}/%{name}/manpage.css
+%{_docdir}/%{name}/moredocs.html
+%{_docdir}/%{name}/search.html
+%{_docdir}/%{name}/smap*.html
+%{_docdir}/%{name}/store.html
 
 %files devel
 %defattr(644,root,root,755)
-%doc devel/*
+%{_libdir}/libmail.a
 %{_libdir}/libmail.la
 %{_includedir}/libmail
-%{_mandir}/man3/*
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/libmail.a
+%{_mandir}/man3/mail::*.3x*
+%dir %{_docdir}/%{name}
+%{_docdir}/%{name}/account-*.html
+%{_docdir}/%{name}/address.html
+%{_docdir}/%{name}/cppnamespace.html
+%{_docdir}/%{name}/emailaddress.html
+%{_docdir}/%{name}/envelope.html
+%{_docdir}/%{name}/folder-*.html
+%{_docdir}/%{name}/header-*.html
+%{_docdir}/%{name}/libmail*.html
+%{_docdir}/%{name}/mail-*.html
+%{_docdir}/%{name}/mimestruct.html
+%{_docdir}/%{name}/misc.html
+%{_docdir}/%{name}/native.html
+%{_docdir}/%{name}/synchronous.html
 
 %files -n leaf
 %defattr(644,root,root,755)
-%doc leaf.html
 %attr(755,root,root) %{_bindir}/leaf
-%{_mandir}/man1/leaf*
+%{_mandir}/man1/leaf.1*
+%dir %{_docdir}/%{name}
+%{_docdir}/%{name}/leaf.html
diff --git a/cone-curses.patch b/cone-curses.patch
new file mode 100644
index 0000000..e26eb3e
--- /dev/null
+++ b/cone-curses.patch
@@ -0,0 +1,55 @@
+--- cone-0.96.2/curses/configure.ac.orig	2017-03-09 15:52:04.000000000 +0100
++++ cone-0.96.2/curses/configure.ac	2018-03-22 18:47:51.458660590 +0100
+@@ -44,12 +44,18 @@
+ 	AC_MSG_ERROR([curses library not found.])
+ fi
+ 
++for f in tinfow tinfo
++do
++	AC_CHECK_LIB($f, keypad, [CURSESLIBRARY="$CURSESLIBRARY -l$f"; break])
++done
++
+ CURSESLIB="-l$CURSESLIBRARY"
+ AC_SUBST(CURSESLIB)
+ 
+ dnl Checks for header files.
+ AC_CHECK_HEADERS(sys/time.h unistd.h sys/wait.h glob.h)
+ AC_CHECK_HEADERS(ncursesw/curses.h)
++AC_CHECK_HEADERS(ncurses/curses.h)
+ 
+ AC_HEADER_TIME
+ AC_HEADER_DIRENT
+@@ -61,7 +67,13 @@
+ AC_MSG_CHECKING(for use_default_colors())
+ 
+ AC_TRY_LINK([
++#if HAVE_NCURSESW_CURSES_H
++#include <ncursesw/curses.h>
++#elif HAVE_NCURSES_CURSES_H
++#include <ncursesw/curses.h>
++#else
+ #include <curses.h>
++#endif
+ ],[
+ 	use_default_colors();
+ ], [AC_MSG_RESULT(yes)
+@@ -72,6 +84,8 @@
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #if HAVE_NCURSESW_CURSES_H
+ #include <ncursesw/curses.h>
++#elif HAVE_NCURSES_CURSES_H
++#include <ncursesw/curses.h>
+ #else
+ #include <curses.h>
+ #endif
+--- cone-0.96.2/curses/cursesscreen.H.orig	2017-03-06 02:28:33.000000000 +0100
++++ cone-0.96.2/curses/cursesscreen.H	2018-03-22 18:48:36.601993408 +0100
+@@ -13,6 +13,8 @@
+ 
+ #if HAVE_NCURSESW_CURSES_H
+ #include <ncursesw/curses.h>
++#if HAVE_NCURSES_CURSES_H
++#include <ncurses/curses.h>
+ #else
+ #include <curses.h>
+ #endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cone.git/commitdiff/b848eaf88f46d6766b92fe009bc924a89cf41d1d



More information about the pld-cvs-commit mailing list