File vh-man2html.spec of Package vh-man2html

#
# spec file for package vh-man2html
#
# 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:           vh-man2html
Version:        1.6g
Release:        0
Summary:        Richard Verhoeven's man2html implementation
License:        ISC-like
Group:          System/Base
URL:            http://primates.ximian.com/~flucifredi/man/

# Extracted man2html/ directory from man-1.6g.tar.gz and repacked
Source:         %name-%version.tar.bz2
Patch1:		man2html-automake.diff
BuildRoot:	%_tmppath/%name-%version-build
BuildRequires:  autoconf, automake
%if 0%{?suse_version}
BuildRequires:	update-alternatives
Requires(pre):	update-alternatives
Requires(postun):	update-alternatives
%endif
Provides:       man2html = vh-%version-%release

%description
A C-based Unix manpage to HTML converter.

man2html converts a manual page as found in file (or stdin, in case
no file argument, or the argument "-", is given) from man-style nroff
into html, and prints the result on stdout. It does support tbl but
does not know about eqn. The exit status is 0. If something goes
wrong, an error page is printed on stdout.

%prep
%setup -qn man2html
%patch -P 1 -p1

%build
autoreconf -fi;
%configure
make %{?_smp_mflags};

%install
b="%buildroot";
make install DESTDIR="$b";
mv "$b/%_bindir"/{man2html,vh-man2html};
mv "$b/%_mandir/man1"/{man2html,vh-man2html}.1;
ln -s vh-man2html "$b/%_bindir/man2html";

%if 0%{?suse_version}
%post
"%_sbindir/update-alternatives" --install \
	"%_bindir/man2html" man2html "%_bindir/vh-man2html" 15;
%endif

%if 0%{?suse_version}
%preun
if [ "$1" = 0 ]; then
	"%_sbindir/update-alternatives" --remove \
		man2html "%_bindir/vh-man2html";
fi;
%endif

%files
%defattr(-,root,root)
%_bindir/hman
%if 0%{?suse_version}
%ghost %_bindir/man2html
%_bindir/vh-man2html
%else
%_bindir/man2html
%_bindir/vh-man2html
%endif
%_mandir/man1/*

%changelog
openSUSE Build Service is sponsored by