]> git.pld-linux.org Git - packages/man-pages.git/blob - man-pages.spec
cc24f7d8bc6b2b5d64df7c6375eb00a5cdc10afd
[packages/man-pages.git] / man-pages.spec
1 #
2 # Conditional build:
3 %bcond_with     tars    # generate man-pages tars for other packages [not done yet]
4 #
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
17 Name:           man-pages
18 Version:        4.16
19 Release:        1
20 License:        distributable
21 Group:          Documentation
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
29 %define         hu_version              20010119
30 %define         id_version              20011116
31 %define         it_version              4.08
32 %define         ja_version              20180815
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              1.0.5
41 %define         zh_version              1.5.2
42 %define         posix_version           2013-a
43 Source0:        https://www.kernel.org/pub/linux/docs/man-pages/%{name}-%{version}.tar.xz
44 # Source0-md5:  ad9f1ff81276fe8d90d077484d6d4b5e
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.alioth.debian.org/downloads/, current version is 2.3
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://alioth.debian.org/frs/?group_id=100455
63 Source7:        https://alioth.debian.org/frs/download.php/file/4119/man-pages-fr-%{fr_version}-1.tar.xz
64 # Source7-md5:  66a6033fb2ed3641c35b1d53c0fe5deb
65 # there is also: http://manpagesfr.free.fr/download/man-pages-extras-fr-0.8.1.tar.bz2
66 # and: http://manpagesfr.free.fr/download/man-pages-sup-fr-20080606.tar.bz2
67 #Source8:       http://download.uhulinux.hu/sources/man-pages-hu/man_hu_%{hu_version}.tar.gz (older)
68 Source8:        http://ftp.debian.org/debian/pool/main/m/manpages-hu/manpages-hu_%{hu_version}.orig.tar.gz
69 # Source8-md5:  742b682c5237a1e370b28f363826b2d5
70 # there is no LDP man page here, yet, but included for completeness
71 # based on http://nakula.rvs.uni-bielefeld.de/made/my_project/ManPage/ (dead now)
72 Source9:        http://www.mif.pg.gda.pl/homepages/ankry/man-pages/%{name}-from-www-id-%{id_version}.tar.gz
73 # Source9-md5:  34a69de42ec4ae8180b947f8777a3e7a
74 # available also as http://
75 Source10:       ftp://ftp.pluto.linux.it/pub/pluto/ildp/man/%{name}-it-%{it_version}.tar.xz
76 # Source10-md5: 869cf8ff2aa5c11b8d15d1ba7a47f4fa
77 # note: man-pages-it-extra-0.5.0.tar.gz is also covered by the above version
78 #Source11Download: http://linuxjm.osdn.jp/download.html
79 Source11:       http://linuxjm.osdn.jp/%{name}-ja-%{ja_version}.tar.gz
80 # Source11-md5: fd5111c6ea1054252660d4e96eddeefc
81 Source12:       http://download.kldp.net/man/man-pages-ko/%{ko_version}/%{name}-ko-%{ko_version}.tar.gz
82 # Source12-md5: e31dc6a51c02436371373dedaeeeacab
83 # TODO: check 20051127 in Debian/Ubuntu?
84 Source13:       ftp://ftp.nl.linux.org/pub/DOC-NL/manpages-nl/manpages-nl-%{nl_version}.tar.gz
85 # Source13-md5: b37b0216a87db7583e88ba87031a0b4a
86 # TODO: PTM has been overtaken by new project at http://manpages-pl.sourceforge.net/
87 # http://downloads.sourceforge.net/manpages-pl/manpages-pl-%{pl_version}.tar.bz2 with pl_version=0.6
88 Source14:       %{name}-pl-PTM-snapshot.%{pl_version}.tar.bz2
89 # Source14-md5: b9b5751fcde4c36022850d0e5a4757d3
90 Source15:       http://www.win.tue.nl/~aeb/ftpdocs/linux-local/manpages/tr/%{name}-pt_BR-%{pt_version}.tgz
91 # Source15-md5: 3f8db6dd6a7884b595e70f624ac93735
92 # no LDP man pages yet
93 Source16:       http://www.rolix.org/man/arhiva/man-pages-ro-%{ro_version}.tar.gz
94 # Source16-md5: ac5b2c970a31cb721e068ff80e5bd466
95 # TODO: new project at: https://sourceforge.net/projects/man-pages-ru/files/
96 #Source17:      http://linuxshare.ru/projects/trans/manpages-ru-%{ru_version}.tar.bz2
97 # ASP-linux have more up-to-date manpages (but 0.98 contains some updated pages)
98 Source17:       http://www.mif.pg.gda.pl/homepages/ankry/man-pages/manpages-ru-asp-%{ru_asp_version}.tar.bz2
99 # Source17-md5: fffb27648417c8dd551e2a4403eefc64
100 Source18:       http://downloads.sourceforge.net/belgeler/man-pages-tr-%{tr_version}.tar.gz
101 # Source18-md5: 8f322a60c80e31c34ef8979edaf68aae
102 Source19:       http://www.linux.org.ua/twiki/pub/Projects/ManUk/man-pages-uk_UA.alfa.tar.gz
103 # Source19-md5: 89576c5b51bb83c8bfa8bda794b96e21
104 #Source20Download: https://github.com/lidaobing/manpages-zh/releases
105 # also newer git snapshot available at http://www.win.tue.nl/~aeb/ftpdocs/linux-local/manpages/tr/man-pages-zh-20141004.zip
106 Source20:       https://github.com/lidaobing/manpages-zh/archive/v%{zh_version}/manpages-zh-%{zh_version}.tar.gz
107 # Source20-md5: 1bbdc4f32272df0b95146518b27bf4be
108 Source30:       https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/man-pages-posix-%{posix_version}.tar.xz
109 # Source30-md5: 825fde78e6fddd02426ecdd50e2cbe0d
110 Source50:       %{name}-links.list
111 Source100:      %{name}-tars.list
112 Patch0:         %{name}-zh_fixes.patch
113 Patch1:         %{name}-misc.patch
114 Patch2:         %{name}-extra.patch
115 Patch3:         %{name}-tr-bash.patch
116 Patch4:         %{name}-misc-localized.patch
117 Patch5:         %{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
122 BuildRequires:  rpmbuild(macros) >= 1.566
123 BuildRequires:  sed >= 4.0
124 BuildRequires:  tar >= 1:1.22
125 # for man-pages-zh
126 BuildRequires:  zh-autoconvert
127 BuildRequires:  xz
128 # for man-pages-tr
129 BuildRequires:  zlib-devel
130 Obsoletes:      man-pages-cs
131 Obsoletes:      man-pages-de
132 Obsoletes:      man-pages-es
133 Obsoletes:      man-pages-fi
134 Obsoletes:      man-pages-fr
135 Obsoletes:      man-pages-hu
136 Obsoletes:      man-pages-it
137 Obsoletes:      man-pages-ja
138 Obsoletes:      man-pages-ko
139 Obsoletes:      man-pages-nl
140 Obsoletes:      man-pages-pl
141 Obsoletes:      man-pages-pt
142 Obsoletes:      man-pages-pt_BR
143 Obsoletes:      man-pages-ru
144 Obsoletes:      man-pages-ru-asp
145 Obsoletes:      man-pages-uk
146 Obsoletes:      man-pages-zh
147 Obsoletes:      manpages-hu
148 Conflicts:      attr-devel < 2.2.0-2
149 Conflicts:      kbd < 1.12-9
150 Conflicts:      keyutils < 1.5.10
151 Conflicts:      libcap < 1:1.10-5
152 Conflicts:      lirc < 0.9.3a-2
153 BuildArch:      noarch
154 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
155 AutoReqProv:    no
156
157 # languages of packaged man pages
158 # note: pt_BR is omitted here, these manuals are packaged as pt
159 %define man_langs       cs da de es fi fr hu id it ja ko nl pl pt ru tr uk zh_CN zh_TW
160
161 %description
162 A large collection of man pages covering programming APIs, file
163 formats, protocols, etc.
164
165 - section 1: user commands (intro only)
166 - section 2: system calls
167 - section 3: libc calls (intro only)
168 - section 4: devices (e.g., hd, sd)
169 - section 5: file formats and protocols (e.g., wtmp, /etc/passwd, nfs)
170 - section 6: games (intro only)
171 - section 7: conventions, macro packages, etc. (e.g., nroff, ascii)
172 - section 8: system administration (intro only)
173
174 %description -l de.UTF-8
175 Eine große Sammlung von man-Seiten über Programmier-APIs,
176 Dateiformate, Protokolle, usw..
177
178 - section 1: Benutzerbefehle (nur intro)
179 - section 2: Systemaufrufe
180 - section 3: libc-Aufrufe (nur intro)
181 - section 4: Geräte (z.B. hd, sd)
182 - section 5: Dateiformate und Protokolle (z.B. wtmp, /etc/passwd, nfs)
183 - section 6: Spiele (nur intro)
184 - section 7: Konventionen, Makro-Pakete, usw. (z.B. nroff, ascii)
185 - section 8: Systemverwaltung (nur intro)
186
187 %description -l es.UTF-8
188 Una larga colección de páginas de manuales cubriendo programación
189 APIs, formatos de archivos, protocolos, etc.
190
191 - seción 1: comandos de usuario (solamente introducción)
192 - seción 2: llamadas de sistema
193 - seción 3: llamadas libc (solamente introducción)
194 - seción 4: dispositivos (ej.: hd, sd)
195 - seción 5: formatos de archivos y protocolos (ej: wtmp, /etc/passwd,
196   nfs)
197 - seción 6: juegos (solamente introducción)
198 - seción 7: convenciones, paquetes de macros, etc. (ej: nroff, ascii)
199 - seción 8: administración de sistema (solamente introducción)
200
201 %description -l fi.UTF-8
202 Kokoelma man-sivujen käännöksiä suomenkielelle. Sivuja on mukana
203 yhteensä 211 kpl ja ne on paketoitu 14.11.1999 mennessä valmiina
204 olleista sivuista. Sivut ovat osista 1 (komennot) ja 2 (pelit).
205
206 %description -l fr.UTF-8
207 Une large collection de pages de manuel du Project de Documentation
208 Linux (LDP), traduites en Français. Les pages de manuel sont
209 organisées en differentes sections :
210
211 - section 1: Commandes utilisateur (intro seulement)
212 - section 2: Appels système
213 - section 3: Appels de la Libc (intro seulement)
214 - section 4: Périphériques (par ex. hd, sd)
215 - section 5: Formats de fichiers et de protocoles (par ex. wtmp,
216   /etc/passwd, nfs)
217 - section 6: Jeux (intro seulement)
218 - section 7: Conventions, macro packages, etc. (par ex. nroff, ascii)
219 - section 8: Administration système (intro seulement)
220
221 %description -l it.UTF-8
222 Traduzioni italiane delle pagine di manuale per Linux: questo
223 pacchetto include non solo quelle dell'LDP, ma anche traduzioni di
224 altre pagine di uso comune. ATTENZIONE: alcune pagine sono obsolete!
225
226 %description -l pl.UTF-8
227 Pakiet ten zawiera dużą kolekcję podręczników ekranowych (man pages),
228 opisujących format plików, protokoły itp.
229
230 - sekcja 1: polecenia użytkowników (tylko wstęp)
231 - sekcja 2: wywołania systemowe
232 - sekcja 3: wywołania bibliotek (tylko wstęp)
233 - sekcja 4: urządzenia (np., hd, sd)
234 - sekcja 5: format plików i protokoły (np., wtmp, /etc/passwd, nfs)
235 - sekcja 6: gry (tylko wstęp)
236 - sekcja 7: konwencje, makro-pakiety, itp. (np., nroff, ascii)
237 - sekcja 8: administracja systemu (tylko wstęp)
238
239 %description -l pt.UTF-8
240 Uma larga coleção de páginas de manuais cobrindo programação APIs,
241 formatos de arquivos, protocolos, etc.
242
243 - seção 1: comandos de usuário (somente introdução)
244 - seção 2: chamadas de sistema
245 - seção 3: chamadas libc (somente introdução)
246 - seção 4: dispositivos (ex.: hd, sd)
247 - seção 5: formatos de arquivos e protocolos (ex: wtmp, /etc/passwd,
248   nfs)
249 - seção 6: jogos (somente introdução)
250 - seção 7: convenções, pacotes de macros, etc. (ex: nroff, ascii)
251 - seção 8: administração de sistema (somente introdução)
252
253 %description -l pt_BR.UTF-8
254 Uma larga coleção de páginas de manuais cobrindo programação APIs,
255 formatos de arquivos, protocolos, etc.
256
257 - seção 1: comandos de usuário (somente introdução)
258 - seção 2: chamadas de sistema
259 - seção 3: chamadas libc (somente introdução)
260 - seção 4: dispositivos (ex.: hd, sd)
261 - seção 5: formatos de arquivos e protocolos (ex: wtmp, /etc/passwd,
262   nfs)
263 - seção 6: jogos (somente introdução)
264 - seção 7: convenções, pacotes de macros, etc. (ex: nroff, ascii)
265 - seção 8: administração de sistema (somente introdução)
266
267 %description -l ru.UTF-8
268 Небольшая коллекция страниц руководства из Проекта Документации на
269 Линукс. Страницы руководства организованы следующим образом:
270
271 - секция 1: команд пользователя (только введение)
272 - секция 2: системные вызовы
273 - секция 3: функции библиотеки языка C (только введение)
274 - секция 4: устройства (например, hd, sd)
275 - секция 5: форматы файлов и протоколы (например, wtmp, /etc/passwd,
276   nfs)
277 - секция 6: игры (только введение)
278 - секция 7: соглашения, макро-пакеты, и т. п. (например, nroff, ascii)
279 - секция 8: утилиты администратора (только введение)
280
281 %description -l tr.UTF-8
282 Programlama arayüzlerini, dosya formatlarını, protokolleri vs.
283 kapsayan, geniş bir kılavuz sayfaları derlemesi.
284
285 %description -l uk.UTF-8
286 Великий набір сторінок мануалу (документації) з Linux Documentation
287 Project (LDP). Сторінки організовані у такі секції: Секція 1, команди
288 користувача (тільки вступ); Секція 2, системні виклики; Секція 3,
289 виклики libc; Секція 4, пристрої (наприклад, hd, sd); Секція 5,
290 формати файлів та протоколи (наприклад, wtmp, /etc/passwd, nfs);
291 Секція 6, ігри (тільки вступ); Секція 7, угоди, макропакети і т.і.
292 (наприклад, nroff, ascii); Секція 8, системне адміністрування (тільки
293 вступ).
294
295 %package posix
296 Summary:        POSIX manual pages from the Linux Documentation Project
297 Summary(de.UTF-8):      POSIX-man-Seiten vom Linux Documentation Project
298 Summary(pl.UTF-8):      Podręczniki systemowe z Linux Documentation Project dotyczące POSIX
299 Group:          Documentation
300
301 %description posix
302 Part of POSIX 1003.1-2003 in man pages format.
303
304 %description posix -l pl.UTF-8
305 Fragmenty POSIX 1003.1-2003 w postaci stron podręcznika systemowego.
306
307 %prep
308 %setup -q -c -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -a30
309 %patch0 -p1 -d manpages-zh-%{zh_version}
310 %patch3 -p1 -d man-pages-tr-%{tr_version}
311 %patch5 -p1 -d man-pages-cs-%{cs_version}
312 # man-pages-extra
313 %patch10 -p0
314 %patch2 -p0 -d man-pages-extra
315 install -d man-pages-extra/C
316 %{__mv} man-pages-extra/man* man-pages-extra/C
317 # extra so links (via man-pages-extra)
318 while read LINE ; do
319         if echo "$LINE" | grep -q '^#' ; then
320                 continue
321         fi
322         set -- $LINE
323         install -d man-pages-extra/${1}/$(dirname $2)
324         if [ -f man-pages-extra/${1}/${2} ]; then
325                 echo "man-pages-extra/${1}/${2} already exists!"
326                 exit 1
327         fi
328         echo ".so $3" >>man-pages-extra/${1}/${2}
329 done < %{SOURCE50}
330
331 # prepare somehow unified source trees
332 install -d src
333 %{__mv} man-pages-%{version} src/C
334 %{__mv} man-pages-posix-%{posix_version}/man*p src/C
335 %{__mv} man-pages-cs-%{cs_version} src/cs
336 %{__mv} manpages-da-%{da_version} src/da
337 %{__mv} manpages-de-%{de_version} src/de
338 %{__mv} man-pages-es-%{es_version} src/es
339 %{__mv} manpages-fi src/fi
340 %{__mv} fr src/fr
341 %{__mv} manpages-hu-%{hu_version}.orig/usr/share/man/hu src/hu
342 install -d src/id/man{1,8}
343 %{__mv} man-pages-it-%{it_version} src/it
344 %{__mv} man-pages-ja-%{ja_version} src/ja
345 install -d src/ko
346 tar xzf %{SOURCE12} -C src/ko
347 %{__mv} manpages-nl-%{nl_version} src/nl
348 %{__mv} pl_PL src/pl
349 %{__mv} man-pages-%{pt_version}-pt_BR src/pt_BR
350 %{__mv} man-ro src/ro
351 %{__mv} manpages-ru-asp-%{ru_asp_version} src/ru
352 %{__mv} man-pages-tr-%{tr_version} src/tr
353 %{__mv} man-pages-uk_UA.alfa src/uk
354 %{__mv} manpages-zh-%{zh_version} src/zh
355
356 # unify trees for easier processing (where possible)
357
358 # da: add man1 subdir
359 install -d src/da/man1
360 %{__mv} src/da/*.1 src/da/man1
361
362 # es: merge in "extra" pages
363 # skip pages already in main es
364 %{__rm} man-pages-es-extra-%{es_extra_version}/man3/dl*.3
365 %{__rm} man-pages-es-extra-%{es_extra_version}/man5/{acct,host.conf,resolv.conf,resolver}.5
366 %{__rm} man-pages-es-extra-%{es_extra_version}/man8/ld.so.8
367 for f in 1 2 4 5 6 7 8 ; do
368         mv -i man-pages-es-extra-%{es_extra_version}/man${f}/* src/es/man${f}
369 done
370
371 # it: merge per-package trees
372 %{__mv} src/it/man-pages/man? src/it
373 for f in 1 4 5 8 9 ; do
374         mv -i src/it/*/man${f}/* src/it/man${f}
375 done
376
377 # ja: merge per-package trees
378 %{__mv} src/ja/manual/LDP_man-pages/man* src/ja
379 # duplicates of LDP man pages
380 %{__rm} -r src/ja/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}
381 # shadow manuals already in shadow package
382 %{__rm} -r src/ja/manual/shadow
383 # dhcp 3 not dhcp2
384 %{__rm} -r src/ja/manual/dhcp2
385 # nfs-utils not nfs-server
386 %{__rm} -r src/ja/manual/nfs-server
387 # ypbind-mt not ypbind
388 %{__rm} -r src/ja/manual/ypbind
389 # we use: net-tools/hostname, util-linux/{kill,write}, SysVinit/{last,mesg,wall,halt,reboot,shutdown}, textutils/od, quota/rquotad
390 %{__rm} src/ja/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}
391 # following modutils changes
392 for f in src/ja/manual/modutils/man8/{depmod,insmod,lsmod,modinfo,modprobe,rmmod} ; do
393         %{__mv} ${f}.8 ${f}.modutils.8
394 done
395 # avoid filename conflict
396 %{__mv} src/ja/manual/netkit/man8/ftpd.{8,8n}
397 # remove files existing in main man-pages tarball
398 # note: (should we keep those from main tarball or ja tarball?)
399 %{__rm} src/ja/manual/GNU_fileutils/man1/{chgrp,chmod,chown,cp,dd,df,du,install,ln,ls,mkdir,mkfifo,mknod,mv,rm,rmdir,touch}.1
400 %{__rm} src/ja/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
401 %{__rm} src/ja/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
402 %{__rm} src/ja/manual/lpr-linux/man1/{lpq,lpr,lprm}.1
403 %{__rm} src/ja/manual/net-tools/man1/hostname.1
404 %{__rm} src/ja/manual/netatalk/man1/timeout.1
405 %{__rm} src/ja/manual/procps/man1/uptime.1
406 %{__rm} src/ja/manual/util-linux/man1/{arch,kill}.1
407 %{__rm} src/ja/manual/util-linux/man8/sln.8
408 %{__rm} src/ja/manual/bind/man7/hostname.7
409 %{__rm} src/ja/manual/cups/man8/lpc.8
410 for f in 1 3 4 5 6 7 8 ; do
411         mv -i src/ja/manual/*/man${f}/* src/ja/man${f}
412 done
413
414 # zh_CN: cleanup must be done after build (in build stage)
415
416 # individual man pages fixes
417
418 # unify name
419 %{__mv} src/de/man7/{iso_8859_1,iso_8859-1}.7
420 %{__mv} src/es/man4/magic.4 src/es/man5/magic.5
421 %{__mv} src/es/man8/sync.8 src/es/man1/sync.1
422 %{__mv} src/hu/man1/gpm.1 src/hu/man8/gpm.8
423 # man1/sync.1 already exists
424 %{__rm} src/hu/man8/sync.8
425 %undos src/it/man7/{iso-8859-2,iso_8859_2}.7
426 %{__mv} src/ja/man4/magic.4 src/ja/man5/magic.5
427 %{__mv} src/ja/man8/nslookup.8 src/ja/man1/nslookup.1
428 %{__mv} src/ko/man8/sync.8 src/ko/man1/sync.1
429 # filename typo?
430 %{__mv} src/pl/man5/{at_acces,at_access}.5
431 # man1/sync.1 already exists
432 %{__rm} src/pl/man8/sync.8
433 %{__mv} src/pt_BR/man8/sync.8 src/pt_BR/man1/sync.1
434 %{__mv} src/ru/man8/sync.8 src/ru/man1/sync.1
435 # zh: handler later (after build)
436
437 %patch1 -p1 -d src/C
438 %patch4 -p1 -d src
439
440 # patching creates backups
441 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -rf
442
443 # merge our "extra" tarball
444
445 # apply man-pages-extra, preventing overwriting of already existing man pages
446 for d in man-pages-extra/C/man* ; do
447         mv -i $d/*.* src/C/${d#man-pages-extra/C/}
448 done
449 # note: cs and zh_CN are omitted here and processed later
450 for d in man-pages-extra/{de,es,fi,fr,hu,id,it,ja,ko,nl,pl,pt_BR,ru}/man* ; do
451         mv -i $d/*.* src/${d#man-pages-extra/}
452 done
453 for d in man-pages-extra/zh_CN/man* ; do
454         mv -i $d/*.* src/zh/src/${d#man-pages-extra/zh_CN/}
455 done
456
457 ln -sf pt_BR src/pt
458
459 # remove man pages existing in other packages
460
461 # time
462 %{__rm} src/C/man1/time.1
463 # ftp servers
464 %{__rm} src/C/man5/ftpusers.5
465
466 %build
467 # some man-pages require build step
468
469 # cs: prepare man pages and apply extra
470 LANG=en_GB.UTF-8 \
471 %{__make} -C src/cs latest
472 %{__mv} src/cs/latest/man* src/cs
473 rmdir src/cs/latest
474 for d in man-pages-extra/cs/man* ; do
475         mv -i $d/*.* src/${d#man-pages-extra/}
476 done
477
478 # tr: make man pages from XML (note: compiles some utility)
479 %{__make} -C src/tr/source
480 find src/tr/tr -name '*.gz' | xargs gzip -d
481 %{__mv} src/tr/tr/man* src/tr
482
483 # zh: prepare zh_CN and zh_TW
484 cd src/zh
485 %{__aclocal}
486 %{__autoconf}
487 %{__automake}
488 %configure
489 %{__make}
490 cd ../..
491 for l in zh_CN zh_TW ; do
492 install -d src/${l}
493 for d in man{1,2,3,4,5,6,7,8,n} ; do
494 ln -snf ../zh/src/${d}/${l} src/${l}/${d}
495 done
496 done
497 # zh_*: man1/sync.1 already exists
498 %{__rm} src/zh_CN/man8/sync.8
499 %{__rm} src/zh_TW/man8/sync.8
500
501 # per-package lists / tarballs production
502 package=NONE
503 while read line ; do
504         if echo $line | grep -q '^\[.\+\]$' ; then
505                 package=`echo $line | sed -e 's/^\[//;s/\]$//;'`
506         elif ! echo $line | grep -q '^#' ; then
507                 if [ -f "src/C/$line" ]; then
508                         echo "$line" >> ${package}-man.list
509                 fi
510                 for l in %{man_langs} ; do
511                         if [ -f "src/$l/$line" ]; then
512                                 echo "$l/$line" >> ${package}-man.list
513                         fi
514                 done
515         fi
516 done < %{SOURCE100}
517 %if %{with tars}
518 rm -rf tarsrc tar
519 install -d tarsrc tar
520 cd tarsrc
521 ln -snf ../src/[!C]* ../src/C/man* ../man-pages-extra/README.*-pages .
522 cd ..
523 for l in *-man.list ; do
524         t=`basename $l .list`
525         if [ -f tarsrc/README.${t}-pages ]; then
526                 echo "README.${t}-pages" >> "$l"
527         fi
528         tar cJf tar/${t}-pages.tar.xz -C tarsrc --files-from "$l"
529 done
530 %endif
531
532 %install
533 rm -rf $RPM_BUILD_ROOT
534 install -d $RPM_BUILD_ROOT%{_mandir}/man{1,2,3,4,5,6,7,8,0p,1p,3p}
535
536 # install C man pages
537 for n in src/C/man{1,2,3,4,5,6,7,8,0p,1p,3p}/*; do
538         bn=${n#src/C/}
539         install -m644 $n $RPM_BUILD_ROOT%{_mandir}/$bn
540 done
541 # drop man pages packaged separately
542 grep '^man' glibc-man.list | sed -e "s,^,$RPM_BUILD_ROOT%{_mandir}/," | xargs -r %{__rm}
543 # rpcbind, formerly glibc
544 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/rpcinfo.8
545 # gawk
546 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{gawk,igawk}.1
547 # libaio
548 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/{aio_init,lio_listio}.3
549 # shadow (but not pwdutils!); shadow(5) is missing in pwdutils too
550 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man5/passwd.5
551
552 # install localized man pages, only for installed C man pages
553 for l in %{man_langs} ; do
554         install -d $RPM_BUILD_ROOT%{_mandir}/$l/man{1,2,3,4,5,6,7,8}
555         for n in $RPM_BUILD_ROOT%{_mandir}/man{1,2,3,4,5,6,7,8}/*; do
556                 bn=$(basename $(dirname $n))/$(basename $n)
557                 if [ -f src/$l/$bn ]; then
558                         install -m644 src/$l/$bn $RPM_BUILD_ROOT%{_mandir}/$l/$bn
559                 fi
560         done
561 done
562
563 # files with just .so links pointing to non-existing man pages
564 # modules.2
565 %{__rm} $RPM_BUILD_ROOT%{_mandir}/de/man2/{create_module,delete_module,get_kernel_syms,init_module}.2
566 # obsolete.2
567 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,ko,nl,pl,pt,ru}/man2/{oldfstat,oldlstat,oldolduname,oldstat,olduname}.2
568 # undocumented.7 (exists in es, but not installed because it's not in C manuals)
569 %{__rm} $RPM_BUILD_ROOT%{_mandir}/es/man5/networks.5
570 # clock_getres.3 (packaged in glibc, but these links exist only in fr manuals, not C)
571 %{__rm} $RPM_BUILD_ROOT%{_mandir}/fr/man2/{clock_getres,clock_gettime,clock_settime}.2
572 # undocumented.7
573 %{__rm} $RPM_BUILD_ROOT%{_mandir}/ru/man5/networks.5
574 # statfs.2
575 %{__rm} $RPM_BUILD_ROOT%{_mandir}/pl/man2/fstatfs.2
576
577 %clean
578 rm -rf $RPM_BUILD_ROOT
579
580 %files
581 %defattr(644,root,root,755)
582 %{_mandir}/man1/*.1*
583 %{_mandir}/man2/*.2*
584 %{_mandir}/man3/*.3*
585 %{_mandir}/man4/*.4*
586 %{_mandir}/man5/*.5*
587 %{_mandir}/man6/*.6*
588 %{_mandir}/man7/*.7*
589 %{_mandir}/man8/*.8*
590 %lang(cs) %{_mandir}/cs/man*/*
591 %lang(de) %{_mandir}/de/man*/*
592 %lang(es) %{_mandir}/es/man*/*
593 %lang(fi) %{_mandir}/fi/man*/*
594 %lang(fr) %{_mandir}/fr/man*/*
595 %lang(hu) %{_mandir}/hu/man*/*
596 %lang(it) %{_mandir}/it/man*/*
597 %lang(ja) %{_mandir}/ja/man*/*
598 %lang(ko) %{_mandir}/ko/man*/*
599 %lang(nl) %{_mandir}/nl/man*/*
600 %lang(pl) %{_mandir}/pl/man*/*
601 %lang(pt) %{_mandir}/pt/man*/*
602 # packaged as plain pt for now
603 #%lang(pt_BR) %{_mandir}/pt_BR/man*/*
604 %lang(ru) %{_mandir}/ru/man*/*
605 %lang(tr) %{_mandir}/tr/man*/*
606 %lang(uk) %{_mandir}/uk/man*/*
607 %lang(zh_CN) %{_mandir}/zh_CN/man*/*
608 %lang(zh_TW) %{_mandir}/zh_TW/man*/*
609
610 %files posix
611 %defattr(644,root,root,755)
612 %dir %{_mandir}/man0p
613 %{_mandir}/man0p/*.0p*
614 %dir %{_mandir}/man1p
615 %{_mandir}/man1p/*.1p*
616 %dir %{_mandir}/man3p
617 %{_mandir}/man3p/*.3p*
This page took 0.055304 seconds and 2 git commands to generate.