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
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
14 License: distributable
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
32 BuildRequires: perl-devel
33 %if %{with html_index}
34 BuildRequires: rpm-perlprov
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 RFC (Request For Comments) documents are actual and suggested Internet
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.
47 %description -l pl.UTF-8
48 Dokumenty RFC (Request For Comments) zawierają opis obowiązujących i
49 proponowanych standardów internetowych.
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
57 %description -n rfc-index
58 Index file for RFC (Request For Comments) documents containing
59 information about document title, authors, status, size, etc.
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.
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.
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
76 Requires: %{name}-text >= %{version}-%{release}
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.
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.
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.
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
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.
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.
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
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
117 Requires: rfc-index >= %{version}
120 #Provides: %{name}-text-basic
121 #Obsoletes: %{name}-text-basic
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
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
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.
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
144 Requires: rfc-index >= %{version}
149 PostScript version of RFC (Request For Comments) documents.
151 %description ps -l es.UTF-8
152 La versión PostScript de los documentos RFC (Request For Comments:
153 petición de comentarios).
155 %description ps -l pl.UTF-8
156 Wersja postscriptowa dokumentów RFC (Request For Comments).
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
163 Requires: rfc-index >= %{version}
168 RFC (Request For Comments) documents in Adobe PDF format.
170 %description pdf -l es.UTF-8
171 Documentos RFC (Request For Comments: petición de comentarios) en
174 %description pdf -l pl.UTF-8
175 Dokumenty RFC (Request For Comments) w formacie Adobe PDF.
184 %if %{with html_index}
185 install %{SOURCE10} rfcindex
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$//"`
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 || :
202 if [ ! -e $BASE.pdf ] ; then
203 ps2pdf $BASE.ps $BASE.pdf 2>/dev/null
206 %if %{with ps} || %{with pdf}
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
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
222 install rfc-index.txt $RPM_BUILD_ROOT%{_docdir}/RFC
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
231 find . -name 'rfc[1-9]*.txt' -print | xargs gzip -9
233 find . -name 'rfc[1-9]*.ps' -print | xargs gzip -9
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
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
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
259 rm -rf $RPM_BUILD_ROOT
262 %defattr(644,root,root,755)
263 %{_docdir}/RFC/text/[0-9]*
266 %defattr(644,root,root,755)
268 %{_docdir}/RFC/rfc-index.txt
272 %defattr(644,root,root,755)
273 %{_docdir}/RFC/postscript/*
278 %defattr(644,root,root,755)
282 %if %{with html_index}
283 %files -n rfc-index-html
284 %defattr(644,root,root,755)
285 %{_docdir}/RFC/rfc-index.html
288 %defattr(644,root,root,755)
289 %attr(755,root,root) %{_bindir}/rfcindex