File ffe.spec of Package ffe

# vim: set sw=4 ts=4 et:

Name:           ffe
Version:        0.3.2
Release:        0
Summary:        Flat File Extractor
# http://prdownloads.sourceforge.net/ff-extractor/ffe-%{version}.tar.gz
Source:         ffe-%{version}.tar.bz2
URL:            http://ff-extractor.sourceforge.net/
Group:          Productivity/File utilities
License:        GNU General Public License (GPL)
BuildRoot:      %{_tmppath}/build-%{name}-%{version}
BuildRequires:  gcc glibc-devel make
BuildRequires:  autoconf automake libtool
PreReq:         %install_info_prereq

%description
ffe is a flat file extractor. It can be used for reading different flat file
structures and displaying them in different formats. It is a command line tool
developed under GNU/Linux. The main areas of use are; extracting particular
fields or records from a flat file; converting data from one format to an
other, e.g. from CSV to fixed length; verifying a flat file structure; as
a testing tool for flat file development; and displaying flat file content
in human readable form.




Authors:
--------
    Timo Savinen <tjsa@iki.fi>

%package docs
Summary:        Flat File Extractor (Documentation)
Group:          Productivity/File utilities
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description docs
ffe is a flat file extractor. It can be used for reading different flat file
structures and displaying them in different formats. It is a command line tool
developed under GNU/Linux. The main areas of use are; extracting particular
fields or records from a flat file; converting data from one format to an
other, e.g. from CSV to fixed length; verifying a flat file structure; as
a testing tool for flat file development; and displaying flat file content
in human readable form.

%prep
%setup -q

%build
%configure
%__make %{?_smp_flags}

%install
%makeinstall
%__rm -rf "%{buildroot}%{_datadir}/doc"

%__install -d "%{buildroot}%{_docdir}/%{name}"
>.doc.main.lst
for f in AUTHORS ChangeLog NEWS COPYING; do
    %__cp -a "$f" "%{buildroot}%{_docdir}/%{name}/${f##*/}"
    echo "%doc %{_docdir}/%{name}/${f##*/}" >>.doc.main.lst
done
>.doc.doc.lst
for f in README doc/ffe.html; do
    %__cp -a "$f" "%{buildroot}%{_docdir}/%{name}/${f##*/}"
    echo "%doc %{_docdir}/%{name}/${f##*/}" >>.doc.doc.lst
done

%post docs
%install_info --info-dir="%{_infodir}" "%{_infodir}/ffe.info%{ext_info}"

%preun docs
%install_info_delete --info-dir="%{_infodir}" "%{_infodir}/ffe.info%{ext_info}"

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files -f .doc.main.lst
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%{_bindir}/ffe
%doc %{_mandir}/man1/ffe.1%{ext_man}

%files docs -f .doc.doc.lst
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%doc %{_infodir}/ffe.info%{ext_info}

openSUSE Build Service is sponsored by