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

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

use -lcx instead of -lcx0, add new BuildReq to sed

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