- added tr-bash patch (use proper shebang in bash script)
[packages/man-pages.git] / man-pages.spec
CommitLineData
959435fe 1#
2# Conditional build:
ec14e164 3%bcond_with tars # generate man-pages tars for other packages [not done yet]
959435fe 4#
8da581ee 5Summary: System manual pages from the Linux Documentation Project
a888fd84
ER
6Summary(de.UTF-8): System-man-Seiten vom Linux Documentation Project
7Summary(es.UTF-8): Páginas de manual, del Proyecto de Documentación del Linux (LDP)
8Summary(fi.UTF-8): Suomenkieliset man-sivut
9Summary(fr.UTF-8): Pages man système du Projet de Documentation Linux
10Summary(it.UTF-8): Pagine di manuale
11Summary(pl.UTF-8): Podręczniki systemowe z Linux Documentation Project
12Summary(pt.UTF-8): Páginas de manual, do Projeto de Documentação do Linux (LDP)
13Summary(pt_BR.UTF-8): Páginas de manual, do Projeto de Documentação do Linux (LDP)
14Summary(ru.UTF-8): Страницы руководства из Проекта Документации на Линукс
15Summary(tr.UTF-8): Linux Belgeleme Projesinin sistem kılavuz sayfaları
16Summary(uk.UTF-8): Сторінки мануалу (man) з Linux Documentation Project
8da581ee 17Name: man-pages
6a443a09 18Version: 3.71
c640ce00 19Release: 3
4fa3f14b 20License: distributable
8da581ee 21Group: Documentation
664977a6 22%define cs_version 0.17.20080113
b0e8db7f 23%define da_version 0.1.1
664977a6 24%define de_version 0.5
b070770a 25%define es_version 1.55
b0e8db7f 26%define es_extra_version 0.8a
b070770a 27%define fi_version 0.2
664977a6 28%define fr_version 3.03.0
b070770a 29%define hu_version 20010119
b0e8db7f 30%define id_version 20011116
664977a6
MK
31%define it_version 2.80
32%define ja_version 20130715
b070770a 33%define ko_version 20050219
887cc7a5 34%define nl_version 0.13.3
b070770a 35%define pl_version 20051105
b0e8db7f 36%define pt_version 1.39
c371e08d 37%define ro_version 0.2
b070770a 38#%%define ru_version 0.98
cb1f2108 39%define ru_asp_version 1.4
664977a6 40%define tr_version 1.0.5
95771125 41%define zh_version 1.5
42313ba5 42Source0: http://www.kernel.org/pub/linux/docs/man-pages/%{name}-%{version}.tar.xz
6a443a09 43# Source0-md5: 9a2a288f1e481045c991e0cb476127d8
664977a6
MK
44Source1: ftp://ftp.linux.cz/pub/localization/linux/czman/%{name}-cs-%{cs_version}.tar.bz2
45# Source1-md5: a3df67d98ab63a0a360cd0794ec87e0e
b070770a
JB
46# there is no LDP man page here, yet - but include it in sources for completeness
47Source2: http://www.sslug.dk/locale/man-sider/manpages-da-%{da_version}.tar.gz
48# Source2-md5: d12ba0481d824c28a8b7d6b73e20d7c0
c594fddb 49Source3: http://www.infodrom.org/projects/manpages-de/download/manpages-de-%{de_version}.tar.gz
664977a6 50# Source3-md5: 6686b1be6da01cdbb5ea7511ddcf61a0
b070770a
JB
51Source4: http://www.ditec.um.es/~piernas/manpages-es/%{name}-es-%{es_version}.tar.bz2
52# Source4-md5: b71f701dcae827f2f5e4e848c66321fc
b0e8db7f 53Source5: http://www.ditec.um.es/~piernas/manpages-es/%{name}-es-extra-%{es_extra_version}.tar.gz
18e828fd 54# Source5-md5: 5827f41f77658df17f550b7f8e831432
b070770a
JB
55# extracted from http://www.ftp.funet.fi/index/sotlinux/bestlinux-2000R3/BL_2000_R3_FINAL/update/Finnish/man-pages-fi-0.2-1.src.rpm
56# (despite archive filename it's 0.2 version)
57Source6: man-fi-0.1.tar.bz2
58# Source6-md5: bb266d3797cdf71bfbe1da190196f455
4694804c 59Source7: http://manpagesfr.free.fr/download/%{name}-fr-%{fr_version}.tar.bz2
664977a6 60# Source7-md5: 64046b022c7c8d559d78dd05f953261b
b070770a
JB
61#Source8: http://download.uhulinux.hu/sources/man-pages-hu/man_hu_%{hu_version}.tar.gz (older)
62Source8: http://ftp.debian.org/debian/pool/main/m/manpages-hu/manpages-hu_%{hu_version}.orig.tar.gz
63# Source8-md5: 742b682c5237a1e370b28f363826b2d5
b070770a
JB
64# there is no LDP man page here, yet, but included for completeness
65# based on http://nakula.rvs.uni-bielefeld.de/made/my_project/ManPage/ (dead now)
4694804c 66Source9: http://www.mif.pg.gda.pl/homepages/ankry/man-pages/%{name}-from-www-id-%{id_version}.tar.gz
b070770a 67# Source9-md5: 34a69de42ec4ae8180b947f8777a3e7a
c594fddb 68# available also as http://
69Source10: ftp://ftp.pluto.linux.it/pub/pluto/ildp/man/%{name}-it-%{it_version}.tar.gz
664977a6
MK
70# Source10-md5: d6edbaf893507f80199f35df9c268aa0
71Source11: http://linuxjm.sourceforge.jp/%{name}-ja-%{ja_version}.tar.gz
72# Source11-md5: e4b364e9707b5421d6f54d722f16998d
b070770a
JB
73Source12: http://download.kldp.net/man/man-pages-ko/%{ko_version}/%{name}-ko-%{ko_version}.tar.gz
74# Source12-md5: e31dc6a51c02436371373dedaeeeacab
887cc7a5 75Source13: ftp://ftp.nl.linux.org/pub/DOC-NL/manpages-nl/manpages-nl-%{nl_version}.tar.gz
18e828fd 76# Source13-md5: b37b0216a87db7583e88ba87031a0b4a
d33d2eab 77# TODO: PTM has been overtaken by new project at http://manpages-pl.sourceforge.net/
b070770a
JB
78Source14: %{name}-pl-PTM-snapshot.%{pl_version}.tar.bz2
79# Source14-md5: b9b5751fcde4c36022850d0e5a4757d3
95771125 80Source15: ftp://ftp.win.tue.nl/pub/home/aeb/linux-local/manpages/tr/%{name}-pt_BR-%{pt_version}.tgz
18e828fd 81# Source15-md5: 3f8db6dd6a7884b595e70f624ac93735
b070770a
JB
82# no LDP man pages yet
83Source16: http://www.rolix.org/man/arhiva/man-pages-ro-%{ro_version}.tar.gz
84# Source16-md5: ac5b2c970a31cb721e068ff80e5bd466
cb1f2108 85#Source17: http://www.linuxshare.ru/projects/trans/manpages-ru-%{ru_version}.tar.bz2
b070770a 86# ASP-linux have more up-to-date manpages (but 0.98 contains some updated pages)
1f3051b1 87Source17: http://www.mif.pg.gda.pl/homepages/ankry/man-pages/manpages-ru-asp-%{ru_asp_version}.tar.bz2
cb1f2108 88# Source17-md5: fffb27648417c8dd551e2a4403eefc64
9ba960e6 89Source18: http://download.sourceforge.net/belgeler/man-pages-tr-%{tr_version}.tar.gz
664977a6 90# Source18-md5: 8f322a60c80e31c34ef8979edaf68aae
b070770a
JB
91Source19: http://www.linux.org.ua/twiki/pub/Projects/ManUk/man-pages-uk_UA.alfa.tar.gz
92# Source19-md5: 89576c5b51bb83c8bfa8bda794b96e21
95771125 93#Source20: http://cmpp.linuxforum.net/download/man-pages-zh_CN-%{zh_version}.tar.gz
94Source20: http://download.sf.linuxforum.net/cmpp/man-pages-zh_CN-%{zh_version}.tar.gz
95# Source20-md5: edfe517621579520cf7451088ab126ea
88ba9efa
AM
96Source30: https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/man-pages-posix-2013-a.tar.xz
97# Source30-md5: 825fde78e6fddd02426ecdd50e2cbe0d
b0e8db7f 98Source50: %{name}-extra.tar.bz2
a7ad42b7 99# Source50-md5: 15d763c5221088dcb15ba8ae95f6d239
71782a41 100Source100: %{name}-tars.list
959435fe 101Patch0: %{name}-localtime.patch
8e8de27c 102Patch1: %{name}-zh_fixes.patch
71782a41
JB
103Patch2: %{name}-misc.patch
104Patch3: %{name}-extra.patch
d33d2eab 105Patch4: %{name}-tr-bash.patch
ba74df17 106URL: http://www.kernel.org/doc/man-pages/
672cf0af 107BuildRequires: sed >= 4.0
d33d2eab
JB
108# for man-pages-tr
109BuildRequires: zlib-devel
950df0a5 110Obsoletes: man-pages-cs
111Obsoletes: man-pages-de
112Obsoletes: man-pages-es
113Obsoletes: man-pages-fi
114Obsoletes: man-pages-fr
115Obsoletes: man-pages-hu
116Obsoletes: man-pages-it
117Obsoletes: man-pages-ja
118Obsoletes: man-pages-ko
119Obsoletes: man-pages-nl
fd014ac0 120Obsoletes: man-pages-pl
950df0a5 121Obsoletes: man-pages-pt
d16b4828 122Obsoletes: man-pages-pt_BR
950df0a5 123Obsoletes: man-pages-ru
c594fddb 124Obsoletes: man-pages-ru-asp
125Obsoletes: man-pages-uk
51268b8a 126Obsoletes: man-pages-zh
dc734bfb 127Obsoletes: manpages-hu
17acc5d5 128Conflicts: attr-devel < 2.2.0-2
71782a41
JB
129Conflicts: kbd < 1.12-9
130Conflicts: libcap < 1:1.10-5
672cf0af 131BuildArch: noarch
c594fddb 132BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
4694804c 133AutoReqProv: no
d2c978c2 134
135%description
136A large collection of man pages covering programming APIs, file
137formats, protocols, etc.
138
950df0a5 139- section 1: user commands (intro only)
140- section 2: system calls
f425bca4 141- section 3: libc calls (intro only)
950df0a5 142- section 4: devices (e.g., hd, sd)
143- section 5: file formats and protocols (e.g., wtmp, /etc/passwd, nfs)
144- section 6: games (intro only)
145- section 7: conventions, macro packages, etc. (e.g., nroff, ascii)
146- section 8: system administration (intro only)
d2c978c2 147
bb9af523
JR
148%description -l de.UTF-8
149Eine große Sammlung von man-Seiten über Programmier-APIs,
d2c978c2 150Dateiformate, Protokolle, usw..
151
950df0a5 152- section 1: Benutzerbefehle (nur intro)
153- section 2: Systemaufrufe
f425bca4 154- section 3: libc-Aufrufe (nur intro)
bb9af523 155- section 4: Geräte (z.B. hd, sd)
950df0a5 156- section 5: Dateiformate und Protokolle (z.B. wtmp, /etc/passwd, nfs)
157- section 6: Spiele (nur intro)
158- section 7: Konventionen, Makro-Pakete, usw. (z.B. nroff, ascii)
159- section 8: Systemverwaltung (nur intro)
160
bb9af523
JR
161%description -l es.UTF-8
162Una larga colección de páginas de manuales cubriendo programación
1eef344c 163APIs, formatos de archivos, protocolos, etc.
164
bb9af523
JR
165- seción 1: comandos de usuario (solamente introducción)
166- seción 2: llamadas de sistema
167- seción 3: llamadas libc (solamente introducción)
168- seción 4: dispositivos (ej.: hd, sd)
169- seción 5: formatos de archivos y protocolos (ej: wtmp, /etc/passwd,
1eef344c 170 nfs)
bb9af523
JR
171- seción 6: juegos (solamente introducción)
172- seción 7: convenciones, paquetes de macros, etc. (ej: nroff, ascii)
173- seción 8: administración de sistema (solamente introducción)
1eef344c 174
bb9af523
JR
175%description -l fi.UTF-8
176Kokoelma man-sivujen käännöksiä suomenkielelle. Sivuja on mukana
177yhteensä 211 kpl ja ne on paketoitu 14.11.1999 mennessä valmiina
950df0a5 178olleista sivuista. Sivut ovat osista 1 (komennot) ja 2 (pelit).
d2c978c2 179
bb9af523 180%description -l fr.UTF-8
950df0a5 181Une large collection de pages de manuel du Project de Documentation
bb9af523
JR
182Linux (LDP), traduites en Français. Les pages de manuel sont
183organisées en differentes sections :
950df0a5 184
f425bca4 185- section 1: Commandes utilisateur (intro seulement)
bb9af523 186- section 2: Appels système
f425bca4 187- section 3: Appels de la Libc (intro seulement)
bb9af523 188- section 4: Périphériques (par ex. hd, sd)
950df0a5 189- section 5: Formats de fichiers et de protocoles (par ex. wtmp,
2321feb4 190 /etc/passwd, nfs)
950df0a5 191- section 6: Jeux (intro seulement)
192- section 7: Conventions, macro packages, etc. (par ex. nroff, ascii)
bb9af523 193- section 8: Administration système (intro seulement)
950df0a5 194
bb9af523 195%description -l it.UTF-8
950df0a5 196Traduzioni italiane delle pagine di manuale per Linux: questo
197pacchetto include non solo quelle dell'LDP, ma anche traduzioni di
198altre pagine di uso comune. ATTENZIONE: alcune pagine sono obsolete!
d2c978c2 199
bb9af523
JR
200%description -l pl.UTF-8
201Pakiet ten zawiera dużą kolekcję podręczników ekranowych (man pages),
202opisujących format plików, protokoły itp.
d2c978c2 203
bb9af523
JR
204- sekcja 1: polecenia użytkowników (tylko wstęp)
205- sekcja 2: wywołania systemowe
206- sekcja 3: wywołania bibliotek (tylko wstęp)
207- sekcja 4: urządzenia (np., hd, sd)
208- sekcja 5: format plików i protokoły (np., wtmp, /etc/passwd, nfs)
209- sekcja 6: gry (tylko wstęp)
950df0a5 210- sekcja 7: konwencje, makro-pakiety, itp. (np., nroff, ascii)
bb9af523 211- sekcja 8: administracja systemu (tylko wstęp)
950df0a5 212
bb9af523
JR
213%description -l pt.UTF-8
214Uma larga coleção de páginas de manuais cobrindo programação APIs,
f425bca4 215formatos de arquivos, protocolos, etc.
216
bb9af523
JR
217- seção 1: comandos de usuário (somente introdução)
218- seção 2: chamadas de sistema
219- seção 3: chamadas libc (somente introdução)
220- seção 4: dispositivos (ex.: hd, sd)
221- seção 5: formatos de arquivos e protocolos (ex: wtmp, /etc/passwd,
f425bca4 222 nfs)
bb9af523
JR
223- seção 6: jogos (somente introdução)
224- seção 7: convenções, pacotes de macros, etc. (ex: nroff, ascii)
225- seção 8: administração de sistema (somente introdução)
f425bca4 226
bb9af523
JR
227%description -l pt_BR.UTF-8
228Uma larga coleção de páginas de manuais cobrindo programação APIs,
1eef344c 229formatos de arquivos, protocolos, etc.
230
bb9af523
JR
231- seção 1: comandos de usuário (somente introdução)
232- seção 2: chamadas de sistema
233- seção 3: chamadas libc (somente introdução)
234- seção 4: dispositivos (ex.: hd, sd)
235- seção 5: formatos de arquivos e protocolos (ex: wtmp, /etc/passwd,
1eef344c 236 nfs)
bb9af523
JR
237- seção 6: jogos (somente introdução)
238- seção 7: convenções, pacotes de macros, etc. (ex: nroff, ascii)
239- seção 8: administração de sistema (somente introdução)
950df0a5 240
bb9af523
JR
241%description -l ru.UTF-8
242Небольшая коллекция страниц руководства из Проекта Документации на
243Линукс. Страницы руководства организованы следующим образом:
950df0a5 244
bb9af523
JR
245- секция 1: команд пользователя (только введение)
246- секция 2: системные вызовы
247- секция 3: функции библиотеки языка C (только введение)
248- секция 4: устройства (например, hd, sd)
249- секция 5: форматы файлов и протоколы (например, wtmp, /etc/passwd,
950df0a5 250 nfs)
bb9af523
JR
251- секция 6: игры (только введение)
252- секция 7: соглашения, макро-пакеты, и т. п. (например, nroff, ascii)
253- секция 8: утилиты администратора (только введение)
d5f41404 254
bb9af523
JR
255%description -l tr.UTF-8
256Programlama arayüzlerini, dosya formatlarını, protokolleri vs.
257kapsayan, geniş bir kılavuz sayfaları derlemesi.
d2c978c2 258
bb9af523
JR
259%description -l uk.UTF-8
260Великий набір сторінок мануалу (документації) з Linux Documentation
261Project (LDP). Сторінки організовані у такі секції: Секція 1, команди
262користувача (тільки вступ); Секція 2, системні виклики; Секція 3,
263виклики libc; Секція 4, пристрої (наприклад, hd, sd); Секція 5,
264формати файлів та протоколи (наприклад, wtmp, /etc/passwd, nfs);
265Секція 6, ігри (тільки вступ); Секція 7, угоди, макропакети і т.і.
266(наприклад, nroff, ascii); Секція 8, системне адміністрування (тільки
267вступ).
8daf7585 268
66f43052 269%package posix
270Summary: POSIX manual pages from the Linux Documentation Project
a888fd84
ER
271Summary(de.UTF-8): POSIX-man-Seiten vom Linux Documentation Project
272Summary(pl.UTF-8): Podręczniki systemowe z Linux Documentation Project dotyczące POSIX
66f43052 273Group: Documentation
274
275%description posix
276Part of POSIX 1003.1-2003 in man pages format.
277
bb9af523
JR
278%description posix -l pl.UTF-8
279Fragmenty POSIX 1003.1-2003 w postaci stron podręcznika systemowego.
66f43052 280
d2c978c2 281%prep
58d9f66c 282%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -a30
959435fe 283%patch0 -p1
672cf0af 284%patch1 -p0
d33d2eab 285%patch4 -p1
d2c978c2 286
58d9f66c
AM
287mv man-pages-posix-*/man*p .
288
ea5fdf72 289mkdir ko
b0e8db7f 290tar xzf %{SOURCE12} -C ko
17152e94 291
71782a41 292# unify trees for easier processing
672cf0af
JB
293mv -f man-pages-%{pt_version}-pt_BR pt_BR
294mv -f man-pages-cs-%{cs_version} cs
7b3c220b
JB
295# replace symlinks by .so pointers
296for l in `find cs -type l` ; do
297 t=`readlink "$l"`
298 rm -f "$l"
299 echo ".so $t" > "$l"
300done
672cf0af
JB
301mv -f manpages-da-%{da_version} da
302install -d da/man1
303mv -f da/*.1 da/man1
304mv -f manpages-de-%{de_version} de
305mv -f man-pages-es-%{es_version} es
306# already in main es
d33d2eab
JB
307%{__rm} man-pages-es-extra-%{es_extra_version}/man3/dl*.3
308%{__rm} man-pages-es-extra-%{es_extra_version}/man5/{acct,host.conf,resolv.conf,resolver}.5
309%{__rm} man-pages-es-extra-%{es_extra_version}/man8/ld.so.8
672cf0af
JB
310for f in 1 2 4 5 6 7 8 ; do
311 mv -i man-pages-es-extra-%{es_extra_version}/man${f}/* es/man${f}
312done
313mv -f manpages-fi fi
ea5fdf72 314mv -f man-pages-fr-%{fr_version} fr
672cf0af 315mv -f manpages-hu-%{hu_version}.orig/usr/share/man/hu hu
ea5fdf72 316mv -f man-pages-it-%{it_version} it
672cf0af
JB
317mv -f man-pages-ja-%{ja_version}/manual/LDP_man-pages ja
318# duplicates of LDP man pages
d33d2eab 319%{__rm} -r man-pages-ja-%{ja_version}/manual/{gnumaniak,ld.so,modutils/man2,glibc-linuxthreads/man3,man/man1/{apropos,man,whatis}.1,netkit/{man3/{daemon,err,login}.3,man5/ftpusers.5},bind/{man5/resolver.5,man7/mailaddr.7},util-linux/man1/tailf.1}
672cf0af 320# shadow manuals already in shadow package
d33d2eab 321%{__rm} -r man-pages-ja-%{ja_version}/manual/shadow
672cf0af 322# dhcp 3 not dhcp2
d33d2eab 323%{__rm} -r man-pages-ja-%{ja_version}/manual/dhcp2
672cf0af 324# nfs-utils not nfs-server
d33d2eab 325%{__rm} -r man-pages-ja-%{ja_version}/manual/nfs-server
672cf0af 326# ypbind-mt not ypbind
d33d2eab 327%{__rm} -r man-pages-ja-%{ja_version}/manual/ypbind
672cf0af 328# we use: net-tools/hostname, util-linux/{kill,write}, SysVinit/{last,mesg,wall,halt,reboot,shutdown}, textutils/od, quota/rquotad
d33d2eab 329%{__rm} man-pages-ja-%{ja_version}/manual/{GNU_sh-utils/man1/hostname.1,procps/man1/kill.1,util-linux/man1/{last,mesg,od,wall}.1,netkit/man1/write.1,nfs-utils/man8/rquotad.8,util-linux/man8/{halt,reboot,shutdown}.8}
672cf0af
JB
330# following modutils changes
331for f in man-pages-ja-%{ja_version}/manual/modutils/man8/{depmod,insmod,lsmod,modinfo,modprobe,rmmod} ; do
332 mv -f ${f}.8 ${f}.modutils.8
333done
334# avoid filename conflict
335mv -f man-pages-ja-%{ja_version}/manual/netkit/man8/ftpd.{8,8n}
664977a6
MK
336# remove files existing in main man-pages tarball
337# note: (should we keep those from main tarball or ja tarball?)
d33d2eab
JB
338%{__rm} man-pages-ja-%{ja_version}/manual/GNU_fileutils/man1/{chgrp,chmod,chown,cp,dd,df,du,install,ln,ls,mkdir,mkfifo,mknod,mv,rm,rmdir,touch}.1
339%{__rm} man-pages-ja-%{ja_version}/manual/GNU_sh-utils/man1/{basename,chroot,date,dirname,echo,env,expr,false,groups,hostid,id,logname,nice,nohup,pathchk,printenv,printf,pwd,sleep,stty,su,tee,test,true,tty,uname,users,who,whoami,yes}.1
340%{__rm} man-pages-ja-%{ja_version}/manual/GNU_textutils/man1/{cat,cksum,comm,csplit,cut,expand,fmt,fold,head,join,md5sum,nl,od,paste,pr,sort,split,sum,tac,tail,tr,unexpand,uniq,wc}.1
341%{__rm} man-pages-ja-%{ja_version}/manual/lpr-linux/man1/{lpq,lpr,lprm}.1
342%{__rm} man-pages-ja-%{ja_version}/manual/net-tools/man1/hostname.1
343%{__rm} man-pages-ja-%{ja_version}/manual/netatalk/man1/timeout.1
344%{__rm} man-pages-ja-%{ja_version}/manual/procps/man1/uptime.1
345%{__rm} man-pages-ja-%{ja_version}/manual/util-linux/man1/{arch,kill}.1
346%{__rm} man-pages-ja-%{ja_version}/manual/bind/man7/hostname.7
347%{__rm} man-pages-ja-%{ja_version}/manual/cups/man8/lpc.8
65aa3334 348for f in 1 3 4 5 6 7 8 ; do
672cf0af
JB
349 mv -i man-pages-ja-%{ja_version}/manual/*/man${f}/* ja/man${f}
350done
351mv -f manpages-nl-%{nl_version} nl
352mv -f pl_PL pl
353mv -f man-ro ro
354mv -f manpages-ru-asp-%{ru_asp_version} ru
d33d2eab
JB
355# FIXME: compiles some utility, should be in %build
356%{__make} -C man-pages-tr-%{tr_version}/source
664977a6 357find man-pages-tr-%{tr_version} -name '*.gz' | xargs gzip -d
672cf0af
JB
358mv -f man-pages-tr-%{tr_version}/tr tr
359mv -f man-pages-uk_UA.alfa uk
360mv -f man-pages-zh_CN-%{zh_version}/src zh_CN
1b885887 361find zh_CN -name CVS -o -name '*.orig' -o -name '*~' | xargs rm -rf
672cf0af 362# would go in big5 or gb18030, but not gb2312
d33d2eab 363%{__rm} zh_CN/man1/perltw.1
672cf0af 364# would go in gb18030, but not gb2312
d33d2eab 365%{__rm} zh_CN/man8/{chat,printcap}.8
71782a41
JB
366# unify name
367mv -f de/man7/{iso_8859_1,iso_8859-1}.7
7b3c220b 368mv -f es/man4/magic.4 es/man5/magic.5
59887c80
JB
369mv -f es/man8/sync.8 es/man1/sync.1
370mv -f fr/man8/sync.8 fr/man1/sync.1
7b3c220b 371mv -f hu/man1/gpm.1 hu/man8/gpm.8
59887c80 372# man1/sync.1 already exists
d33d2eab 373%{__rm} hu/man8/sync.8
71782a41
JB
374# unify name + fix infinite loop
375mv -f it/man7/{iso_8859-1,tmp}.7
376mv -f it/man7/{iso_8859_1,iso_8859-1}.7
377mv -f it/man7/{tmp,iso_8859_1}.7
378# non-existing target
d33d2eab 379%{__rm} it/man7/latin2.7
7b3c220b 380mv -f ja/man4/magic.4 ja/man5/magic.5
59887c80
JB
381mv -f ja/man8/nslookup.8 ja/man1/nslookup.1
382mv -f ja/man8/sync.8 ja/man1/sync.1
383mv -f ko/man8/sync.8 ko/man1/sync.1
384# filename typo?
385mv -f pl/man5/{at_acces,at_access}.5
386# man1/sync.1 already exists
d33d2eab 387%{__rm} pl/man8/sync.8
59887c80
JB
388mv -f pt_BR/man8/sync.8 pt_BR/man1/sync.1
389mv -f ru/man8/sync.8 ru/man1/sync.1
390# man1/sync.1 already exists
d33d2eab 391%{__rm} zh_CN/man8/sync.8
ae956556 392
393%patch2 -p1
672cf0af 394
71782a41
JB
395bzip2 -dc %{SOURCE50} | tar xf -
396%patch3 -p0
672cf0af 397
1b885887
ER
398# patching creates backups
399find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -rf
400
672cf0af 401# cleanup
d33d2eab 402%{__rm} man*/README*
672cf0af
JB
403
404for n in man{1,2,3,4,5,6,7,8,0p,1p,3p}/* */man{1,2,3,4,5,6,7,8,9}/* ; do
676df823
JR
405 if head -n 1 $n | grep "^\.so [^/]*$" >/dev/null 2>&1 ; then
406 sed -i -e 's,.so \([^\.]*\)\.\(.*\),.so man\2/\1.\2,' $n
672cf0af
JB
407 fi
408done
409
410ln -sf pt_BR pt
411
71782a41 412# time
d33d2eab 413%{__rm} man1/time.1
672cf0af 414# ftp servers
d33d2eab 415%{__rm} man5/ftpusers.5
e39e73dd 416# glibc
d33d2eab 417%{__rm} man8/ld-linux{,.so}.8
71782a41
JB
418
419%if %{with tars}
420package=NONE
421while read line ; do
422 if echo $line | grep -q '^\[.\+\]$' ; then
423 package=`echo $line | sed -e 's/^\[//;s/\]$//;'`
424 else
425 if [ -f "$line" ]; then
426 echo "$line" >> ${package}-man.list
427 fi
e83da0a4 428 # omit pt_BR here, package them as pt
6c330282 429 for l in cs da de es fi fr hu id it ja ko nl pl pt ru tr uk zh_CN ; do
71782a41
JB
430 if [ -f "$l/$line" ]; then
431 echo "$l/$line" >> ${package}-man.list
432 fi
433 done
434 fi
435done < %{SOURCE100}
436for l in *-man.list ; do
437 t=`basename $l .list`
438 if [ -f README.${t}-pages ]; then
439 echo "README.${t}-pages" >> "$l"
440 fi
441 tar cjf %{_sourcedir}/${t}-pages.tar.bz2 --files-from "$l"
59887c80 442 grep '^man' "$l" | xargs rm -f
71782a41
JB
443done
444%else
672cf0af 445# glibc
d33d2eab
JB
446find man3 -type f | grep -v 'intro\.3' | xargs %{__rm}
447%{__rm} man1/{getent,iconv,ldd,locale,localedef,sprof,rpcgen}.1
448%{__rm} man5/{locale,nscd.conf,nsswitch.conf,tzfile}.5
449%{__rm} man7/{ascii,charsets,iso*,koi8-r,latin*,locale,unicode,utf*}.7
450%{__rm} man8/{ld.so,ldconfig,nscd,sln,tzselect,zdump,zic}.8
451%{__rm} */man1/ldd.1 */man8/sln.8 */man1/iconv.1
452%{__rm} {ja,ru}/man1/rpcgen.1
71782a41
JB
453%endif
454
da7c01fd 455# rpcbind, formerly glibc
d33d2eab
JB
456%{__rm} man8/rpcinfo.8
457# shadow (but not pwdutils!); shadow(5) is missing in pwdutils too
458%{__rm} man5/passwd.5
0da12dbc 459
d2c978c2 460%install
461rm -rf $RPM_BUILD_ROOT
331090ee 462install -d $RPM_BUILD_ROOT%{_mandir}/man{1,2,3,4,5,6,7,8,0p,1p,3p}
45cdc2e5 463
331090ee 464for n in man{1,2,3,4,5,6,7,8,0p,1p,3p}/*; do
28158896 465 install $n $RPM_BUILD_ROOT%{_mandir}/$n
d2c978c2 466done
d5f41404 467
e83da0a4 468# omit pt_BR here, package them as pt
6c330282 469for l in cs da de es fi fr hu id it ja ko nl pl pt ru tr uk zh_CN ; do
672cf0af
JB
470 install -d $RPM_BUILD_ROOT%{_mandir}/$l/man{1,2,3,4,5,6,7,8}
471 for n in man{1,2,3,4,5,6,7,8}/*; do
472 if [ -f $l/$n ]; then
473 install $l/$n $RPM_BUILD_ROOT%{_mandir}/$l/$n
b0e8db7f 474 fi
475 done
476done
308d755b 477
e780c0e9 478# files with just .so links pointing to non-existing man pages
d33d2eab
JB
479%{__rm} $RPM_BUILD_ROOT%{_mandir}/{man2,{fr,ja}/man2}/{getcwd,gethostid,mq_notify,mq_open,mq_timedreceive,mq_timedsend,mq_unlink}.2
480%{__rm} $RPM_BUILD_ROOT%{_mandir}/man2/{fstatvfs,getcontext,getdtablesize,setcontext,sethostid,sigqueue,statvfs}.2
481%{__rm} $RPM_BUILD_ROOT%{_mandir}/fr/man2/{clock_getres,clock_gettime,clock_settime,sethostid}.2
482%{__rm} $RPM_BUILD_ROOT%{_mandir}/ja/man2/{sethostid,sigqueue,statvfs}.2
483%{__rm} $RPM_BUILD_ROOT%{_mandir}/{man7,ja/man7}/tis-620.7
484%{__rm} $RPM_BUILD_ROOT%{_mandir}/{fr,ja}/man2/fstatvfs.2
485%{__rm} $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,ja,ko,nl,pl,pt,ru}/man2/{oldfstat,oldlstat,oldolduname,oldstat,olduname}.2
486%{__rm} $RPM_BUILD_ROOT%{_mandir}/{es,fr,ru}/man2/setcontext.2
487%{__rm} $RPM_BUILD_ROOT%{_mandir}/de/man2/{create_module,delete_module,get_kernel_syms,init_module}.2
488%{__rm} $RPM_BUILD_ROOT%{_mandir}/{es,ru}/man5/networks.5
e780c0e9 489
d2c978c2 490%clean
491rm -rf $RPM_BUILD_ROOT
492
493%files
44b81d9f 494%defattr(644,root,root,755)
331090ee 495%{_mandir}/man?/*
d5f41404 496%lang(cs) %{_mandir}/cs/man*/*
497%lang(de) %{_mandir}/de/man*/*
498%lang(es) %{_mandir}/es/man*/*
499%lang(fi) %{_mandir}/fi/man*/*
500%lang(fr) %{_mandir}/fr/man*/*
501%lang(hu) %{_mandir}/hu/man*/*
502%lang(it) %{_mandir}/it/man*/*
503%lang(ja) %{_mandir}/ja/man*/*
029d2616 504%lang(ko) %{_mandir}/ko/man*/*
d5f41404 505%lang(nl) %{_mandir}/nl/man*/*
506%lang(pl) %{_mandir}/pl/man*/*
029d2616 507%lang(pt) %{_mandir}/pt/man*/*
e83da0a4 508#%lang(pt_BR) %{_mandir}/pt_BR/man*/*
d5f41404 509%lang(ru) %{_mandir}/ru/man*/*
b070770a 510%lang(tr) %{_mandir}/tr/man*/*
78e97ba6 511%lang(uk) %{_mandir}/uk/man*/*
51268b8a 512%lang(zh_CN) %{_mandir}/zh_CN/man*/*
331090ee 513
514%files posix
515%defattr(644,root,root,755)
516%dir %{_mandir}/man?p
517%{_mandir}/man?p/*
This page took 0.309079 seconds and 4 git commands to generate.