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