%define  ver     4.0-beta-33
%define  rel     1
%define  prefix  /usr

Summary: offine news reader
Name: news-peruser
Version: %ver
Release: %rel
Copyright: GPL
Group: Applications/Internet
Source: http://peruser.netpedia.net/peruser-%{ver}.src.tar.gz
Url: http://peruser.netpedia.net
BuildRoot: /var/tmp/peruser-%{PACKAGE_VERSION}-root
Docdir: %{prefix}/doc

Requires: gtk+ >= 1.2

%description
News Peruser is a suite of seven small programs to enable a user to do
offline reading and composition of Usenet news articles. Peruser can
compose replies-by-mail, as well, and pass them off to a local sendmail.
The toplevel applet's filename is "npcollections," but the distribution
Makefile attempts to make a symbolic link from "npcollections" to
"peruser" in /usr/local/bin, so you should be able to launch News Peruser
by typing either name at the shell prompt.

%prep
%setup

%build

%ifarch alpha
  CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix
%else
  CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix 
%endif

if [ "$SMP" != "" ]; then
  (make "MAKE=make -k -j $SMP"; exit 0)
  make
else
  make
fi

%install
rm -rf $RPM_BUILD_ROOT

make prefix=$RPM_BUILD_ROOT%{prefix} install

for file in $RPM_BUILD_ROOT%{prefix}/share/news-peruser/*; do
	perl -pi.bak -e "s#$RPM_BUILD_ROOT%{prefix}#/usr/share#" $file
done	

rm -f $RPM_BUILD_ROOT%{prefix}/share/news-peruser/*.bak

%clean
rm -rf $RPM_BUILD_ROOT

%changelog

* Sun Apr 18 1999 W. Reilly Cooley <wcooley@nakedape.navi.net>

- Fixed version and release specification.
- Added Perl to substitute appropriate path names.

* Tue Apr 6 1999 Vincent Harvey <vharvey@mcs.net>
- I made an rpm. I am not the author though, James Bailie (http://users.imag.net/~lon.jbailie) is.

%files
%defattr(-, root, root)

%doc AUTHORS ChangeLog NEWS README COPYING TODO

%{prefix}/bin/*
%{prefix}/share/news-peruser/*
