%{!?with_x:%global with_x 1} Summary: A document formatting system Name: groff Version: 1.22.3 Release: 12%{?dist} License: GPLv3+ and GFDL and BSD and MIT Group: Applications/Publishing URL: http://www.gnu.org/software/groff/ Source: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz # resolves: #530788 Patch0: 0001-missing-groff-x11-info-message-when-gxditview-not-fo.patch Patch1: 0002-load-site-font-and-site-tmac-from-etc-groff.patch # resolves: #709413, #720058, #720057 Patch2: 0003-various-security-fixes.patch # resolves: #987069 Patch3: 0004-don-t-use-usr-bin-env-in-shebang.patch # SSIA Patch4: 0005-Add-missing-rule-for-gropdf.patch Requires: coreutils, /sbin/install-info, groff-base = %{version}-%{release} Requires(post): info Requires(preun): info BuildRequires: git, netpbm-progs, perl-generators, psutils, ghostscript Provides: nroff-i18n = %{version}-%{release} %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\([^.]*\\.pl\\) %description Groff is a document formatting system. Groff takes standard text and formatting commands as input and produces formatted output. The created documents can be shown on a display or printed on a printer. Groff's formatting commands allow you to specify font type and size, bold type, italic type, the number and size of columns on a page, and more. 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-base = %{version}-%{release} %description perl The groff-perl package contains the parts of the groff text processor package that require Perl. These include the afmtodit (font processor for creating PostScript font files), groffer (tool for displaying groff files), grog (utility that can be used to automatically determine groff command-line options), chem (groff preprocessor for producing chemical structure diagrams), mmroff (reference preprocessor) and roff2dvi roff2html roff2pdf roff2ps roff2text roff2x (roff code converters). %if %{with_x} %package x11 Summary: Parts of the groff formatting system that require X Windows System Group: Applications/Publishing Requires: groff-base = %{version}-%{release} BuildRequires: libXaw-devel, libXmu-devel Provides: groff-gxditview = %{version}-%{release} Obsoletes: groff-gxditview < 1.20.1 %description x11 The groff-x11 package contains the parts of the groff text processor package that require X Windows System. These include gxditview (display groff intermediate output files on X Window System display) and xtotroff (converts X font metrics into groff font metrics). %endif %package doc Summary: Documentation for groff document formatting system Group: Documentation BuildArch: noarch Requires: groff = %{version}-%{release} Requires(post): info Requires(preun): info %description doc The groff-doc package includes additional documentation for groff text processor package. It contains examples, documentation for PIC language and documentation for creating PDF files. %prep %setup -q git init git config user.email groff-owner@fedoraproject.org git config user.name "groff owner" git add . git commit -n -m "release %{version}" git am %{patches} for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \ contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom,mom.vim}; do iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" mv "${file}_" "$file" done %build %configure \ --docdir=%{_pkgdocdir} \ --with-appresdir=%{_datadir}/X11/app-defaults \ --with-grofferdir=%{_datadir}/%{name}/%{version}/groffer make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} # some binaries need alias with 'g' or 'z' prefix for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} zsoelim; do ln -s ${file#?} %{buildroot}%{_bindir}/${file} ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz done # fix absolute symlink to relative symlink rm -f %{buildroot}%{_pkgdocdir}/pdf/mom-pdf.pdf ln -s ../examples/mom/mom-pdf.pdf %{buildroot}%{_pkgdocdir}/pdf/mom-pdf.pdf # rename groff downloadable postscript fonts to meet Fedora Font Packaging guidelines, # as these files are more PS instructions, than general-purpose fonts (bz #477394) for file in $(find %{buildroot}%{_datadir}/%{name}/%{version}/font/devps -name "*.pfa"); do mv ${file} ${file}_ done sed --in-place 's/\.pfa$/.pfa_/' %{buildroot}%{_datadir}/%{name}/%{version}/font/devps/download # 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 # remove CreationDate from documentation pushd %{buildroot}%{_pkgdocdir} find -name "*.html" | xargs sed -i "/^