File lv.spec of Package lv

#
# spec file for package lv
#
# Copyright (c) 2012 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 http://bugs.opensuse.org/
#

Name:           lv
BuildRequires:  automake
BuildRequires:  ncurses-devel
Provides:       locale(ja;ko;zh)
Version:        4.51
Release:        0
Url:            http://www.ff.iij4u.or.jp/~nrt/lv/
Source:         lv451.tar.bz2
Patch0:         lv-add-lgrep-man-page.patch 
Patch2:         lv-fixes.patch
Patch3:         lv-strip.patch
Patch4:         missing-include.patch
Patch5:         lv-splitted-libtinfo.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Powerful, Multilingual File Viewer, Same User Interface as "Less"
License:        GPL-2.0+
Group:          Productivity/Text/Utilities

%description
Lv is a powerful, multilingual file viewer. Apparently, lv looks like
less (1), a representative file viewer on UNIX, so UNIX people (and
less people on other OSs) do not have to learn a burdensome new
interface.

Lv can decode and encode multilingual streams through many coding
systems. Lv can be used as a coding system translation filter.

Lv can recognize multibyte patterns as regular expressions, and
provides multilingual grep (1) functionality under the name lgrep.

Lv can recognize ANSI escape sequences for text decoration.



Authors:
--------
    NARITA Tomio <nrt@ff.iij4u.or.jp>

%prep
%setup -n lv451
%patch0 -p1 -b .add-lgrep-man-page
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if %suse_version > 1210
%patch5 -p1
%endif

%build
pushd src
  autoreconf -fi
popd
pushd build
    CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing" \
    CXXFLAGS="$RPM_OPT_FLAGS  -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing" \
    ../src/configure --prefix=/usr \
		     --mandir=%{_mandir} \
		     --infodir=%{_infodir} \
		     --sysconfdir=/etc
    make 
popd

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT%{_mandir}/man1
make -C build \
     prefix=$RPM_BUILD_ROOT/usr \
     mandir=$RPM_BUILD_ROOT%{_mandir} \
     infodir=$RPM_BUILD_ROOT%{_infodir} \
     sysconfdir=$RPM_BUILD_ROOT/etc \
     install

%clean
#[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;

%files
%defattr(-,root,root)
%doc GPL.txt README *.html hello* 
%doc %{_mandir}/man1/*
/usr/bin/*
/usr/lib/lv

%changelog
openSUSE Build Service is sponsored by