LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File man-pages.spec of Package man-pages (Project openSUSE:Factory)

# spec file for package man-pages
# 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:           man-pages
BuildRequires:  fdupes
Url:            http://www.kernel.org/doc/man-pages/download.html
Version:        3.43
Release:        0
Summary:        Linux  Manual Pages
License:        BSD-3-Clause and GPL-2.0+ and MIT
Group:          Documentation/Man
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         man-pages-%{version}.tar.bz2
Source1:        shadow.5
Source2:        gai.conf.5
Source3:        iconv.1
Source4:        update.sh
Patch:          man-pages.eal3.diff
Patch3:         %{name}_gai.conf-reference.patch
Patch5:         %{name}-tty_ioctl.patch
BuildArch:      noarch

A large collection of man pages (documentation) from the Linux
Documentation Project (LDP).  The man pages are organized into the
following sections: Section 1, user commands (intro only); Section 2,
system calls; Section 3, libc calls; Section 4, devices (e.g., hd, sd);
Section 5, file formats and protocols (e.g., wtmp, /etc/passwd, nfs);
Section 6, games (intro only); Section 7, conventions, macro packages,
etc. (e.g., nroff, ascii); and Section 8, system administration (intro

    "Michael Kerrisk" <mtk.manpages@googlemail.com>

%setup -q
%patch -p2
%patch5 -p1
find -name "*.orig" | xargs rm -fv

cp %SOURCE1 man5/
cp %{SOURCE2} man5/
cp %{SOURCE3} man1/
# not actual anymore
rm -f man2/ioctl_list.2
# nfs-utils
rm -f man5/exports.5
# coreutils, diffutils
rm -f man1/vdir.1 man1/touch.1 man1/rmdir.1 man1/rm.1 man1/mv.1 man1/mknod.1 man1/mkfifo.1 man1/mkdir.1 man1/ls.1 man1/ln.1 man1/install.1 man1/du.1 man1/dircolors.1 man1/dir.1 man1/diff.1 man1/df.1 man1/dd.1 man1/cp.1 man1/chown.1 man1/chmod.1 man1/chgrp.1 man1/getent.1 man3/getaddrinfo.3.orig man3/{getifaddrs.3,freeifaddrs.3}
# glibc
rm -f man3/crypt.3 man3/crypt_r.3

mkdir -p $RPM_BUILD_ROOT%{_mandir}
for i in man? ; do
  mkdir -p $RPM_BUILD_ROOT%{_mandir}/$i
  cp -p $i/* $RPM_BUILD_ROOT%{_mandir}/$i/
cd $RPM_BUILD_ROOT%{_mandir}
for i in */* ; do
    grep "^.so man" $i && FOUND=1
    if [ $FOUND == 1 ] ; then
      if [ ! -f `grep "^.so man" $i | awk '{print $2}'` ]; then
echo ""
echo "The following manual pages are now missing (for .so reference):"
echo ""
if [ $RETVAL -ne 0 ] ; then
  exit $RETVAL
%fdupes -s $RPM_BUILD_ROOT


%doc %{_mandir}/man*/*.gz
%doc man-pages-*.Announce
%doc man-pages-*.lsm
%doc Changes