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