source: spec/trunk/SPECS/groff.spec@ 1572

Last change on this file since 1572 was 1572, checked in by Silvan Scherrer, 7 years ago

use the right tag in the spec

File size: 13.5 KB
Line 
1%global with_x 0
2
3Summary: A document formatting system
4Name: groff
5Version: 1.22.3
6Release: 1%{?dist}
7License: GPLv3+ and GFDL and BSD and MIT
8Group: Applications/Publishing
9URL: http://www.gnu.org/software/groff/
10Vendor: bww bitwise works GmbH
11%scm_source github http://github.com/bitwiseworks/%{name}-os2 %{version}-os2
12
13Requires: coreutils, groff-base = %{version}-%{release}
14BuildRequires: gcc
15BuildRequires: git, netpbm-progs, perl-generators, psutils, ghostscript
16Provides: nroff-i18n = %{version}-%{release}
17
18%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\([^.]*\\.pl\\)
19
20%description
21Groff is a document formatting system. Groff takes standard text and
22formatting commands as input and produces formatted output. The
23created documents can be shown on a display or printed on a printer.
24Groff's formatting commands allow you to specify font type and size,
25bold type, italic type, the number and size of columns on a page, and
26more.
27
28Groff can also be used to format man pages. If you are going to use
29groff with the X Window System, you will also need to install the
30groff-x11 package.
31
32%package base
33Summary: Parts of the groff formatting system required to display manual pages
34Group: Applications/Publishing
35
36%description base
37The groff-base package contains only necessary parts of groff formatting
38system which are required to display manual pages, and the groff's default
39display device (PostScript).
40
41%package perl
42Summary: Parts of the groff formatting system that require Perl
43Group: Applications/Publishing
44Requires: groff-base = %{version}-%{release}
45
46%description perl
47The groff-perl package contains the parts of the groff text processor
48package that require Perl. These include the afmtodit (font processor
49for creating PostScript font files), groffer (tool for displaying groff
50files), grog (utility that can be used to automatically determine groff
51command-line options), chem (groff preprocessor for producing chemical
52structure diagrams), mmroff (reference preprocessor) and roff2dvi
53roff2html roff2pdf roff2ps roff2text roff2x (roff code converters).
54
55%if %{with_x}
56%package x11
57Summary: Parts of the groff formatting system that require X Windows System
58Group: Applications/Publishing
59Requires: groff-base = %{version}-%{release}
60BuildRequires: libXaw-devel, libXmu-devel
61Provides: groff-gxditview = %{version}-%{release}
62Obsoletes: groff-gxditview < 1.20.1
63
64%description x11
65The groff-x11 package contains the parts of the groff text processor
66package that require X Windows System. These include gxditview (display
67groff intermediate output files on X Window System display) and
68xtotroff (converts X font metrics into groff font metrics).
69%endif
70
71%package doc
72Summary: Documentation for groff document formatting system
73Group: Documentation
74BuildArch: noarch
75Requires: groff = %{version}-%{release}
76
77%description doc
78The groff-doc package includes additional documentation for groff
79text processor package. It contains examples, documentation for PIC
80language and documentation for creating PDF files.
81
82%debug_package
83
84%prep
85%scm_setup
86
87%if 0
88for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \
89 contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom,mom.vim}; do
90 iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_"
91 mv "${file}_" "$file"
92done
93%endif
94
95# Create files necessary for configure
96autoreconf -fvi -I m4
97# do the same in the gnulib part
98cd src/libs/gnulib
99autoreconf -fvi
100
101%build
102export LDFLAGS=" -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
103export LIBS="-lcx"
104%configure \
105 --docdir=%{_pkgdocdir} \
106 --with-appresdir=%{_datadir}/X11/app-defaults \
107 --with-grofferdir=%{_datadir}/%{name}/%{version}/groffer
108make %{?_smp_mflags}
109
110%install
111make install DESTDIR=%{buildroot}
112
113# some binaries need alias with 'g' or 'z' prefix
114for file in gnroff gtroff gtbl gpic geqn gneqn grefer glookbib gindxbib gsoelim zsoelim; do
115 ln -s ${file#?} %{buildroot}%{_bindir}/${file}
116 ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz
117done
118
119# charset.alias is really not needed
120rm -f %{buildroot}%{_libdir}/charset.alias
121# as we don't have X we need to remove those files
122rm -f %{buildroot}%{_datadir}/%{name}/%{version}/tmac/X.tmac
123rm -f %{buildroot}%{_datadir}/%{name}/%{version}/tmac/Xps.tmac
124
125# fix absolute symlink to relative symlink
126rm -f %{buildroot}%{_pkgdocdir}/pdf/mom-pdf.pdf
127ln -s ../examples/mom/mom-pdf.pdf %{buildroot}%{_pkgdocdir}/pdf/mom-pdf.pdf
128
129# rename groff downloadable postscript fonts to meet Fedora Font Packaging guidelines,
130# as these files are more PS instructions, than general-purpose fonts (bz #477394)
131for file in $(find %{buildroot}%{_datadir}/%{name}/%{version}/font/devps -name "*.pfa"); do
132 mv ${file} ${file}_
133done
134sed --in-place 's/\.pfa$/.pfa_/' %{buildroot}%{_datadir}/%{name}/%{version}/font/devps/download
135
136# remove unnecessary files
137rm -f %{buildroot}%{_infodir}/dir
138
139# fix privileges
140chmod 755 %{buildroot}%{_datadir}/groff/%{version}/groffer/version.sh
141chmod 755 %{buildroot}%{_datadir}/groff/%{version}/font/devlj4/generate/special.awk
142
143# I dislike the below fedora change, so I disabled it
144%if 0
145# remove CreationDate from documentation
146pushd %{buildroot}%{_pkgdocdir}
147 find -name "*.html" | xargs sed -i "/^<!-- CreationDate: /d"
148 find -name "*.ps" | xargs sed -i "/^%%%%CreationDate: /d"
149popd
150%endif
151
152# /bin/sed is in /@unixroot/usr/bin/sed in
153sed --in-place 's|#! /bin/sed -f|#! /@unixroot/usr/bin/sed -f|' %{buildroot}%{_datadir}/groff/%{version}/font/devps/generate/symbol.sed
154
155%files
156# data
157%{_datadir}/%{name}/%{version}/font/devdvi/
158%{_datadir}/%{name}/%{version}/font/devlbp/
159%{_datadir}/%{name}/%{version}/font/devlj4/
160%{_datadir}/%{name}/%{version}/oldfont/
161%{_datadir}/%{name}/%{version}/pic/
162%{_datadir}/%{name}/%{version}/tmac/62bit.tmac
163%{_datadir}/%{name}/%{version}/tmac/a4.tmac
164%{_datadir}/%{name}/%{version}/tmac/dvi.tmac
165%{_datadir}/%{name}/%{version}/tmac/e.tmac
166%{_datadir}/%{name}/%{version}/tmac/ec.tmac
167%{_datadir}/%{name}/%{version}/tmac/hdmisc.tmac
168%{_datadir}/%{name}/%{version}/tmac/hdtbl.tmac
169%{_datadir}/%{name}/%{version}/tmac/lbp.tmac
170%{_datadir}/%{name}/%{version}/tmac/lj4.tmac
171%{_datadir}/%{name}/%{version}/tmac/m.tmac
172%{_datadir}/%{name}/%{version}/tmac/me.tmac
173%{_datadir}/%{name}/%{version}/tmac/mm.tmac
174%{_datadir}/%{name}/%{version}/tmac/mm/
175%{_datadir}/%{name}/%{version}/tmac/mmse.tmac
176%{_datadir}/%{name}/%{version}/tmac/mom.tmac
177%{_datadir}/%{name}/%{version}/tmac/ms.tmac
178%{_datadir}/%{name}/%{version}/tmac/mse.tmac
179%{_datadir}/%{name}/%{version}/tmac/om.tmac
180%{_datadir}/%{name}/%{version}/tmac/pdfmark.tmac
181%{_datadir}/%{name}/%{version}/tmac/refer-me.tmac
182%{_datadir}/%{name}/%{version}/tmac/refer-mm.tmac
183%{_datadir}/%{name}/%{version}/tmac/refer-ms.tmac
184%{_datadir}/%{name}/%{version}/tmac/refer.tmac
185%{_datadir}/%{name}/%{version}/tmac/s.tmac
186%{_datadir}/%{name}/%{version}/tmac/spdf.tmac
187%{_datadir}/%{name}/%{version}/tmac/trace.tmac
188# programs
189%{_bindir}/addftinfo.exe
190%{_bindir}/eqn2graph
191%{_bindir}/gdiffmk
192%{_bindir}/grap2graph
193%{_bindir}/grn.exe
194%{_bindir}/grodvi.exe
195%{_bindir}/grolbp.exe
196%{_bindir}/grolj4.exe
197%{_bindir}/hpftodit.exe
198%{_bindir}/indxbib.exe
199%{_bindir}/lkbib.exe
200%{_bindir}/lookbib.exe
201%{_bindir}/pdfroff
202%{_bindir}/pfbtops.exe
203%{_bindir}/pic2graph
204%{_bindir}/refer.exe
205%{_bindir}/tfmtodit.exe
206%{_libdir}/groff/groff_opts_no_arg.txt
207%{_libdir}/groff/groff_opts_with_arg.txt
208%{_mandir}/man1/addftinfo.*
209%{_mandir}/man1/eqn2graph.*
210%{_mandir}/man1/gdiffmk.*
211%{_mandir}/man1/grap2graph.*
212%{_mandir}/man1/grn.*
213%{_mandir}/man1/grodvi.*
214%{_mandir}/man1/grohtml.*
215%{_mandir}/man1/grolbp.*
216%{_mandir}/man1/grolj4.*
217%{_mandir}/man1/hpftodit.*
218%{_mandir}/man1/indxbib.*
219%{_mandir}/man1/lkbib.*
220%{_mandir}/man1/lookbib.*
221%{_mandir}/man1/pdfroff.*
222%{_mandir}/man1/pfbtops.*
223%{_mandir}/man1/pic2graph.*
224%{_mandir}/man1/refer.*
225%{_mandir}/man1/tfmtodit.*
226# compatibility symlinks
227%{_bindir}/grefer
228%{_bindir}/glookbib
229%{_bindir}/gindxbib
230%{_mandir}/man1/grefer.*
231%{_mandir}/man1/glookbib.*
232%{_mandir}/man1/gindxbib.*
233# groff processor documentation
234%{_mandir}/man5/*
235%{_mandir}/man7/*
236%{_infodir}/groff.info*
237
238%files base
239%{!?_licensedir:%global license %%doc}
240%license COPYING FDL LICENSES
241%doc BUG-REPORT MORE.STUFF NEWS PROBLEMS
242# configuration
243%dir %{_sysconfdir}/groff/
244%config(noreplace) %{_sysconfdir}/groff/*
245# data
246%dir %{_datadir}/%{name}/
247%dir %{_datadir}/%{name}/%{version}/
248%dir %{_datadir}/%{name}/%{version}/font/
249%dir %{_datadir}/%{name}/%{version}/tmac/
250%{_datadir}/%{name}/current
251%{_datadir}/%{name}/%{version}/eign
252%{_datadir}/%{name}/%{version}/font/devascii/
253%{_datadir}/%{name}/%{version}/font/devlatin1/
254%{_datadir}/%{name}/%{version}/font/devps/
255%{_datadir}/%{name}/%{version}/font/devutf8/
256%{_datadir}/%{name}/%{version}/font/devhtml/
257%{_datadir}/%{name}/%{version}/tmac/an-ext.tmac
258%{_datadir}/%{name}/%{version}/tmac/an-old.tmac
259%{_datadir}/%{name}/%{version}/tmac/an.tmac
260%{_datadir}/%{name}/%{version}/tmac/andoc.tmac
261%{_datadir}/%{name}/%{version}/tmac/composite.tmac
262%{_datadir}/%{name}/%{version}/tmac/cp1047.tmac
263%{_datadir}/%{name}/%{version}/tmac/cs.tmac
264%{_datadir}/%{name}/%{version}/tmac/de.tmac
265%{_datadir}/%{name}/%{version}/tmac/den.tmac
266%{_datadir}/%{name}/%{version}/tmac/devtag.tmac
267%{_datadir}/%{name}/%{version}/tmac/doc-old.tmac
268%{_datadir}/%{name}/%{version}/tmac/doc.tmac
269%{_datadir}/%{name}/%{version}/tmac/eqnrc
270%{_datadir}/%{name}/%{version}/tmac/europs.tmac
271%{_datadir}/%{name}/%{version}/tmac/fallbacks.tmac
272%{_datadir}/%{name}/%{version}/tmac/fr.tmac
273%{_datadir}/%{name}/%{version}/tmac/html-end.tmac
274%{_datadir}/%{name}/%{version}/tmac/html.tmac
275%{_datadir}/%{name}/%{version}/tmac/hyphen.cs
276%{_datadir}/%{name}/%{version}/tmac/hyphen.den
277%{_datadir}/%{name}/%{version}/tmac/hyphen.det
278%{_datadir}/%{name}/%{version}/tmac/hyphen.fr
279%{_datadir}/%{name}/%{version}/tmac/hyphen.sv
280%{_datadir}/%{name}/%{version}/tmac/hyphen.us
281%{_datadir}/%{name}/%{version}/tmac/hyphenex.cs
282%{_datadir}/%{name}/%{version}/tmac/hyphenex.det
283%{_datadir}/%{name}/%{version}/tmac/hyphenex.us
284%{_datadir}/%{name}/%{version}/tmac/ja.tmac
285%{_datadir}/%{name}/%{version}/tmac/latin1.tmac
286%{_datadir}/%{name}/%{version}/tmac/latin2.tmac
287%{_datadir}/%{name}/%{version}/tmac/latin5.tmac
288%{_datadir}/%{name}/%{version}/tmac/latin9.tmac
289%{_datadir}/%{name}/%{version}/tmac/man.tmac
290%{_datadir}/%{name}/%{version}/tmac/mandoc.tmac
291%{_datadir}/%{name}/%{version}/tmac/mdoc.tmac
292%{_datadir}/%{name}/%{version}/tmac/mdoc/
293%{_datadir}/%{name}/%{version}/tmac/papersize.tmac
294%{_datadir}/%{name}/%{version}/tmac/pic.tmac
295%{_datadir}/%{name}/%{version}/tmac/ps.tmac
296%{_datadir}/%{name}/%{version}/tmac/psatk.tmac
297%{_datadir}/%{name}/%{version}/tmac/psold.tmac
298%{_datadir}/%{name}/%{version}/tmac/pspic.tmac
299%{_datadir}/%{name}/%{version}/tmac/safer.tmac
300%{_datadir}/%{name}/%{version}/tmac/sv.tmac
301%{_datadir}/%{name}/%{version}/tmac/trans.tmac
302%{_datadir}/%{name}/%{version}/tmac/troffrc
303%{_datadir}/%{name}/%{version}/tmac/troffrc-end
304%{_datadir}/%{name}/%{version}/tmac/tty-char.tmac
305%{_datadir}/%{name}/%{version}/tmac/tty.tmac
306%{_datadir}/%{name}/%{version}/tmac/unicode.tmac
307%{_datadir}/%{name}/%{version}/tmac/www.tmac
308# programs
309%{_bindir}/eqn.exe
310%{_bindir}/groff.exe
311%{_bindir}/grops.exe
312%{_bindir}/grotty.exe
313%{_bindir}/neqn
314%{_bindir}/nroff
315%{_bindir}/pic.exe
316%{_bindir}/post-grohtml.exe
317%{_bindir}/pre-grohtml.exe
318%{_bindir}/preconv.exe
319%{_bindir}/soelim.exe
320%{_bindir}/tbl.exe
321%{_bindir}/troff.exe
322%{_mandir}/man1/eqn.*
323%{_mandir}/man1/groff.*
324%{_mandir}/man1/grops.*
325%{_mandir}/man1/grotty.*
326%{_mandir}/man1/neqn.*
327%{_mandir}/man1/nroff.*
328%{_mandir}/man1/pic.*
329%{_mandir}/man1/preconv.*
330%{_mandir}/man1/soelim.*
331%{_mandir}/man1/tbl.*
332%{_mandir}/man1/troff.*
333# compatibility symlinks
334%{_bindir}/gnroff
335%{_bindir}/gtroff
336%{_bindir}/gtbl
337%{_bindir}/gpic
338%{_bindir}/geqn
339%{_bindir}/gneqn
340%{_bindir}/gsoelim
341%{_bindir}/zsoelim
342%{_mandir}/man1/gnroff.*
343%{_mandir}/man1/gtroff.*
344%{_mandir}/man1/gtbl.*
345%{_mandir}/man1/gpic.*
346%{_mandir}/man1/geqn.*
347%{_mandir}/man1/gneqn.*
348%{_mandir}/man1/gsoelim.*
349%{_mandir}/man1/zsoelim.*
350%dir %{_libdir}/groff/
351
352%files perl
353# data
354%{_datadir}/%{name}/%{version}/font/devpdf/
355%{_datadir}/%{name}/%{version}/groffer/
356%{_datadir}/%{name}/%{version}/tmac/pdf.tmac
357# programs
358%{_bindir}/afmtodit
359%{_bindir}/chem
360%{_bindir}/gperl
361%{_bindir}/gpinyin
362%{_bindir}/glilypond
363%{_bindir}/groffer
364%{_bindir}/grog
365%{_bindir}/gropdf
366%{_bindir}/mmroff
367%{_bindir}/pdfmom
368%{_bindir}/roff2dvi
369%{_bindir}/roff2html
370%{_bindir}/roff2pdf
371%{_bindir}/roff2ps
372%{_bindir}/roff2text
373%{_bindir}/roff2x
374%{_mandir}/man1/afmtodit.*
375%{_mandir}/man1/chem.*
376%{_mandir}/man1/gperl.*
377%{_mandir}/man1/gpinyin.*
378%{_mandir}/man1/glilypond.*
379%{_mandir}/man1/groffer.*
380%{_mandir}/man1/grog.*
381%{_mandir}/man1/gropdf.*
382%{_mandir}/man1/mmroff.*
383%{_mandir}/man1/pdfmom.*
384%{_mandir}/man1/roff2dvi.*
385%{_mandir}/man1/roff2html.*
386%{_mandir}/man1/roff2pdf.*
387%{_mandir}/man1/roff2ps.*
388%{_mandir}/man1/roff2text.*
389%{_mandir}/man1/roff2x.*
390%dir %{_libdir}/groff/glilypond/
391%dir %{_libdir}/groff/gpinyin/
392%dir %{_libdir}/groff/grog/
393%{_libdir}/groff/glilypond/args.pl
394%{_libdir}/groff/glilypond/oop_fh.pl
395%{_libdir}/groff/glilypond/subs.pl
396%{_libdir}/groff/gpinyin/subs.pl
397%{_libdir}/groff/grog/subs.pl
398
399%if %{with_x}
400%files x11
401# data
402%{_datadir}/%{name}/%{version}/font/devX*/
403%{_datadir}/%{name}/%{version}/tmac/X.tmac
404%{_datadir}/%{name}/%{version}/tmac/Xps.tmac
405%{_datadir}/X11/app-defaults/GXditview
406%{_datadir}/X11/app-defaults/GXditview-color
407# programs
408%{_bindir}/gxditview
409%{_bindir}/xtotroff
410%{_mandir}/man1/gxditview.*
411%{_mandir}/man1/xtotroff.*
412%endif
413
414%files doc
415%doc %{_pkgdocdir}/*.me
416%doc %{_pkgdocdir}/*.ps
417%doc %{_pkgdocdir}/*.ms
418%doc %{_pkgdocdir}/examples/
419%doc %{_pkgdocdir}/html/
420%doc %{_pkgdocdir}/pdf/
421
422%changelog
423* Fri Oct 26 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.22.3-1
424- first os/2 rpm
Note: See TracBrowser for help on using the repository browser.