]> git.pld-linux.org Git - SPECS.git/blob - rfc-latest.spec
SPECS updated Sat 31 Jul 20:27:02 CEST 2021
[SPECS.git] / rfc-latest.spec
1 #
2 # Conditional build:
3 %bcond_with     ps                      # build package with RFCs in PostScript format too
4 %bcond_without  pdf             # don't build package with RFCs in PDF format
5 %bcond_without  html_index      # don't build HTML index
6
7 %define         rfcindex_version        1.2
8 Summary:        Latest RFC documents
9 Summary(es.UTF-8):      Los últimos documentos RFC
10 Summary(pl.UTF-8):      Najnowsze dokumenty RFC
11 Name:           rfc-latest
12 Version:        5503
13 Release:        2
14 License:        distributable
15 Group:          Documentation
16 Source0:        ftp://ftp.rfc-editor.org/in-notes/tar/RFCs5501-latest.tar.gz
17 # Source0-md5:  94ceac5ad595ae4b53d7cf8e33ff0ea7
18 Source1:        ftp://ftp.rfc-editor.org/in-notes/rfc-index.txt
19 Source2:        ftp://ftp.rfc-editor.org/in-notes/rfc5000.txt
20 Source3:        ftp://ftp.rfc-editor.org/in-notes/tar/RFCs5001-5500.tar.gz
21 # Source3-md5:  42ddaff108597082ea30b06a5c69aa76
22 Source10:       rfcindex-%{rfcindex_version}
23 # Source10-md5: 2b35cdd18096517e048fd455364dd77a
24 Patch0:         rfc-index-typo.patch
25 Patch1:         rfc-index-missing_updates.patch
26 Patch10:        rfcindex-pld.patch
27 URL:            http://www.rfc.net/
28 %if %{with ps} || %{with pdf}
29 BuildRequires:  enscript
30 BuildRequires:  ghostscript
31 %endif
32 BuildRequires:  perl-devel
33 %if %{with html_index}
34 BuildRequires:  rpm-perlprov
35 %endif
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 RFC (Request For Comments) documents are actual and suggested Internet
41 standards.
42
43 %description -l es.UTF-8
44 Los documentos RFC (Request For Comments: petición de comentarios) son
45 los estándares actuales y sugeridos del Internet.
46
47 %description -l pl.UTF-8
48 Dokumenty RFC (Request For Comments) zawierają opis obowiązujących i
49 proponowanych standardów internetowych.
50
51 %package -n rfc-index
52 Summary:        Index for RFC documents
53 Summary(es.UTF-8):      Índice para los documentos RFC
54 Summary(pl.UTF-8):      Spis treści dokumentów RFC
55 Group:          Documentation
56
57 %description -n rfc-index
58 Index file for RFC (Request For Comments) documents containing
59 information about document title, authors, status, size, etc.
60
61 %description -n rfc-index -l es.UTF-8
62 Fichero índice para los documentos RFC (Request For Comments: petición
63 de comentarios) que contiene informaciones sobre el título de
64 documento, su autores, estado, tamaño, etc.
65
66 %description -n rfc-index -l pl.UTF-8
67 Plik spisu treści dokumentów RFC (Request For Comments) zawierający
68 informacje takie, jak: tytuł, autorzy, status, rozmiar itp. dla
69 poszczególnych dokumentów.
70
71 %package -n rfc-index-html
72 Summary:        HTML-ized index of RFC documents
73 Summary(es.UTF-8):      Índice de los documentos RFC en HTML
74 Summary(pl.UTF-8):      Spis treści dokumentów RFC w HTML-u
75 Group:          Documentation
76 Requires:       %{name}-text >= %{version}-%{release}
77
78 %description -n rfc-index-html
79 Index file for RFC (Request For Comments) documents containing
80 information about document title, authors, status, size, etc.
81
82 %description -n rfc-index-html -l es.UTF-8
83 Fichero índice para los documentos RFC (Request For Comments: petición
84 de comentarios) que contiene informaciones sobre el título de
85 documento, su autores, estado, tamaño, etc.
86
87 %description -n rfc-index-html -l pl.UTF-8
88 Plik spisu treści dokumentów RFC (Request For Comments) zawierający
89 informacje takie, jak: tytuł, autorzy, status, rozmiar itp. dla
90 poszczególnych dokumentów.
91
92 %package -n rfcindex
93 Summary:        Script to generate HTML-ized index of RFC documents
94 Summary(es.UTF-8):      Script para generar un índice HTML de documentos RFC
95 Summary(pl.UTF-8):      Skrypt do generowania HTML-owego spisu treści dokumentów RFC
96 Group:          Base/Utilities
97 Requires:       rfc-index
98
99 %description -n rfcindex
100 Perl script that reads the plain rfc-index.txt and outputs an HTML
101 index file with hyperlinks to appropriate RFCs.
102
103 %description -n rfcindex -l es.UTF-8
104 Script de Perl que lee el plano rfc-index.txt y devuelve un fichero
105 índice en HTML con hiperenlaces a los RFC adecuados.
106
107 %description -n rfcindex -l pl.UTF-8
108 Skrypt w Perlu generujacy na podstawie tekstowego pliku rfc-index.txt
109 spis treści w HTML-u zawierający przekierowania do odpowiednich
110 dokumentów RFC.
111
112 %package text
113 Summary:        RFC documents - pure text version
114 Summary(es.UTF-8):      Documentos RFC - versión de texto puro
115 Summary(pl.UTF-8):      Wersja czysto tekstowa dokumentów RFC
116 Group:          Documentation
117 Requires:       rfc-index >= %{version}
118 # common dirs
119 Requires:       rfc-text
120 #Provides:      %{name}-text-basic
121 #Obsoletes:     %{name}-text-basic
122
123 %description text
124 This is pure text version of RFC (Request For Comments) documents. The
125 set is incomplete. Some documents are available in PostScript and PDF
126 formats only.
127
128 %description text -l es.UTF-8
129 Ésta es la versión de texto puro de los documentos RFC (Request For
130 Comments: petición de comentarios). Este conjunto es incompleto, ya
131 que algunos documentos son disponibles sólo en los formatos PostScript
132 y PDF.
133
134 %description text -l pl.UTF-8
135 Wersja tekstowa dokumentów RFC (Request For Comments). Zbiór jest
136 niepełny, gdyż niektóre dokumenty są dostępne wyłącznie w postaci
137 postscriptowej i PDF.
138
139 %package ps
140 Summary:        RFC documents - PostScript version
141 Summary(es.UTF-8):      Documentos RFC - versión PostScript
142 Summary(pl.UTF-8):      Wersja postscriptowa dokumentów RFC
143 Group:          Documentation
144 Requires:       rfc-index >= %{version}
145 # common dirs
146 Requires:       rfc-ps
147
148 %description ps
149 PostScript version of RFC (Request For Comments) documents.
150
151 %description ps -l es.UTF-8
152 La versión PostScript de los documentos RFC (Request For Comments:
153 petición de comentarios).
154
155 %description ps -l pl.UTF-8
156 Wersja postscriptowa dokumentów RFC (Request For Comments).
157
158 %package pdf
159 Summary:        RFC documents - PDF version
160 Summary(es.UTF-8):      Documentos RFC - versión PDF
161 Summary(pl.UTF-8):      Wersja PDF dokumentów RFC
162 Group:          Documentation
163 Requires:       rfc-index >= %{version}
164 # common dirs
165 Requires:       rfc-pdf
166
167 %description pdf
168 RFC (Request For Comments) documents in Adobe PDF format.
169
170 %description pdf -l es.UTF-8
171 Documentos RFC (Request For Comments: petición de comentarios) en
172 formato Adobe PDF.
173
174 %description pdf -l pl.UTF-8
175 Dokumenty RFC (Request For Comments) w formacie Adobe PDF.
176
177 %prep
178 %setup -q -c -a3
179 install %{SOURCE1} .
180 %patch0 -p0
181 %patch1 -p0
182 install %{SOURCE2} .
183
184 %if %{with html_index}
185 install %{SOURCE10} rfcindex
186 %patch10 -p0
187 %endif
188
189 %build
190 # Generate .ps and .pdf versions when they are not provided
191 %if %{with ps} || %{with pdf}
192 for i in rfc[1-9]*.txt ; do
193         BASE=`echo $i | sed "s/.txt$//"`
194         PSFILE=$BASE.ps
195         if [ ! -e $BASE.ps ] ; then
196                 # avoid stopping on errors ; .ps file may be correct
197                 # even after processing problems
198                 enscript --margin=54 -B -fCourier11 -p $BASE.ps $i 2>/dev/null || :
199         fi
200 %endif
201 %if %{with pdf}
202         if [ ! -e $BASE.pdf ] ; then
203                 ps2pdf $BASE.ps $BASE.pdf 2>/dev/null
204         fi
205 %endif
206 %if %{with ps} || %{with pdf}
207 done
208 %endif
209
210 %if %{with html_index}
211 ./rfcindex --gzip --by100 --nodate --nocredit \
212         --base="file://%{_docdir}/RFC/" rfc-index.txt >rfc-index.html
213 pod2man rfcindex > rfcindex.1
214 %endif
215
216 %install
217 rm -rf $RPM_BUILD_ROOT
218 install -d $RPM_BUILD_ROOT%{_docdir}/RFC/text/5{0,1,2,3,4,5}00
219 install -d $RPM_BUILD_ROOT%{_docdir}/RFC/pdf/5{0,1,2,3,4,5}00
220 install -d $RPM_BUILD_ROOT%{_docdir}/RFC/postscript/5{0,1,2,3,4,5}00
221
222 install rfc-index.txt $RPM_BUILD_ROOT%{_docdir}/RFC
223
224 %if %{with html_index}
225 install rfc-index.html $RPM_BUILD_ROOT%{_docdir}/RFC
226 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
227 install rfcindex $RPM_BUILD_ROOT%{_bindir}/rfcindex
228 install rfcindex.1 $RPM_BUILD_ROOT%{_mandir}/man1
229 %endif
230
231 find . -name 'rfc[1-9]*.txt' -print | xargs gzip -9
232 %if %{with ps}
233 find . -name 'rfc[1-9]*.ps' -print | xargs gzip -9
234 %endif
235
236 # install rfc[1-9]*.txt* $RPM_BUILD_ROOT%{_docdir}/RFC/text
237 for i in 5{0,1,2,3,4,5} ; do
238         install rfc`echo $i|sed s/^0\*//g`[0-9][0-9][a.]*txt* \
239                 $RPM_BUILD_ROOT%{_docdir}/RFC/text/${i}00
240 done
241
242 %if %{with pdf}
243 # install rfc*.pdf $RPM_BUILD_ROOT%{_docdir}/RFC/pdf
244 for i in 5{0,1,2,3,4,5} ; do
245         install rfc`echo $i|sed s/^0\*//g`[0-9][0-9][a.-]*pdf \
246                 $RPM_BUILD_ROOT%{_docdir}/RFC/pdf/${i}00
247 done
248 %endif
249
250 %if %{with ps}
251 # install rfc*.ps $RPM_BUILD_ROOT%{_docdir}/RFC/postscript
252 for i in 5{0,1,2,3,4,5} ; do
253         install rfc`echo $i|sed s/^0\*//g`[0-9][0-9][a.-]*ps* \
254                 $RPM_BUILD_ROOT%{_docdir}/RFC/postscript/${i}00
255 done
256 %endif
257
258 %clean
259 rm -rf $RPM_BUILD_ROOT
260
261 %files text
262 %defattr(644,root,root,755)
263 %{_docdir}/RFC/text/[0-9]*
264
265 %files -n rfc-index
266 %defattr(644,root,root,755)
267 %dir %{_docdir}/RFC
268 %{_docdir}/RFC/rfc-index.txt
269
270 %if %{with ps}
271 %files ps
272 %defattr(644,root,root,755)
273 %{_docdir}/RFC/postscript/*
274 %endif
275
276 %if %{with pdf}
277 %files pdf
278 %defattr(644,root,root,755)
279 %{_docdir}/RFC/pdf/*
280 %endif
281
282 %if %{with html_index}
283 %files -n rfc-index-html
284 %defattr(644,root,root,755)
285 %{_docdir}/RFC/rfc-index.html
286
287 %files -n rfcindex
288 %defattr(644,root,root,755)
289 %attr(755,root,root) %{_bindir}/rfcindex
290 %{_mandir}/man1/*
291 %endif
This page took 0.408447 seconds and 3 git commands to generate.