3 %bcond_with tars # generate man-pages tars for other packages [not done yet]
5 Summary: System manual pages from the Linux Documentation Project
6 Summary(de.UTF-8): System-man-Seiten vom Linux Documentation Project
7 Summary(es.UTF-8): Páginas de manual, del Proyecto de Documentación del Linux (LDP)
8 Summary(fi.UTF-8): Suomenkieliset man-sivut
9 Summary(fr.UTF-8): Pages man système du Projet de Documentation Linux
10 Summary(it.UTF-8): Pagine di manuale
11 Summary(pl.UTF-8): Podręczniki systemowe z Linux Documentation Project
12 Summary(pt.UTF-8): Páginas de manual, do Projeto de Documentação do Linux (LDP)
13 Summary(pt_BR.UTF-8): Páginas de manual, do Projeto de Documentação do Linux (LDP)
14 Summary(ru.UTF-8): Страницы руководства из Проекта Документации на Линукс
15 Summary(tr.UTF-8): Linux Belgeleme Projesinin sistem kılavuz sayfaları
16 Summary(uk.UTF-8): Сторінки мануалу (man) з Linux Documentation Project
20 License: distributable
22 %define cs_version 0.17.20080113
23 %define da_version 0.1.2
24 %define de_version 0.5
25 %define es_version 1.55
26 %define es_extra_version 0.8a
27 %define fi_version 0.2
28 %define fr_version 3.70-1
29 %define hu_version 20010119
30 %define id_version 20011116
31 %define it_version 5.06
32 %define ja_version 20230615
33 %define ko_version 20050219
34 %define nl_version 0.13.3
35 %define pl_version 20051105
36 %define pt_version 1.39
37 %define ro_version 0.2
38 #%%define ru_version 0.98
39 %define ru_asp_version 1.4
40 %define tr_version 2.0.3
41 %define zh_version 1.5.2
42 %define posix_version 2017-a
43 Source0: https://www.kernel.org/pub/linux/docs/man-pages/%{name}-%{version}.tar.xz
44 # Source0-md5: bbce1456edfa75a66c189cc594af6c4d
45 Source1: ftp://ftp.linux.cz/pub/localization/linux/czman/%{name}-cs-%{cs_version}.tar.bz2
46 # Source1-md5: a3df67d98ab63a0a360cd0794ec87e0e
47 # there is no LDP man page here, yet - but include it in sources for completeness
48 # http://www.sslug.dk/locale/man-sider/manpages-da-%{da_version}.tar.gz (404 as of Feb 2018)
49 Source2: manpages-da-%{da_version}.tar.gz
50 # Source2-md5: 26cdd12ea7c62e595fc1a3a39bf53115
51 # TODO: new project at https://manpages-de-team.pages.debian.net/manpages-de/, current version is 2.12
52 Source3: http://www.infodrom.org/projects/manpages-de/download/manpages-de-%{de_version}.tar.gz
53 # Source3-md5: 6686b1be6da01cdbb5ea7511ddcf61a0
54 Source4: http://www.ditec.um.es/~piernas/manpages-es/%{name}-es-%{es_version}.tar.bz2
55 # Source4-md5: b71f701dcae827f2f5e4e848c66321fc
56 Source5: http://www.ditec.um.es/~piernas/manpages-es/%{name}-es-extra-%{es_extra_version}.tar.gz
57 # Source5-md5: 5827f41f77658df17f550b7f8e831432
58 # 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
59 # (despite archive filename it's 0.2 version)
60 Source6: man-fi-0.1.tar.bz2
61 # Source6-md5: bb266d3797cdf71bfbe1da190196f455
62 #Source7Download: https://gitlab.com/perkamon/man-pages-fr/tags
63 # TODO: use https://gitlab.com/perkamon/man-pages-fr/-/archive/%{fr_version}/man-pages-fr-%{fr_version}.tar.bz2, then make dist-fr to get tarball - but 4.16 produces very few translations
64 Source7: man-pages-fr-%{fr_version}.tar.xz
65 # Source7-md5: 66a6033fb2ed3641c35b1d53c0fe5deb
66 # there is also: http://manpagesfr.free.fr/download/man-pages-extras-fr-0.8.1.tar.bz2
67 # and: http://manpagesfr.free.fr/download/man-pages-sup-fr-20080606.tar.bz2
68 #Source8: http://download.uhulinux.hu/sources/man-pages-hu/man_hu_%{hu_version}.tar.gz (older)
69 Source8: http://ftp.debian.org/debian/pool/main/m/manpages-hu/manpages-hu_%{hu_version}.orig.tar.gz
70 # Source8-md5: 742b682c5237a1e370b28f363826b2d5
71 # there is no LDP man page here, yet, but included for completeness
72 # based on http://nakula.rvs.uni-bielefeld.de/made/my_project/ManPage/ (dead now)
73 Source9: http://www.mif.pg.gda.pl/homepages/ankry/man-pages/%{name}-from-www-id-%{id_version}.tar.gz
74 # Source9-md5: 34a69de42ec4ae8180b947f8777a3e7a
75 # available also as http://
76 Source10: ftp://ftp.pluto.linux.it/pub/pluto/ildp/man/%{name}-it-%{it_version}.tar.xz
77 # Source10-md5: 80329fc120d4ea29cd3408b7ced4f4c3
78 # note: man-pages-it-extra-0.5.0.tar.gz is also covered by the above version
79 #Source11Download: http://linuxjm.osdn.jp/download.html
80 Source11: http://linuxjm.osdn.jp/%{name}-ja-%{ja_version}.tar.gz
81 # Source11-md5: a16fbd9038cfafc90287aee0bd711ea5
82 Source12: http://download.kldp.net/man/man-pages-ko/%{ko_version}/%{name}-ko-%{ko_version}.tar.gz
83 # Source12-md5: e31dc6a51c02436371373dedaeeeacab
84 # TODO: check 20051127 in Debian/Ubuntu?
85 Source13: ftp://ftp.nl.linux.org/pub/DOC-NL/manpages-nl/manpages-nl-%{nl_version}.tar.gz
86 # Source13-md5: b37b0216a87db7583e88ba87031a0b4a
87 # TODO: PTM has been overtaken by new project at http://manpages-pl.sourceforge.net/
88 # http://downloads.sourceforge.net/manpages-pl/manpages-pl-%{pl_version}.tar.bz2 with pl_version=0.7
89 Source14: %{name}-pl-PTM-snapshot.%{pl_version}.tar.bz2
90 # Source14-md5: b9b5751fcde4c36022850d0e5a4757d3
91 Source15: http://www.win.tue.nl/~aeb/ftpdocs/linux-local/manpages/tr/%{name}-pt_BR-%{pt_version}.tgz
92 # Source15-md5: 3f8db6dd6a7884b595e70f624ac93735
93 # no LDP man pages yet
94 Source16: http://www.rolix.org/man/arhiva/man-pages-ro-%{ro_version}.tar.gz
95 # Source16-md5: ac5b2c970a31cb721e068ff80e5bd466
96 # TODO: new project at: https://sourceforge.net/projects/man-pages-ru/files/, latest version man-pages-ru_4.17-2385-2385-20181124.tar.bz2
97 #Source17: http://linuxshare.ru/projects/trans/manpages-ru-%{ru_version}.tar.bz2
98 # ASP-linux have more up-to-date manpages (but 0.98 contains some updated pages)
99 Source17: http://www.mif.pg.gda.pl/homepages/ankry/man-pages/manpages-ru-asp-%{ru_asp_version}.tar.bz2
100 # Source17-md5: fffb27648417c8dd551e2a4403eefc64
101 Source18: http://downloads.sourceforge.net/belgeler/manpages-tr-%{tr_version}.tar.gz
102 # Source18-md5: de42894c27b02e7423f462cd0c53d9ec
103 Source19: http://www.linux.org.ua/twiki/pub/Projects/ManUk/man-pages-uk_UA.alfa.tar.gz
104 # Source19-md5: 89576c5b51bb83c8bfa8bda794b96e21
105 #Source20Download: https://github.com/lidaobing/manpages-zh/releases
106 # also newer git snapshot available at http://www.win.tue.nl/~aeb/ftpdocs/linux-local/manpages/tr/man-pages-zh-20141004.zip
107 Source20: https://github.com/lidaobing/manpages-zh/archive/v%{zh_version}/manpages-zh-%{zh_version}.tar.gz
108 # Source20-md5: 1bbdc4f32272df0b95146518b27bf4be
109 Source30: https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/man-pages-posix-%{posix_version}.tar.xz
110 # Source30-md5: 16972095f1ec0820d51b2390e055c59d
111 Source50: %{name}-links.list
112 Source100: %{name}-tars.list
113 Patch0: %{name}-zh_fixes.patch
114 Patch1: %{name}-misc.patch
115 Patch2: %{name}-extra.patch
116 Patch5: %{name}-misc-localized.patch
117 Patch6: %{name}-cs-bash.patch
118 Patch10: %{name}-extra-files.patch
119 URL: https://www.kernel.org/doc/man-pages/
120 BuildRequires: autoconf >= 2.61
121 BuildRequires: automake
123 BuildRequires: rpmbuild(macros) >= 1.566
124 BuildRequires: sed >= 4.0
125 BuildRequires: tar >= 1:1.22
127 BuildRequires: zh-autoconvert
130 BuildRequires: zlib-devel
131 Obsoletes: man-pages-cs
132 Obsoletes: man-pages-de
133 Obsoletes: man-pages-es
134 Obsoletes: man-pages-fi
135 Obsoletes: man-pages-fr
136 Obsoletes: man-pages-hu
137 Obsoletes: man-pages-it
138 Obsoletes: man-pages-ja
139 Obsoletes: man-pages-ko
140 Obsoletes: man-pages-nl
141 Obsoletes: man-pages-pl
142 Obsoletes: man-pages-pt
143 Obsoletes: man-pages-pt_BR
144 Obsoletes: man-pages-ru
145 Obsoletes: man-pages-ru-asp
146 Obsoletes: man-pages-uk
147 Obsoletes: man-pages-zh
148 Obsoletes: manpages-hu
149 Conflicts: attr-devel < 2.2.0-2
150 Conflicts: kbd < 1.12-9
151 Conflicts: keyutils < 1.5.10
152 Conflicts: libcap < 1:1.10-5
153 Conflicts: lirc < 0.9.3a-2
155 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
158 # languages of packaged man pages
159 # note: pt_BR is omitted here, these manuals are packaged as pt
160 %define man_langs cs da de es fi fr hu id it ja ko nl pl pt ru tr uk zh_CN zh_TW
163 A large collection of man pages covering programming APIs, file
164 formats, protocols, etc.
166 - section 1: user commands (intro only)
167 - section 2: system calls
168 - section 3: libc calls (intro only)
169 - section 4: devices (e.g., hd, sd)
170 - section 5: file formats and protocols (e.g., wtmp, /etc/passwd, nfs)
171 - section 6: games (intro only)
172 - section 7: conventions, macro packages, etc. (e.g., nroff, ascii)
173 - section 8: system administration (intro only)
175 %description -l de.UTF-8
176 Eine große Sammlung von man-Seiten über Programmier-APIs,
177 Dateiformate, Protokolle, usw..
179 - section 1: Benutzerbefehle (nur intro)
180 - section 2: Systemaufrufe
181 - section 3: libc-Aufrufe (nur intro)
182 - section 4: Geräte (z.B. hd, sd)
183 - section 5: Dateiformate und Protokolle (z.B. wtmp, /etc/passwd, nfs)
184 - section 6: Spiele (nur intro)
185 - section 7: Konventionen, Makro-Pakete, usw. (z.B. nroff, ascii)
186 - section 8: Systemverwaltung (nur intro)
188 %description -l es.UTF-8
189 Una larga colección de páginas de manuales cubriendo programación
190 APIs, formatos de archivos, protocolos, etc.
192 - seción 1: comandos de usuario (solamente introducción)
193 - seción 2: llamadas de sistema
194 - seción 3: llamadas libc (solamente introducción)
195 - seción 4: dispositivos (ej.: hd, sd)
196 - seción 5: formatos de archivos y protocolos (ej: wtmp, /etc/passwd,
198 - seción 6: juegos (solamente introducción)
199 - seción 7: convenciones, paquetes de macros, etc. (ej: nroff, ascii)
200 - seción 8: administración de sistema (solamente introducción)
202 %description -l fi.UTF-8
203 Kokoelma man-sivujen käännöksiä suomenkielelle. Sivuja on mukana
204 yhteensä 211 kpl ja ne on paketoitu 14.11.1999 mennessä valmiina
205 olleista sivuista. Sivut ovat osista 1 (komennot) ja 2 (pelit).
207 %description -l fr.UTF-8
208 Une large collection de pages de manuel du Project de Documentation
209 Linux (LDP), traduites en Français. Les pages de manuel sont
210 organisées en differentes sections :
212 - section 1: Commandes utilisateur (intro seulement)
213 - section 2: Appels système
214 - section 3: Appels de la Libc (intro seulement)
215 - section 4: Périphériques (par ex. hd, sd)
216 - section 5: Formats de fichiers et de protocoles (par ex. wtmp,
218 - section 6: Jeux (intro seulement)
219 - section 7: Conventions, macro packages, etc. (par ex. nroff, ascii)
220 - section 8: Administration système (intro seulement)
222 %description -l it.UTF-8
223 Traduzioni italiane delle pagine di manuale per Linux: questo
224 pacchetto include non solo quelle dell'LDP, ma anche traduzioni di
225 altre pagine di uso comune. ATTENZIONE: alcune pagine sono obsolete!
227 %description -l pl.UTF-8
228 Pakiet ten zawiera dużą kolekcję podręczników ekranowych (man pages),
229 opisujących format plików, protokoły itp.
231 - sekcja 1: polecenia użytkowników (tylko wstęp)
232 - sekcja 2: wywołania systemowe
233 - sekcja 3: wywołania bibliotek (tylko wstęp)
234 - sekcja 4: urządzenia (np., hd, sd)
235 - sekcja 5: format plików i protokoły (np., wtmp, /etc/passwd, nfs)
236 - sekcja 6: gry (tylko wstęp)
237 - sekcja 7: konwencje, makro-pakiety, itp. (np., nroff, ascii)
238 - sekcja 8: administracja systemu (tylko wstęp)
240 %description -l pt.UTF-8
241 Uma larga coleção de páginas de manuais cobrindo programação APIs,
242 formatos de arquivos, protocolos, etc.
244 - seção 1: comandos de usuário (somente introdução)
245 - seção 2: chamadas de sistema
246 - seção 3: chamadas libc (somente introdução)
247 - seção 4: dispositivos (ex.: hd, sd)
248 - seção 5: formatos de arquivos e protocolos (ex: wtmp, /etc/passwd,
250 - seção 6: jogos (somente introdução)
251 - seção 7: convenções, pacotes de macros, etc. (ex: nroff, ascii)
252 - seção 8: administração de sistema (somente introdução)
254 %description -l pt_BR.UTF-8
255 Uma larga coleção de páginas de manuais cobrindo programação APIs,
256 formatos de arquivos, protocolos, etc.
258 - seção 1: comandos de usuário (somente introdução)
259 - seção 2: chamadas de sistema
260 - seção 3: chamadas libc (somente introdução)
261 - seção 4: dispositivos (ex.: hd, sd)
262 - seção 5: formatos de arquivos e protocolos (ex: wtmp, /etc/passwd,
264 - seção 6: jogos (somente introdução)
265 - seção 7: convenções, pacotes de macros, etc. (ex: nroff, ascii)
266 - seção 8: administração de sistema (somente introdução)
268 %description -l ru.UTF-8
269 Небольшая коллекция страниц руководства из Проекта Документации на
270 Линукс. Страницы руководства организованы следующим образом:
272 - секция 1: команд пользователя (только введение)
273 - секция 2: системные вызовы
274 - секция 3: функции библиотеки языка C (только введение)
275 - секция 4: устройства (например, hd, sd)
276 - секция 5: форматы файлов и протоколы (например, wtmp, /etc/passwd,
278 - секция 6: игры (только введение)
279 - секция 7: соглашения, макро-пакеты, и т. п. (например, nroff, ascii)
280 - секция 8: утилиты администратора (только введение)
282 %description -l tr.UTF-8
283 Programlama arayüzlerini, dosya formatlarını, protokolleri vs.
284 kapsayan, geniş bir kılavuz sayfaları derlemesi.
286 %description -l uk.UTF-8
287 Великий набір сторінок мануалу (документації) з Linux Documentation
288 Project (LDP). Сторінки організовані у такі секції: Секція 1, команди
289 користувача (тільки вступ); Секція 2, системні виклики; Секція 3,
290 виклики libc; Секція 4, пристрої (наприклад, hd, sd); Секція 5,
291 формати файлів та протоколи (наприклад, wtmp, /etc/passwd, nfs);
292 Секція 6, ігри (тільки вступ); Секція 7, угоди, макропакети і т.і.
293 (наприклад, nroff, ascii); Секція 8, системне адміністрування (тільки
297 Summary: POSIX manual pages from the Linux Documentation Project
298 Summary(de.UTF-8): POSIX-man-Seiten vom Linux Documentation Project
299 Summary(pl.UTF-8): Podręczniki systemowe z Linux Documentation Project dotyczące POSIX
303 Part of POSIX 1-2017 in man pages format.
305 %description posix -l pl.UTF-8
306 Fragmenty POSIX 1-2017 w postaci stron podręcznika systemowego.
309 %setup -q -c -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -a30
310 %patch0 -p1 -d manpages-zh-%{zh_version}
311 %patch6 -p1 -d man-pages-cs-%{cs_version}
314 %patch2 -p0 -d man-pages-extra
315 install -d man-pages-extra/C
316 %{__mv} man-pages-extra/man* man-pages-extra/C
318 # prepare somehow unified source trees
320 %{__mv} man-pages-%{version} src/C
321 %{__mv} man-pages-posix-%(echo %{posix_version} | sed -e s/-a//)/man*p src/C
322 %{__mv} man-pages-cs-%{cs_version} src/cs
323 %{__mv} manpages-da-%{da_version} src/da
324 %{__mv} manpages-de-%{de_version} src/de
325 %{__mv} man-pages-es-%{es_version} src/es
326 %{__mv} manpages-fi src/fi
328 %{__mv} manpages-hu-%{hu_version}.orig/usr/share/man/hu src/hu
329 install -d src/id/man{1,8}
330 %{__mv} man-pages-it-%{it_version} src/it
331 %{__mv} man-pages-ja-%{ja_version} src/ja
333 tar xzf %{SOURCE12} -C src/ko
334 %{__mv} manpages-nl-%{nl_version} src/nl
336 %{__mv} man-pages-%{pt_version}-pt_BR src/pt_BR
337 %{__mv} man-ro src/ro
338 %{__mv} manpages-ru-asp-%{ru_asp_version} src/ru
339 %{__mv} manpages-tr-%{tr_version}/source src/tr
340 %{__mv} man-pages-uk_UA.alfa src/uk
341 %{__mv} manpages-zh-%{zh_version} src/zh
343 # extra so links (via man-pages-extra)
345 if echo "$LINE" | grep -q '^#' ; then
349 install -d man-pages-extra/${1}/$(dirname $2)
350 if [ -f man-pages-extra/${1}/${2} ]; then
351 echo "man-pages-extra/${1}/${2} already exists!"
354 echo ".so $3" >>man-pages-extra/${1}/${2}
355 # special case for zh
356 if [ "$1" = "zh_CN" ]; then
357 zhmandir="src/zh/src/$(dirname "$2")"
358 makefile="$zhmandir/manpages"
359 if [ ! -f "$zhmandir/.init.mark" ]; then
360 # allow continuation in next line
361 %{__sed} -i -e 's/\(\.[1-8]\)$/\1 \\/' "$makefile"
362 touch "$zhmandir/.init.mark"
364 printf " %s" "$(basename "$2")" >> "$makefile"
368 # unify trees for easier processing (where possible)
370 # C: get rid of man2 and man3 subdirs
371 %{__sed} -i -e 's,man3head/,man3/,' src/C/man3/register_printf_*.3
372 %{__sed} -i -e 's,man3head/,man3/,' src/C/man3const/PA_*.3const
373 %{__sed} -i -e 's,man3head/,man3/,' src/C/man3type/printf_*.3type
374 %{__sed} -i -e 's,man3head/,man3/,' src/C/man3type/loff_t.3type
375 %{__sed} -i -e 's,man3head/,man3/,' src/C/man3type/sockaddr_storage.3type
376 %{__sed} -i -e 's,man3head/,man3/,' src/C/man3type/sockaddr_un.3type
377 %{__mv} -i src/C/man2type/*.2type src/C/man2
378 %{__mv} -i src/C/man3const/*.3const src/C/man3
379 %{__mv} -i src/C/man3head/*.3head src/C/man3
380 %{__mv} -i src/C/man3type/*.3type src/C/man3
381 rmdir src/C/man2type src/C/man3{const,head,type}
383 # da: add man1 subdir
384 install -d src/da/man1
385 %{__mv} src/da/*.1 src/da/man1
387 # es: merge in "extra" pages
388 # skip pages already in main es
389 %{__rm} man-pages-es-extra-%{es_extra_version}/man3/dl*.3
390 %{__rm} man-pages-es-extra-%{es_extra_version}/man5/{acct,host.conf,resolv.conf,resolver}.5
391 %{__rm} man-pages-es-extra-%{es_extra_version}/man8/ld.so.8
392 for f in 1 2 4 5 6 7 8 ; do
393 mv -i man-pages-es-extra-%{es_extra_version}/man${f}/* src/es/man${f}
396 # it: merge per-package trees
397 %{__mv} src/it/man-pages/man? src/it
398 for f in 1 4 5 8 9 ; do
399 mv -i src/it/*/man${f}/* src/it/man${f}
402 # ja: merge per-package trees
403 %{__mv} src/ja/manual/LDP_man-pages/man* src/ja
404 # duplicates of LDP man pages
405 %{__rm} -r src/ja/manual/{gnumaniak,ld.so,modutils/man2,glibc-linuxthreads/man3}
406 %{__rm} src/ja/manual/bind/{man5/resolver.5,man7/{hostname,mailaddr}.7}
407 %{__rm} src/ja/manual/netkit/{man3/{daemon,err,login}.3,man5/ftpusers.5}
408 # shadow manuals already in shadow package
409 %{__rm} -r src/ja/manual/shadow
411 # coreutils not {file,sh-,text}utils
412 %{__rm} -r src/ja/manual/GNU_{fileutils,sh-utils,textutils}
414 %{__rm} -r src/ja/manual/dhcp2
415 # kmod not modutils or module-init-tools
416 %{__rm} -r src/ja/manual/module-init-tools
417 %{__rm} -r src/ja/manual/modutils
418 # nfs-utils not nfs-server
419 %{__rm} -r src/ja/manual/nfs-server
420 # ypbind-mt not ypbind
421 %{__rm} -r src/ja/manual/ypbind
423 %{__rm} src/ja/manual/GNU_bison/man1/yacc.1
424 # hostname(1) from hostname (ex-net-tools)
425 %{__rm} src/ja/manual/GNU_coreutils/man1/hostname.1
426 # kill(1) from util-linux
427 %{__rm} src/ja/manual/GNU_coreutils/man1/kill.1
428 # uptime(1) from procps
429 %{__rm} src/ja/manual/GNU_coreutils/man1/uptime.1
430 # last(1),lastb(1),mesg(1) from util-linux
431 %{__rm} src/ja/manual/SysVinit/man1/{last,lastb,mesg}.1
432 # blkid(8) from util-linux
433 %{__rm} src/ja/manual/e2fsprogs/man8/blkid.8
434 # lpq(1),lpr(1),lprm(1),lpc(8) from cups (or LPRng)
435 %{__rm} src/ja/manual/lpr-linux/{man1/{lpq,lpr,lprm}.1,man8/lpc.8}
436 # from man-db not man
437 %{__rm} src/ja/manual/man/man1/{apropos,man,whatis}.1
438 # timeout(1) from coreutils
439 %{__rm} src/ja/manual/netatalk/man1/timeout.1
440 # write(1) from util-linux
441 %{__rm} src/ja/manual/netkit/man1/write.1
442 # rquotad(8) from quota
443 %{__rm} src/ja/manual/nfs-utils/man8/rquotad.8
444 # kill(1) from util-linux
445 %{__rm} src/ja/manual/procps/man1/kill.1
446 # wall(1) from SysVinit
447 %{__rm} src/ja/manual/util-linux/man1/wall.1
448 # resolve conflicts of alternatives
449 %{__mv} src/ja/manual/netkit/man8/ftpd.8{,netkit}
451 for f in 1 3 4 5 6 7 8 ; do
452 mv -i src/ja/manual/*/man${f}/* src/ja/man${f}
455 # zh_CN: cleanup must be done after build (in build stage)
457 # individual man pages fixes
460 %{__mv} src/de/man7/{iso_8859_1,iso_8859-1}.7
461 %{__mv} src/es/man4/magic.4 src/es/man5/magic.5
462 %{__mv} src/es/man8/sync.8 src/es/man1/sync.1
463 %{__mv} src/hu/man1/gpm.1 src/hu/man8/gpm.8
464 # man1/sync.1 already exists
465 %{__rm} src/hu/man8/sync.8
466 %undos src/it/man7/{iso-8859-2,iso_8859_2}.7
467 %{__mv} src/ja/man4/magic.4 src/ja/man5/magic.5
468 %{__mv} src/ja/man8/nslookup.8 src/ja/man1/nslookup.1
469 %{__mv} src/ko/man8/sync.8 src/ko/man1/sync.1
471 %{__mv} src/pl/man5/{at_acces,at_access}.5
472 # man1/sync.1 already exists
473 %{__rm} src/pl/man8/sync.8
474 %{__mv} src/pt_BR/man8/sync.8 src/pt_BR/man1/sync.1
475 %{__mv} src/ru/man8/sync.8 src/ru/man1/sync.1
476 # zh: handler later (after build)
481 # patching creates backups
482 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -rf
484 # merge our "extra" tarball
486 # apply man-pages-extra, preventing overwriting of already existing man pages
487 for d in man-pages-extra/C/man* ; do
488 mv -i $d/*.* src/C/${d#man-pages-extra/C/}
490 # note: cs and zh_CN are omitted here and processed in separate special pass
491 for d in man-pages-extra/{de,es,fi,fr,hu,id,it,ja,ko,nl,pl,pt_BR,ru}/man* ; do
492 mv -i $d/*.* src/${d#man-pages-extra/}
494 for d in man-pages-extra/zh_CN/man* ; do
495 mv -i $d/*.* src/zh/src/${d#man-pages-extra/zh_CN/}
500 # remove man pages existing in other packages
503 %{__rm} src/C/man1/time.1
505 %{__rm} src/C/man5/ftpusers.5
508 # some man-pages require build step
510 # cs: prepare man pages and apply extra
512 %{__make} -C src/cs latest
513 %{__mv} src/cs/latest/man* src/cs
515 for d in man-pages-extra/cs/man* ; do
516 mv -i $d/*.* src/${d#man-pages-extra/}
519 # tr: gunzip .so links
520 #find src/tr -name '*.gz' | xargs gzip -d
521 # ...but currently ".gz" is a lie, files are plain ascii
522 for f in src/tr/man?/*.?.gz ; do
523 %{__mv} "$f" "${f%.gz}"
525 %{__sed} -i -e 's/\.2\.gz$/.2/' src/tr/man2/{recvfrom,recvmsg,sendmsg,sendto}.2
526 %{__sed} -i -e 's/\.4\.gz$/.4/' src/tr/man4/zero.4
528 # zh: prepare zh_CN and zh_TW
536 for l in zh_CN zh_TW ; do
538 for d in man{1,2,3,4,5,6,7,8,n} ; do
539 ln -snf ../zh/src/${d}/${l} src/${l}/${d}
542 # zh_*: man1/sync.1 already exists
543 %{__rm} src/zh_CN/man8/sync.8
544 %{__rm} src/zh_TW/man8/sync.8
546 # per-package lists / tarballs production
549 if echo $line | grep -q '^\[.\+\]$' ; then
550 package=`echo $line | sed -e 's/^\[//;s/\]$//;'`
551 elif ! echo $line | grep -q '^#' ; then
552 if [ -f "src/C/$line" ]; then
553 echo "$line" >> ${package}-man.list
555 for l in %{man_langs} ; do
556 if [ -f "src/$l/$line" ]; then
557 echo "$l/$line" >> ${package}-man.list
564 install -d tarsrc tar
566 ln -snf ../src/[!C]* ../src/C/man* ../man-pages-extra/README.*-pages .
568 for l in *-man.list ; do
569 t=`basename $l .list`
570 if [ -f tarsrc/README.${t}-pages ]; then
571 echo "README.${t}-pages" >> "$l"
573 tar chJf tar/${t}-pages.tar.xz -C tarsrc --files-from "$l"
578 rm -rf $RPM_BUILD_ROOT
579 install -d $RPM_BUILD_ROOT%{_mandir}/man{1,2,3,4,5,6,7,8,0p,1p,3p}
581 # install C man pages
582 for n in src/C/man{1,2,3,4,5,6,7,8,0p,1p,3p}/*; do
584 install -m644 $n $RPM_BUILD_ROOT%{_mandir}/$bn
586 # drop man pages packaged separately
587 grep '^man' glibc-man.list | sed -e "s,^,$RPM_BUILD_ROOT%{_mandir}/," | xargs -r %{__rm}
588 # rpcbind, formerly glibc
589 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/rpcinfo.8
591 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{gawk,igawk}.1
593 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/{aio_init,lio_listio}.3
594 # shadow (but not pwdutils!); shadow(5) is missing in pwdutils too
595 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man5/passwd.5
597 # install localized man pages, only for installed C man pages
598 for l in %{man_langs} ; do
599 install -d $RPM_BUILD_ROOT%{_mandir}/$l/man{1,2,3,4,5,6,7,8}
600 for n in $RPM_BUILD_ROOT%{_mandir}/man{1,2,3,4,5,6,7,8}/*; do
601 bn=$(basename $(dirname $n))/$(basename $n)
602 if [ -f src/$l/$bn ]; then
603 install -m644 src/$l/$bn $RPM_BUILD_ROOT%{_mandir}/$l/$bn
608 # files with just .so links pointing to non-existing man pages
610 %{__rm} $RPM_BUILD_ROOT%{_mandir}/de/man2/{create_module,delete_module,get_kernel_syms,init_module}.2
612 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,ko,nl,pl,pt,ru}/man2/{oldfstat,oldlstat,oldolduname,oldstat,olduname}.2
613 # undocumented.7 (exists in es, but not installed because it's not in C manuals)
614 %{__rm} $RPM_BUILD_ROOT%{_mandir}/es/man5/networks.5
615 # clock_getres.3 (packaged in glibc, but these links exist only in fr manuals, not C)
616 %{__rm} $RPM_BUILD_ROOT%{_mandir}/fr/man2/{clock_getres,clock_gettime,clock_settime}.2
618 %{__rm} $RPM_BUILD_ROOT%{_mandir}/ru/man5/networks.5
620 %{__rm} $RPM_BUILD_ROOT%{_mandir}/pl/man2/fstatfs.2
623 rm -rf $RPM_BUILD_ROOT
626 %defattr(644,root,root,755)
635 %lang(cs) %{_mandir}/cs/man*/*
636 %lang(de) %{_mandir}/de/man*/*
637 %lang(es) %{_mandir}/es/man*/*
638 %lang(fi) %{_mandir}/fi/man*/*
639 %lang(fr) %{_mandir}/fr/man*/*
640 %lang(hu) %{_mandir}/hu/man*/*
641 %lang(it) %{_mandir}/it/man*/*
642 %lang(ja) %{_mandir}/ja/man*/*
643 %lang(ko) %{_mandir}/ko/man*/*
644 %lang(nl) %{_mandir}/nl/man*/*
645 %lang(pl) %{_mandir}/pl/man*/*
646 %lang(pt) %{_mandir}/pt/man*/*
647 # packaged as plain pt for now
648 #%lang(pt_BR) %{_mandir}/pt_BR/man*/*
649 %lang(ru) %{_mandir}/ru/man*/*
650 %lang(tr) %{_mandir}/tr/man*/*
651 %lang(uk) %{_mandir}/uk/man*/*
652 %lang(zh_CN) %{_mandir}/zh_CN/man*/*
653 %lang(zh_TW) %{_mandir}/zh_TW/man*/*
656 %defattr(644,root,root,755)
657 %dir %{_mandir}/man0p
658 %{_mandir}/man0p/*.0p*
659 %dir %{_mandir}/man1p
660 %{_mandir}/man1p/*.1p*
661 %dir %{_mandir}/man3p
662 %{_mandir}/man3p/*.3p*