File slrn.spec of Package slrn

# spec file for package slrn (Version 1.0pre18)
# Copyright (c) 2010 SUSE LINUX Products 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

# norootforbuild

%define build_with_nss 0

Name:           slrn
License:        GPLv2+
Group:          Productivity/Networking/News/Clients
AutoReqProv:    on
Version:        1.0pre18
Release:        1
Summary:        News Reader
Source:         slrn-pre1.0.0~18.tar.bz2
Patch0:         slrn-0.9.9p1.diff
Patch2:         slrn-0.9.9p1-configure.diff
Patch4:         slrn-0.9.9p1-hardcode-inews-path.diff
Patch5:         slrn-0.9.9p1-do-not-strip-binaries.diff
%if 0%{?build_with_nss} > 0
BuildRequires:  mozilla-nss-devel nss-compat-openssl-devel
BuildRequires:  slang-devel
Requires(pre):  fileutils sh-utils coreutils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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.

    John Davis <>

%setup -q -n %name
# correct path to sendmail
%__sed -i'' 's|/usr/lib/sendmail|/usr/sbin/sendmail|g' src/slrnfeat.hin
# regenerate configuration script from patched template
autoconf --verbose --include=autoconf --output=configure autoconf/

export CFLAGS="%optflags -fno-strict-aliasing"
%configure \
    --with-docdir=%{_defaultdocdir}/slrn    \
    --with-slrnpull                         \
%if 0%{?build_with_nss} > 0
    --with-ssl=%{_prefix}                   \
    --with-nss-compat                       \
    --enable-inews                          \

install -m 755 -d "%{buildroot}/etc/slrn"
install -m 644 doc/slrn.rc "%{buildroot}/etc/slrn/"
install %{S:1} "%{buildroot}/usr/bin/"
%find_lang %{name}

test -e usr/lib/slrn/slrn.rc && {
	mkdir -p etc/slrn
	test -e etc/slrn/slrn.rc || \
		mv usr/lib/slrn/slrn.rc etc/slrn/slrn.rc
test -e var/lib/slrn/slrn.rc && {
	mkdir -p etc/slrn
	test -e etc/slrn/slrn.rc || \
		mv var/lib/slrn/slrn.rc etc/slrn/slrn.rc
exit 0

%docdir %{_defaultdocdir}/slrn
%dir /etc/slrn
%config /etc/slrn/slrn.rc
%doc %{_mandir}/man1/*

%files lang -f %{name}.lang

rm -rf "%{buildroot}"

openSUSE Build Service is sponsored by