File slrn.spec of Package slrn.6594
#
# spec file for package slrn
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: slrn
Version: 1.0.3
Release: 0
Summary: Powerful, Threaded Newsreader
License: GPL-2.0+
Group: Productivity/Networking/News/Clients
Url: http://www.slrn.org
Source: http://jedsoft.org/releases/slrn/%{name}-%{version}a.tar.bz2
Source1: http://jedsoft.org/releases/slrn/%{name}-%{version}a.tar.bz2.asc
Source2: http://www.jedsoft.org/jedavis_public_key.asc#/%{name}.keyring
# PATCH-FIX-OPENSUSE slrn-do-not-strip-binaries.diff gber@opensuse.org -- Prevents binaris from being stripped
Patch0: slrn-do-not-strip-binaries.patch
# PATCH-FIX-UPSTREAM slrn-fix-libgnutls-extra-dependency.patch gber@opensuse.org -- Prevents unnecessary linking against libgnutls-extra
Patch1: slrn-fix-libgnutls-extra-dependency.patch
# PATCH-FIX-OPENSUSE slrn-correct-path-to-sendmail.patch sfalken@opensuse.org -- Replaces ed stanza in %%setup, it's failing, and I don't grok ed/regexp very well.
Patch2: slrn-correct-path-to-sendmail.patch
BuildRequires: autoconf
BuildRequires: ed
BuildRequires: mininews
BuildRequires: slang-devel
Recommends: %{name}-lang = %{version}
# some slrn macros depend on certain slang modules
Recommends: slang-slsh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# SSL support via GnuTLS does not work on openSUSE <= 12.1
%if 0%{?suse_version} > 1210
BuildRequires: libgcrypt-devel
BuildRequires: libgnutls-devel
BuildRequires: libgnutls-openssl-devel
%endif
%description
slrn is a powerful, easy to use, and threaded Internet newsreader. It
is highly customizable, permitting redefinition of keys and including a
sophisticated macro language for further customization.
%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
# replace __DATE__ and __TIME__ with date/time of the last specfile changelog
# entry
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
find . -name '*.[ch]' -print -exec sh -c '
sed "/^[ \t]*#[ \t]*if/n;s/__DATE__/$3/g;s/__TIME__/$2/g" "$1" >"$1.new" && \
mv "$1.new" "$1"
' {} {} "${TIME}" "${DATE}" \;
%build
autoconf -f -I ./autoconf -o configure autoconf/configure.ac
%configure \
--with-slrnpull \
--enable-inews \
%if 0%{?suse_version} > 1210
--with-gnutls=%{_prefix} \
%endif
--disable-rpath
make %{?_smp_mflags}
%install
%make_install
install -m 644 -D doc/slrn.rc %{buildroot}%{_sysconfdir}/slrn/slrn.rc
# remove installed documentation, packaged manually below
rm -rf %{buildroot}%{_datadir}/doc
%find_lang %{name}
# make contrib scripts non-executable
find contrib/ doc -type f -exec chmod 644 {} +
%files
%defattr(-,root,root)
%doc changes.txt COPYING COPYRIGHT README
%doc doc/{FAQ,FIRST_STEPS,help.txt,manual.txt,pc-keys.txt,README.GroupLens}
%doc doc/{README.macros,README.multiuser,README.SSL,score.txt,slrn-doc.html}
%doc doc/{slrnfuns.txt,slrn.rc,THANKS,*.sl}
%doc doc/slrnpull/ contrib/
%dir %{_sysconfdir}/slrn
%config(noreplace) %{_sysconfdir}/slrn/slrn.rc
%{_bindir}/slrn
%{_bindir}/slrnpull
%{_mandir}/man1/slrn.1*
%{_mandir}/man1/slrnpull.1*
%{_datadir}/slrn
%files lang -f %{name}.lang
%defattr(-,root,root)
%changelog