File sharutils.spec of Package sharutils

#
# spec file for package sharutils
#
# Copyright (c) 2013 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/
#


%bcond_with mail

Name:           sharutils
Version:        4.11.1
Release:        0
Summary:        GNU shar utilities
License:        GPL-3.0+
Group:          Productivity/Archiving/Compression
Url:            http://www.gnu.org/software/sharutils/
Source:         ftp://ftp.gnu.org/gnu/sharutils/sharutils-%{version}.tar.bz2
Patch0:         sharutils-testsuite.diff
Patch1:         sharutils-set_file_mode.diff
# PATCH-FIX-UPSTREAM sharutils-mandir.patch bnc#709121
Patch2:         sharutils-mandir.patch
# PATCH-FIX-OPENSUSE Fix gets declaration
Patch3:         sharutils-stdio.in.patch
%if %{with mail}
BuildRequires:  mailx
%endif
PreReq:         %{install_info_prereq}
PreReq:         /bin/ln
PreReq:         /bin/rm
Recommends:     %{name}-lang = %{version}
Provides:       sharutil = %{version}
Obsoletes:      sharutil < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is the set of GNU shar utilities.

shar makes shell archives out of many files, preparing them for
transmission by electronic mail services.  Use unshar to unpack shell
archives after reception.

uuencode prepares a file for transmission over an electronic channel
which ignores or otherwise mangles the eight bit (high order bit) of
bytes.	uudecode does the converse transformation.

remsync allows for remote synchronization of directory trees, using
e-mail.  This part of sharutils is still alpha.

%package lang

Summary:        GNU shar utilities user interface texts
Group:          Productivity/Archiving/Compression

%description lang
Translated user interface texts for GNU shar utilities

%prep
%setup -q
%patch0
%patch1
chmod +w src/scripts.x
# false
%patch2 -p1
%patch3 -p1

%build
mkdir -p ../bin
ln -snf /bin/true ../bin/compress
PATH=$PWD/../bin:$PATH
%configure
make

%check
make check

%install
%make_install
%find_lang %{name}

%post
%install_info --info-dir=%{_infodir} %{_infodir}/sharutils.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/sharutils.info.gz

%clean
rm -rf %{buildroot}

%files lang -f %{name}.lang
%defattr(-, root, root)

%files
%defattr(-, root, root)
%doc README COPYING NEWS THANKS
%{_bindir}/*
%{_infodir}/*.gz
%{_mandir}/*/*.gz

%changelog
openSUSE Build Service is sponsored by