Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 1e1cde1b38cf53f3428c163a22eee848 > files > 5

man-pages-de-0.3-2mdk.src.rpm

%define LANG de
%define version 0.3
%define release 2mdk
%define fname manpages-de-%{version} 

Summary: German man (manual) pages from the Linux Documentation Project.
Summary(de): Deutsche Man-Pages (Handbuch) vom Linux-Documentation Projekt.
Name: man-pages-%{LANG}
Version: %{version}
Release: %{release}
License: Distributable
Group: System/Internationalization
Source: ftp://ftp.Infodrom.North.DE/pub/Linux/Devel/%{fname}.tar.bz2  
Source1: makewhatis.%{LANG}.bz2
Patch0: man-pages-de-0.2-rofffixes.patch.bz2
Patch1: man-pages-de-0.3-nolocalfile.patch.bz2
Icon: books-%{LANG}.xpm
URL: http://www.infodrom.ffis.de/projects/manpages-de/
Buildroot: %_tmppath/man-pages-%{LANG}
Prereq: sed grep man
Autoreqprov: false
BuildArchitectures: noarch
Requires: locales-%{LANG}
Obsoletes: man-%{LANG}, manpages-%{LANG}
Provides: man-%{LANG}, manpages-%{LANG}

%description
A large collection of man pages (reference material) from the Linux 
Documentation Project (LDP), translated to German.  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)
        Section 8:  System administration (intro only)

%description -l de
Eine große Sammlung deutscher man-pages (Handbuch) von Linux-Documentation
Projekt (LDP). Die man-pages sind in die folgenden Abschnitte unterteilt:

        Abschnitt 1:  Benutzer-Befehle (nur Einführung)
        Abschnitt 2:  System-Aufrufe
        Abschnitt 3:  libc-Aufrufe
        Abschnitt 4:  Geräte (z.B., hd, sd)
        Abschnitt 5:  Dateiformate und Protokolle (z.B., wtmp, /etc/passwd,
                      nfs)
        Abschnitt 6:  Spiele (nur Einführung)
        Abschnitt 7:  Konventionen, Makro-Pakete, usw. (z.B., nroff, ascii)
        Abschnitt 8:  Systemadministration (nur Einführung)

%prep
%setup -q -n %{fname}
%patch0 -p1
%patch1 -p1

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/%{LANG}/man{1,2,3,4,5,6,7,8,9,n}
mkdir -p $RPM_BUILD_ROOT/var/catman/%{LANG}/cat{1,2,3,4,5,6,7,8,9,n}

for i in 1 2 3 4 5 6 7 8; do
	cp -avrf man$i $RPM_BUILD_ROOT/%{_mandir}/%{LANG}/
done

# those files conflict whith net-tools
rm $RPM_BUILD_ROOT/%{_mandir}/de/man1/hostname.1

mkdir -p $RPM_BUILD_ROOT/usr/sbin
bzcat %SOURCE1 > $RPM_BUILD_ROOT/usr/sbin/makewhatis.%{LANG}
chmod a+rx $RPM_BUILD_ROOT/usr/sbin/makewhatis.%{LANG}

TMPFILE=%{_tmppath}/whatis$$$$ $RPM_BUILD_ROOT/usr/sbin/makewhatis.%{LANG} \
        $RPM_BUILD_ROOT/%{_mandir}/%{LANG}

mkdir -p $RPM_BUILD_ROOT/etc/cron.weekly
cat > $RPM_BUILD_ROOT/etc/cron.weekly/makewhatis-%{LANG}.cron << EOF
#!/bin/bash
/usr/sbin/makewhatis.%{LANG} /%{_mandir}/%{LANG}
exit 0
EOF
chmod a+x $RPM_BUILD_ROOT/etc/cron.weekly/makewhatis-%{LANG}.cron

%post
/etc/cron.weekly/makewhatis-%{LANG}.cron
touch /%{_mandir}/%{LANG}/whatis

%postun
# 0 means deleting the package
if [ "$1" = "0" ]; then
   ## Force removing of /var/catman/%{LANG}, if there isn't any man page
   ## directory /%{_mandir}/%{LANG}
   if [ ! -d /%{_mandir}/%{LANG} ] ; then
       rm -rf /var/catman/%{LANG}
   fi
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(0644,root,man, 0755)
%doc CHANGES README COPYRIGHT
%defattr(0644,root,man, 755)
%dir %{_mandir}/%{LANG}
%{_mandir}/%{LANG}/man*
%ghost /%{_mandir}/%{LANG}/whatis
%attr(775,root,man)/var/catman/%{LANG}
%attr(755,root,root)/usr/sbin/makewhatis.%{LANG}
%config(noreplace) %attr(755,root,root)/etc/cron.weekly/makewhatis-%{LANG}.cron

%changelog
* Thu Mar 07 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.3-2mdk
- provides manpages-%%{LANG}
- don't overwrite crontab if user altered it
- fix permission on /usr/share/man/cs/*

* Tue Jul 10 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.3-1mdk
- update url
- update
- minor spec fixes
- remove conflicting hostname.1

* Tue May 01 2001 David BAUDENS <baudens@mandrakesoft.com> 0.2-12mdk
- Use %%_tmppath for BuildRoot

* Tue Jul 18 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.2-11mdk
- build release for BM
- fix build as user (whatis)

* Mon Jun 26 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.2-10mdk
- use mandir macro in order to be ok when switching to /usr/share/man as
  following FHS.
- spechelper, permissions

* Tue Mar 28 2000 Denis Havlik <denis@mandrakesoft.com> 0.2-8mdk
- convert to new group scheme
- add "Prereq: sed grep man"

* Mon Jan 10 2000 Pablo Saratxaga <pablo@mandrakesoft.com>
- removed hostname(1), it conflicts with file provided by net-tools

* Fri Nov 19 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- moved makewhatis.%{LANG} from /usr/local/sbin to /usr/sbin

* Tue Jul 20 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- included some nice improvements from man-pages-pl

* Wed Jul  7 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- changed the name from man-de to man-pages-de, to make it consistent
  with the english man pages package.
- merged with the rpm package I mantained before; that is I added an icon,
  the /var/catman/de tree, a makewhatis.de script, and a cron entry to run it

* Tue Apr 20 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Initial version.
- Add a script for /etc/man.config