File rlwrap.spec of Package rlwrap
%define realname rlwrap
%define srcext tar.bz2
# Common info
Name: %{realname}
Version: 0.37
Release: wiz%{?extraver:0.}1
License: GPL-2.0
Group: System/Libraries
URL: http://utopia.knoware.nl/~hlub/uck/rlwrap/
Summary: A wrapper that uses the GNU readline library
# Build-time parameters
BuildRequires: autoconf automake libtool
BuildRequires: readline-devel
BuildRoot: %{_tmppath}/%{name}-root
Source: %{realname}-%{version}%{?extraver}.%{srcext}
%description
rlwrap is a wrapper that uses the GNU readline library to allow the editing of
keyboard input for any other command. Input history is kept between invocations,
separately for each command; history completion and search work as in bash and
completion word lists can be specified on the command line.
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{version}%{?extraver}
autoreconf --force --install
touch src/completion.c
%build
%configure \
CFLAGS='%{optflags} %{?gcc_lto}' \
LDFLAGS='-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}'
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS BUGS COPYING NEWS README
%{_bindir}/rlwrap
### %dir %{_datadir}/rlwrap
### %{_datadir}/rlwrap/*
%exclude %{_datadir}/rlwrap
%doc %{_mandir}/man1/*
%doc %{_mandir}/man3/*
%changelog