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