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
7 Summary(es.UTF-8): Los documentos RFC
8 Summary(pl.UTF-8): Dokumenty RFC
12 License: distributable
14 Source0: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs0001-0500.tar.gz
15 # Source0-md5: fabc56407a207066936217f7810bcde0
16 Source1: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs0501-1000.tar.gz
17 # Source1-md5: 230782f8893a7c0fe2b932434bdae21d
18 Source2: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs1001-1500.tar.gz
19 # Source2-md5: b1c5cbf854dcf6ebcf33e213960a944e
20 Source3: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs1501-2000.tar.gz
21 # Source3-md5: 7ce21ad0d479c7b01ddc0cbca23ec8fd
22 Source4: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs2001-2500.tar.gz
23 # Source4-md5: 4fdbab79b9c6a12f0c8e10d4a921270c
24 Source5: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs2501-3000.tar.gz
25 # Source5-md5: 61efc8cda2754527575b36f1bdf7acc8
26 Source6: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs3001-3500.tar.gz
27 # Source6-md5: b158f6160d6f778fb46a195bb1ab6794
28 Source7: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs3501-4000.tar.gz
29 # Source7-md5: a664d03d9fe7b92c9a2b10f9acee8c01
30 Source8: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs4001-4500.tar.gz
31 # Source8-md5: d5a1f14dc1ba6a1bfd507c9be257c0ee
32 Source9: ftp://ftp.rfc-editor.org/in-notes/tar/RFCs4501-5000.tar.gz
33 # Source9-md5: d4507be5bd3687771c4c24781cbbb111
35 URL: http://www.rfc.net/
36 %if %{with ps} || %{with pdf}
37 BuildRequires: enscript
38 BuildRequires: ghostscript
40 BuildRequires: xpdf-tools
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 RFC (Request For Comments) documents are actual and suggested Internet
48 %description -l es.UTF-8
49 Los documentos RFC (Request For Comments: petición de comentarios) son
50 los estándares actuales y sugeridos del Internet.
52 %description -l pl.UTF-8
53 Dokumenty RFC (Request For Comments) zawierają opis obowiązujących i
54 proponowanych standardów internetowych.
57 Summary: Commonly referenced RFC documents
58 Summary(es.UTF-8): Documentos RFC repetidamente referidos
59 Summary(pl.UTF-8): Najczęściej wymieniane dokumenty RFC
61 Requires: %{name}-index >= %{version}
64 %description text-basic
65 This is pure text version of basic RFC (Request For Comments)
66 documents, referenced by some other package documentation.
68 %description text-basic -l es.UTF-8
69 Ésta es la versión de texto puro de los documentos RFC (Request For
70 Comments: petición de comentarios), a los que se refiere la
71 documentación de algunos otros paquetes.
73 %description text-basic -l pl.UTF-8
74 Wersja tekstowa dokumentów podstawowych RFC (Request For Comments), do
75 których odnosi się dokumentacja innych pakietów.
78 Summary: RFC documents - pure text version
79 Summary(es.UTF-8): Documentos RFC - versión de texto puro
80 Summary(pl.UTF-8): Wersja czysto tekstowa dokumentów RFC
82 Requires: %{name}-index >= %{version}
83 Provides: %{name}-text-basic
84 Obsoletes: rfc-text-basic
87 This is pure text version of RFC (Request For Comments) documents. The
88 set is incomplete. Some documents are available in PostScript and PDF
91 %description text -l es.UTF-8
92 Ésta es la versión de texto puro de los documentos RFC (Request For
93 Comments: petición de comentarios). Este conjunto es incompleto, ya
94 que algunos documentos son disponibles sólo en los formatos PostScript
97 %description text -l pl.UTF-8
98 Wersja tekstowa dokumentów RFC (Request For Comments). Zbiór jest
99 niepełny, gdyż niektóre dokumenty są dostępne wyłącznie w postaci
100 postscriptowej i PDF.
103 Summary: RFC documents - PostScript version
104 Summary(es.UTF-8): Documentos RFC - versión PostScript
105 Summary(pl.UTF-8): Wersja postscriptowa dokumentów RFC
107 Requires: %{name}-index >= %{version}
110 PostScript version of RFC (Request For Comments) documents.
112 %description ps -l es.UTF-8
113 La versión PostScript de los documentos RFC (Request For Comments:
114 petición de comentarios).
116 %description ps -l pl.UTF-8
117 Wersja postscriptowa dokumentów RFC (Request For Comments).
120 Summary: RFC documents - PDF version
121 Summary(es.UTF-8): Documentos RFC - versión PDF
122 Summary(pl.UTF-8): Wersja postscriptowa dokumentów RFC
124 Requires: %{name}-index >= %{version}
127 RFC (Request For Comments) documents in Adobe PDF format.
129 %description pdf -l es.UTF-8
130 Documentos RFC (Request For Comments: petición de comentarios) en
133 %description pdf -l pl.UTF-8
134 Dokumenty RFC (Request For Comments) w formacie Adobe PDF.
137 %setup -q -c -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9
141 rm -f rfc2328.hastabs.txt
143 # These are broken/unreadable by gv
144 mv -f rfc1144.ps rfc1144.orig.ps
145 mv -f rfc1279.ps rfc1279.orig.ps
146 mv -f rfc1291.ps rfc1291.orig.ps # FIX! check again
148 # These are unreadable because of character spacing problems
149 mv -f rfc1125.pdf rfc1125.orig.pdf
150 mv -f rfc1275.pdf rfc1275.orig.pdf
152 # These are pictures only
153 mv -f rfc525.ps rfc525-pict.ps
154 mv -f rfc546.ps rfc546-pict.ps
155 mv -f rfc525.pdf rfc525-pict.pdf
156 mv -f rfc546.pdf rfc546-pict.pdf
159 for n in 616 1144 1305 ; do
160 gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite \
161 -sOutputFile=rfc$n.ps -c save pop -f rfc$n.pdf
165 # these were provided only in .ps/.pdf
166 for n in 1119 1124 1128 1129 1131 ; do
167 echo -e '\nThe text below was generated from PDF by pdftotext.' >> rfc$n.txt
168 echo -e '----------------------------------------------------------------------\n' >> rfc$n.txt
169 pdftotext rfc$n.pdf - >> rfc$n.txt
171 # these are available as pdf only and are paper copy scans
172 for n in 8 9 11 51 74 109 110 112 119 165 183 199 211 216 296 304 360 403 418 \
173 475 522 530 535 551 576 577 578 579 581 586 588 592 594 598 600 645 \
174 647 661 671 679 694 696 712 714; do
176 gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite \
177 -sOutputFile=rfc$n.ps -c save pop -f rfc$n.pdf
179 if [ ! -e rfc$n.txt ]; then
180 echo -e '\nThis RFC is available as paper copy scan in PDF/PS format only.\n' > rfc$n.txt
184 # Generate .ps and .pdf versions when they are not provided
185 %if %{with ps} || %{with pdf}
186 for i in rfc[1-9]*.txt ; do
187 BASE=`echo $i | sed "s/.txt$//"`
189 if [ ! -e $BASE.ps ] ; then
190 # avoid stopping on errors ; .ps file may be correct
191 # even after processing problems
192 enscript --margin=54 -B -fCourier11 -p $BASE.ps $i 2>/dev/null ||:
196 if [ ! -e $BASE.pdf ] ; then
197 ps2pdf $BASE.ps $BASE.pdf 2>/dev/null
200 %if %{with ps} || %{with pdf}
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT%{_docdir}/RFC/text/{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9}00
207 install -d $RPM_BUILD_ROOT%{_docdir}/RFC/pdf/{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9}00
208 install -d $RPM_BUILD_ROOT%{_docdir}/RFC/postscript/{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9}00
210 find . -name 'rfc[1-9]*.txt' -print | xargs gzip -9
212 find . -name 'rfc[1-9]*.ps' -print | xargs gzip -9
215 # install rfc[1-9]*.txt* $RPM_BUILD_ROOT%{_docdir}/RFC/text
216 for i in {0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9} ; do
217 install rfc`echo $i|sed s/^0\*//g`[0-9][0-9][a.]*txt* \
218 $RPM_BUILD_ROOT%{_docdir}/RFC/text/${i}00
220 install rfc[0-9].txt* $RPM_BUILD_ROOT%{_docdir}/RFC/text/0000
222 # install rfc*.pdf $RPM_BUILD_ROOT%{_docdir}/RFC/pdf
224 for i in {0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9} ; do
225 install rfc`echo $i|sed s/^0\*//g`[0-9][0-9][a.-]*pdf \
226 $RPM_BUILD_ROOT%{_docdir}/RFC/pdf/${i}00
228 install rfc[0-9].pdf $RPM_BUILD_ROOT%{_docdir}/RFC/pdf/0000
232 # install rfc*.ps $RPM_BUILD_ROOT%{_docdir}/RFC/postscript
233 for i in {0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9} ; do
234 install rfc`echo $i|sed s/^0\*//g`[0-9][0-9][a.-]*ps* \
235 $RPM_BUILD_ROOT%{_docdir}/RFC/postscript/${i}00
237 install rfc[0-9].ps* $RPM_BUILD_ROOT%{_docdir}/RFC/postscript/0000
240 BASIC="rfc1032.txt rfc1033.txt rfc1034.txt rfc1035.txt rfc1101.txt"\
241 " rfc1122.txt rfc1123.txt rfc1183.txt rfc1274.txt rfc1279.txt"\
242 " rfc1308.txt rfc1309.txt rfc1321.txt rfc1348.txt rfc1413.txt"\
243 " rfc1510.txt rfc1535.txt rfc1536.txt rfc1537.txt rfc1591.txt"\
244 " rfc1611.txt rfc1612.txt rfc1617.txt rfc1706.txt rfc1712.txt"\
245 " rfc1731.txt rfc1732.txt rfc1733.txt rfc1750.txt rfc1823.txt"\
246 " rfc1876.txt rfc1939.txt rfc1982.txt rfc1995.txt rfc1996.txt"\
247 " rfc2052.txt rfc2060.txt rfc2061.txt rfc2062.txt rfc2079.txt"\
248 " rfc2086.txt rfc2087.txt rfc2088.txt rfc2095.txt rfc2104.txt"\
249 " rfc2119.txt rfc2131.txt rfc2132.txt rfc2133.txt rfc2136.txt"\
250 " rfc2137.txt rfc2163.txt rfc2168.txt rfc2177.txt rfc2180.txt"\
251 " rfc2181.txt rfc2192.txt rfc2193.txt rfc2195.txt rfc2218.txt"\
252 " rfc2221.txt rfc2222.txt rfc2228.txt rfc2230.txt rfc2234.txt"\
253 " rfc2243.txt rfc2245.txt rfc2246.txt rfc2247.txt rfc2251.txt"\
254 " rfc2252.txt rfc2253.txt rfc2254.txt rfc2255.txt rfc2256.txt"\
255 " rfc2279.txt rfc2289.txt rfc2293.txt rfc2294.txt rfc2307.txt"\
256 " rfc2308.txt rfc2317.txt rfc2342.txt rfc2359.txt rfc2373.txt"\
257 " rfc2374.txt rfc2375.txt rfc2377.txt rfc2418.txt rfc2444.txt"\
258 " rfc2485.txt rfc2487.txt rfc2489.txt rfc2535.txt rfc2536.txt"\
259 " rfc2537.txt rfc2538.txt rfc2539.txt rfc2540.txt rfc2541.txt"\
260 " rfc2553.txt rfc2587.txt rfc2589.txt rfc2595.txt rfc2596.txt"\
261 " rfc2649.txt rfc2671.txt rfc2672.txt rfc2673.txt rfc2683.txt"\
262 " rfc2696.txt rfc2713.txt rfc2714.txt rfc2782.txt rfc2798.txt"\
263 " rfc2825.txt rfc2826.txt rfc2828.txt rfc2829.txt rfc2830.txt"\
264 " rfc2831.txt rfc2845.txt rfc2849.txt rfc2874.txt rfc2891.txt"\
265 " rfc2915.txt rfc2929.txt rfc2930.txt rfc2931.txt rfc2945.txt"\
266 " rfc3007.txt rfc3008.txt rfc3045.txt rfc3062.txt rfc3088.txt"\
267 " rfc3090.txt rfc3110.txt rfc3112.txt rfc3174.txt rfc3296.txt"\
268 " rfc3315.txt rfc3377.txt rfc3383.txt rfc951.txt rfc952.txt"\
272 install $i* $RPM_BUILD_ROOT%{_docdir}/RFC/text
276 rm -rf $RPM_BUILD_ROOT
279 %defattr(644,root,root,755)
280 %dir %{_docdir}/RFC/text
281 %{_docdir}/RFC/text/rfc*.txt*
284 %defattr(644,root,root,755)
285 %dir %{_docdir}/RFC/text
286 %{_docdir}/RFC/text/[0-9]*
290 %defattr(644,root,root,755)
291 %{_docdir}/RFC/postscript
296 %defattr(644,root,root,755)