Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 4ce990faf51b0b508c5b3196186d2e20 > files > 4

man-pages-it-2.80-6.mga3.src.rpm

%define LNG it
%define extra_version 0.5.0
%define fextra %{name}-extra-%{extra_version}

Summary: Italian manual pages
Name:    man-pages-%LNG
Version: 2.80
Release: %mkrel 6
License: GPL
URL:     ftp://ftp.pluto.it/pub/pluto/ildp/man/
Source:  ftp://ftp.pluto.it/pub/pluto/ildp/man/%{name}-%{version}.tar.gz
Source1:  %{fextra}.tar.bz2
Patch0: man-pages-it-2.80-installdir.patch
Group:   System/Internationalization
BuildRequires: man
Requires: locales-%LNG, man
Autoreq: false
BuildArch: noarch
Obsoletes: man-%LNG, manpages-%LNG
Provides:  man-%LNG, manpages-%LNG

%description 
Italian translations of Linux manual pages: this package includes not
only those from the LDP, but also translations of other popular
man-pages.

BEWARE: some pages are dated!


%prep
%setup -q -a1
%patch0 -p0

%build

%install
rm -fr %{buildroot}

make install prefix=%{buildroot}%{_prefix}
make install prefix=%{buildroot} -C %{fextra}

LANG=%LNG DESTDIR=%{buildroot} %{_sbindir}/makewhatis %{buildroot}/%{_mandir}/%LNG

mkdir -p %{buildroot}%{_sysconfdir}/cron.weekly
cat > %{buildroot}%{_sysconfdir}/cron.weekly/makewhatis-%LNG.cron << EOF
#!/bin/bash
LANG=%LNG %{_sbindir}/makewhatis %{_mandir}/%LNG
exit 0
EOF
chmod a+x %{buildroot}%{_sysconfdir}/cron.weekly/makewhatis-%LNG.cron

mkdir -p  %{buildroot}/var/cache/man/%LNG

touch %{buildroot}/var/cache/man/%LNG/whatis

# these are provided by vim7:
rm -f %{buildroot}/%{_mandir}/%LNG/man1/{view.,rview.,vim}*


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

%post
%create_ghostfile /var/cache/man/%LNG/whatis root root 644

%clean
rm -rf %{buildroot}

%files
%defattr(0644,root,man,755)
%doc CHANGELOG HOWTOHELP readme
%attr(0755,root,root) %dir %{_mandir}/%LNG
%dir /var/cache/man/%LNG
%ghost %config(noreplace) /var/cache/man/%LNG/whatis
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/cron.weekly/makewhatis-%LNG.cron
%attr(0755,root,root) %dir %{_mandir}/%LNG/man*
%{_mandir}/%LNG/man*/*
%{_mandir}/%LNG/whatis


%changelog

* Tue Mar 26 2013 luigiwalser <luigiwalser> 2.80-6.mga3
+ Revision: 405264
- fix ownership of man directories to not conflict with other packages (mga#9055)

* Sat Jan 12 2013 umeabot <umeabot> 2.80-5.mga3
+ Revision: 359386
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Jan 11 2011 ahmad <ahmad> 2.80-4.mga1
+ Revision: 5901
- drop old conflicts
- drop old man versionated requires, just 'man' is enough now
- imported package man-pages-it