%define LNG da %define name man-pages-%LNG %define version 0.1.1 %define release %mkrel 13 Summary: Danish man pages from the Linux Documentation Project Name: %{name} Version: %{version} Release: %{release} License: Distributable Group: System/Internationalization Patch: manpages-da-0.1.1-manpath.patch URL: http://www.sslug.dk/locale/man-sider/ Source: http://www.sslug.dk/locale/man-sider/manpages-da-%version.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: man Requires: locales-%LNG Requires: man BuildRequires: sed grep man Autoreq: false BuildArch: noarch %description A large collection of man pages (reference material) from the Linux Documentation Project (LDP), translated to Danish. 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, %{_sysconfdir}passwd, nfs) Section 6: Games (intro only) Section 7: Conventions, macro packages, etc. (e.g., nroff, ascii) Section 8: System administration (intro only) %prep %setup -q -n manpages-da-%{version} %patch -p1 %build %install rm -fr %{buildroot} make PREFIX=%{buildroot}/usr install 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 %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 -fr %{buildroot} %files %defattr(-,root,root) %doc læsmig AUTHORS ChangeLog %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 %_mandir/%LNG/* %changelog * Sat Jan 12 2013 umeabot <umeabot> 0.1.1-13.mga3 + Revision: 359362 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Jan 10 2011 ahmad <ahmad> 0.1.1-12.mga1 + Revision: 5472 - drop old versioned man requires, just 'man' is enough now - imported package man-pages-da