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