create groff-base package

This commit is contained in:
Jan Vcelak 2011-09-16 20:13:36 +02:00
parent 0cfd1e9552
commit c26a2e5ef8

View File

@ -3,7 +3,7 @@
Summary: A document formatting system
Name: groff
Version: 1.21
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv3+ and GFDL and BSD and MIT
Group: Applications/Publishing
URL: http://groff.ffii.org
@ -22,8 +22,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Provides: nroff-i18n = %{version}-%{release}
BuildRequires: netpbm-progs psutils ghostscript
# when building from CVS add: BuildRequires: texinfo byacc
Requires(post): info
Requires(preun): info
Requires: groff-base = %{version}-%{release}
%description
Groff is a document formatting system. Groff takes standard text and
@ -37,10 +36,19 @@ Groff can also be used to format man pages. If you are going to use
groff with the X Window System, you will also need to install the
groff-x11 package.
%package base
Summary: Parts of the groff formatting system required to display manual pages
Group: Applications/Publishing
%description base
The groff-base package contains only necessary parts of groff formatting
system which are required to display manual pages, and the groff's default
display device (PostScript).
%package perl
Summary: Parts of the groff formatting system that require Perl
Group: Applications/Publishing
Requires: groff = %{version}-%{release}
Requires: groff-base = %{version}-%{release}
%description perl
The groff-perl package contains the parts of the groff text processor
@ -56,7 +64,7 @@ roff2html roff2pdf roff2ps roff2text roff2x (roff code converters).
Summary: Parts of the groff formatting system that require X Windows System
Group: Applications/Publishing
BuildRequires: libXaw-devel libXmu-devel
Requires: groff = %{version}-%{release}
Requires: groff-base = %{version}-%{release}
Provides: groff-gxditview = %{version}-%{release}
Obsoletes: groff-gxditview < 1.20.1
@ -71,6 +79,8 @@ xtotroff (converts X font metrics into groff font metrics).
Summary: Documentation for groff document formatting system
Group: Documentation
Requires: groff = %{version}-%{release}
Requires(post): info
Requires(preun): info
%description doc
The groff-doc package includes additional documentation for groff
@ -110,26 +120,6 @@ for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} zsoelim
ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz
done
# perl dependent files in /usr/bin will be in separate package
rm -f files-perl files-nonperl
for file in %{buildroot}%{_bindir}/*; do
# package selection
if grep -q -m1 '^#!.*\<perl\>' $file; then
output_file=files-perl
else
output_file=files-nonperl
fi
echo %{_bindir}/$(basename $file) >> $output_file
# manpage availability
manfile=%{buildroot}%{_mandir}/man1/$(basename $file).\*
if [ -f $manfile -o -L $manfile ]; then
echo %{_mandir}/man1/$(basename $file).\* >> $output_file
fi
done
# another documentation files
cp BUG-REPORT COPYING FDL LICENSES MORE.STUFF NEWS PROBLEMS %{buildroot}%{_docdir}/%{name}-%{version}
@ -143,30 +133,112 @@ done
sed --in-place 's/\.pfa$/.pfa_/' %{buildroot}%{_datadir}/%{name}/%{version}/font/devps/download
# remove unnecessary files and fix privileges
# remove unnecessary files
rm -f %{buildroot}%{_infodir}/dir
# fix privileges
chmod 755 %{buildroot}%{_datadir}/groff/%{version}/groffer/version.sh
chmod 755 %{buildroot}%{_datadir}/groff/%{version}/font/devlj4/generate/special.awk
%clean
rm -rf %{buildroot}
%post
%post doc
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
%preun
%preun doc
if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi
%files -f files-nonperl
%files
%defattr(-,root,root,-)
%dir %{_docdir}/%{name}-%{version}
%doc %{_docdir}/%{name}-%{version}/*.me
%doc %{_docdir}/%{name}-%{version}/*.ps
%doc %{_docdir}/%{name}-%{version}/*.ms
# data
%{_datadir}/%{name}/%{version}/font/devdvi/
%{_datadir}/%{name}/%{version}/font/devhtml/
%{_datadir}/%{name}/%{version}/font/devlbp/
%{_datadir}/%{name}/%{version}/font/devlj4/
%{_datadir}/%{name}/%{version}/oldfont/
%{_datadir}/%{name}/%{version}/pic/
%{_datadir}/%{name}/%{version}/tmac/62bit.tmac
%{_datadir}/%{name}/%{version}/tmac/a4.tmac
%{_datadir}/%{name}/%{version}/tmac/dvi.tmac
%{_datadir}/%{name}/%{version}/tmac/e.tmac
%{_datadir}/%{name}/%{version}/tmac/ec.tmac
%{_datadir}/%{name}/%{version}/tmac/hdmisc.tmac
%{_datadir}/%{name}/%{version}/tmac/hdtbl.tmac
%{_datadir}/%{name}/%{version}/tmac/html-end.tmac
%{_datadir}/%{name}/%{version}/tmac/html.tmac
%{_datadir}/%{name}/%{version}/tmac/lbp.tmac
%{_datadir}/%{name}/%{version}/tmac/lj4.tmac
%{_datadir}/%{name}/%{version}/tmac/m.tmac
%{_datadir}/%{name}/%{version}/tmac/me.tmac
%{_datadir}/%{name}/%{version}/tmac/mm.tmac
%{_datadir}/%{name}/%{version}/tmac/mmse.tmac
%{_datadir}/%{name}/%{version}/tmac/mom.tmac
%{_datadir}/%{name}/%{version}/tmac/ms.tmac
%{_datadir}/%{name}/%{version}/tmac/mse.tmac
%{_datadir}/%{name}/%{version}/tmac/om.tmac
%{_datadir}/%{name}/%{version}/tmac/pdfmark.tmac
%{_datadir}/%{name}/%{version}/tmac/s.tmac
%{_datadir}/%{name}/%{version}/tmac/spdf.tmac
%{_datadir}/%{name}/%{version}/tmac/trace.tmac
%{_datadir}/%{name}/%{version}/tmac/mm/
# programs
%{_bindir}/addftinfo
%{_bindir}/eqn2graph
%{_bindir}/gdiffmk
%{_bindir}/grap2graph
%{_bindir}/grn
%{_bindir}/grodvi
%{_bindir}/grolbp
%{_bindir}/grolj4
%{_bindir}/hpftodit
%{_bindir}/indxbib
%{_bindir}/lkbib
%{_bindir}/lookbib
%{_bindir}/pdfroff
%{_bindir}/pfbtops
%{_bindir}/pic2graph
%{_bindir}/post-grohtml
%{_bindir}/pre-grohtml
%{_bindir}/refer
%{_bindir}/tfmtodit
%{_mandir}/man1/addftinfo.*
%{_mandir}/man1/eqn2graph.*
%{_mandir}/man1/gdiffmk.*
%{_mandir}/man1/grap2graph.*
%{_mandir}/man1/grn.*
%{_mandir}/man1/grodvi.*
%{_mandir}/man1/grohtml.*
%{_mandir}/man1/grolbp.*
%{_mandir}/man1/grolj4.*
%{_mandir}/man1/hpftodit.*
%{_mandir}/man1/indxbib.*
%{_mandir}/man1/lkbib.*
%{_mandir}/man1/lookbib.*
%{_mandir}/man1/pdfroff.*
%{_mandir}/man1/pfbtops.*
%{_mandir}/man1/pic2graph.*
%{_mandir}/man1/refer.*
%{_mandir}/man1/tfmtodit.*
# compatibility symlinks
%{_bindir}/grefer
%{_bindir}/glookbib
%{_bindir}/gindxbib
%{_mandir}/man1/grefer.*
%{_mandir}/man1/glookbib.*
%{_mandir}/man1/gindxbib.*
# groff processor documentation
%{_mandir}/man5/*
%{_mandir}/man7/*
%{_infodir}/groff.info*
%files base
%defattr(-,root,root,-)
%dir %{_docdir}/%{name}-%{version}/
%doc %{_docdir}/%{name}-%{version}/BUG-REPORT
%doc %{_docdir}/%{name}-%{version}/COPYING
%doc %{_docdir}/%{name}-%{version}/FDL
@ -174,40 +246,166 @@ fi
%doc %{_docdir}/%{name}-%{version}/MORE.STUFF
%doc %{_docdir}/%{name}-%{version}/NEWS
%doc %{_docdir}/%{name}-%{version}/PROBLEMS
%{_datadir}/groff/
# manpages for binaries are covered by -f
%{_mandir}/man1/grohtml.*
%{_mandir}/man5/*
%{_mandir}/man7/*
%{_infodir}/groff.info*
%exclude %{_datadir}/groff/%{version}/groffer
%exclude %{_bindir}/gxditview
%exclude %{_bindir}/xtotroff
%exclude %{_mandir}/man1/gxditview.*
%exclude %{_mandir}/man1/xtotroff.*
# data
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/%{version}/
%dir %{_datadir}/%{name}/%{version}/font/
%dir %{_datadir}/%{name}/%{version}/tmac/
%{_datadir}/%{name}/current
%{_datadir}/%{name}/site-tmac/
%{_datadir}/%{name}/%{version}/eign
%{_datadir}/%{name}/%{version}/font/devascii/
%{_datadir}/%{name}/%{version}/font/devlatin1/
%{_datadir}/%{name}/%{version}/font/devps/
%{_datadir}/%{name}/%{version}/font/devutf8/
%{_datadir}/%{name}/%{version}/tmac/an-ext.tmac
%{_datadir}/%{name}/%{version}/tmac/an-old.tmac
%{_datadir}/%{name}/%{version}/tmac/an.tmac
%{_datadir}/%{name}/%{version}/tmac/andoc.tmac
%{_datadir}/%{name}/%{version}/tmac/composite.tmac
%{_datadir}/%{name}/%{version}/tmac/cp1047.tmac
%{_datadir}/%{name}/%{version}/tmac/cs.tmac
%{_datadir}/%{name}/%{version}/tmac/de.tmac
%{_datadir}/%{name}/%{version}/tmac/den.tmac
%{_datadir}/%{name}/%{version}/tmac/devtag.tmac
%{_datadir}/%{name}/%{version}/tmac/doc-old.tmac
%{_datadir}/%{name}/%{version}/tmac/doc.tmac
%{_datadir}/%{name}/%{version}/tmac/eqnrc
%{_datadir}/%{name}/%{version}/tmac/europs.tmac
%{_datadir}/%{name}/%{version}/tmac/fr.tmac
%{_datadir}/%{name}/%{version}/tmac/hyphen.cs
%{_datadir}/%{name}/%{version}/tmac/hyphen.den
%{_datadir}/%{name}/%{version}/tmac/hyphen.det
%{_datadir}/%{name}/%{version}/tmac/hyphen.fr
%{_datadir}/%{name}/%{version}/tmac/hyphen.sv
%{_datadir}/%{name}/%{version}/tmac/hyphen.us
%{_datadir}/%{name}/%{version}/tmac/hyphenex.cs
%{_datadir}/%{name}/%{version}/tmac/hyphenex.det
%{_datadir}/%{name}/%{version}/tmac/hyphenex.us
%{_datadir}/%{name}/%{version}/tmac/ja.tmac
%{_datadir}/%{name}/%{version}/tmac/latin1.tmac
%{_datadir}/%{name}/%{version}/tmac/latin2.tmac
%{_datadir}/%{name}/%{version}/tmac/latin5.tmac
%{_datadir}/%{name}/%{version}/tmac/latin9.tmac
%{_datadir}/%{name}/%{version}/tmac/man.tmac
%{_datadir}/%{name}/%{version}/tmac/mandoc.tmac
%{_datadir}/%{name}/%{version}/tmac/mdoc.tmac
%{_datadir}/%{name}/%{version}/tmac/papersize.tmac
%{_datadir}/%{name}/%{version}/tmac/pic.tmac
%{_datadir}/%{name}/%{version}/tmac/ps.tmac
%{_datadir}/%{name}/%{version}/tmac/psatk.tmac
%{_datadir}/%{name}/%{version}/tmac/psold.tmac
%{_datadir}/%{name}/%{version}/tmac/pspic.tmac
%{_datadir}/%{name}/%{version}/tmac/safer.tmac
%{_datadir}/%{name}/%{version}/tmac/sv.tmac
%{_datadir}/%{name}/%{version}/tmac/trans.tmac
%{_datadir}/%{name}/%{version}/tmac/troffrc
%{_datadir}/%{name}/%{version}/tmac/troffrc-end
%{_datadir}/%{name}/%{version}/tmac/tty-char.tmac
%{_datadir}/%{name}/%{version}/tmac/tty.tmac
%{_datadir}/%{name}/%{version}/tmac/unicode.tmac
%{_datadir}/%{name}/%{version}/tmac/www.tmac
%{_datadir}/%{name}/%{version}/tmac/mdoc/
# programs
%{_bindir}/eqn
%{_bindir}/groff
%{_bindir}/grops
%{_bindir}/grotty
%{_bindir}/neqn
%{_bindir}/nroff
%{_bindir}/pic
%{_bindir}/preconv
%{_bindir}/soelim
%{_bindir}/tbl
%{_bindir}/troff
%{_mandir}/man1/eqn.*
%{_mandir}/man1/groff.*
%{_mandir}/man1/grops.*
%{_mandir}/man1/grotty.*
%{_mandir}/man1/neqn.*
%{_mandir}/man1/nroff.*
%{_mandir}/man1/pic.*
%{_mandir}/man1/preconv.*
%{_mandir}/man1/soelim.*
%{_mandir}/man1/tbl.*
%{_mandir}/man1/troff.*
# compatibility symlinks
%{_bindir}/gnroff
%{_bindir}/gtroff
%{_bindir}/gtbl
%{_bindir}/gpic
%{_bindir}/geqn
%{_bindir}/gneqn
%{_bindir}/gsoelim
%{_bindir}/zsoelim
%{_mandir}/man1/gnroff.*
%{_mandir}/man1/gtroff.*
%{_mandir}/man1/gtbl.*
%{_mandir}/man1/gpic.*
%{_mandir}/man1/geqn.*
%{_mandir}/man1/gneqn.*
%{_mandir}/man1/gsoelim.*
%{_mandir}/man1/zsoelim.*
%files perl -f files-perl
%files perl
%defattr(-,root,root,-)
%{_datadir}/groff/%{version}/groffer/
# data
%{_datadir}/%{name}/%{version}/groffer/
# programs
%{_bindir}/afmtodit
%{_bindir}/chem
%{_bindir}/groffer
%{_bindir}/grog
%{_bindir}/mmroff
%{_bindir}/roff2dvi
%{_bindir}/roff2html
%{_bindir}/roff2pdf
%{_bindir}/roff2ps
%{_bindir}/roff2text
%{_bindir}/roff2x
%{_mandir}/man1/afmtodit.*
%{_mandir}/man1/chem.*
%{_mandir}/man1/groffer.*
%{_mandir}/man1/grog.*
%{_mandir}/man1/mmroff.*
%{_mandir}/man1/roff2dvi.*
%{_mandir}/man1/roff2html.*
%{_mandir}/man1/roff2pdf.*
%{_mandir}/man1/roff2ps.*
%{_mandir}/man1/roff2text.*
%{_mandir}/man1/roff2x.*
%if %{with_x}
%files x11
%defattr(-,root,root,-)
%{_bindir}/gxditview
%{_bindir}/xtotroff
# data
%{_datadir}/%{name}/%{version}/font/devX*/
%{_datadir}/%{name}/%{version}/tmac/X.tmac
%{_datadir}/%{name}/%{version}/tmac/Xps.tmac
%{_datadir}/X11/app-defaults/GXditview
%{_datadir}/X11/app-defaults/GXditview-color
# programs
%{_bindir}/gxditview
%{_bindir}/xtotroff
%{_mandir}/man1/gxditview.*
%{_mandir}/man1/xtotroff.*
%endif
%files doc
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}/*.me
%doc %{_docdir}/%{name}-%{version}/*.ps
%doc %{_docdir}/%{name}-%{version}/*.ms
%doc %{_docdir}/%{name}-%{version}/examples/
%doc %{_docdir}/%{name}-%{version}/html/
%doc %{_docdir}/%{name}-%{version}/pdf/
%changelog
* Fri Sep 16 2011 Jan Vcelak <jvcelak@redhat.com> 1.21-4
- new subpackage: groff-base (minimal for manual page rendering)
- move shared data used by gxditview to groff-x11 subpackage
- move groff reference manual to groff-doc subpackage
* Fri Jun 17 2011 Jan Vcelak <jvcelak@redhat.com> 1.21-3
- fix #678572: groffer libdir is incorrect
- fix #709474: unowned groff doc dir