%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\([^.]*\\.pl\\) %{!?with_x:%global with_x 1} Name: groff Version: 1.23.0 Release: 3 Summary: A typesetting system License: GPLv3+ and GFDL-1.3-or-later and BSD and MIT URL: http://www.gnu.org/software/groff/ Source: http://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz Patch6000: backport-nroff-map-CW-to-R.patch BuildRequires: gcc, gcc-c++ texinfo BuildRequires: git, netpbm-progs, perl-generators, psutils, ghostscript BuildRequires: libXaw-devel, libXmu-devel BuildRequires: jbig2dec-libs m4 Requires: coreutils Requires: %{name}-base = %{version}-%{release} Obsoletes: %{name}-base < %{version}-%{release} Obsoletes: %{name}-perl < %{version}-%{release} Obsoletes: %{name}-x11 < %{version}-%{release} Obsoletes: %{name}-gxditview < 1.20.1 Provides: %{name}-perl Provides: %{name}-x11 Provides: groff-gxditview = %{version}-%{release} Provides: nroff-i18n = %{version}-%{release} %description Groff (GNU troff) is a typesetting system that reads plain text mixed with formatting commands and produces formatted output. Output may be PostScript or PDF, html, or ASCII/UTF8 for display at the terminal. Formatting commands may be either low-level typesetting requests (“primitives”) or macros from a supplied set. Users may also write their own macros. All three may be combined. %package base Summary: Base parts of groff formatting system %description base The groff-base package contains base parts of groff formatting system which are required to display manual pages. %package help Summary: Documents for %{name} Buildarch: noarch Requires: man info Requires: groff = %{version}-%{release} Obsoletes: %{name}-doc < %{version}-%{release} Provides: %{name}-doc %if %{with_x} %package x11 Summary: Parts of the groff formatting system that require X Windows System Requires: groff-base = %{version}-%{release} BuildRequires: libXaw-devel, libXmu-devel Provides: groff-gxditview = %{version}-%{release} Obsoletes: groff-gxditview < 1.20.1 Conflicts: groff < 1.23.0-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 Windows System display) and xtotroff (converts X font metrics into groff font metrics). %endif %description help Man pages and other related documents for %{name}. %prep %autosetup -n %{name}-%{version} -p1 for file in NEWS src/devices/grolbp/grolbp.1.man doc/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=%{_docdir}/%{name}-%{version} \ --with-appresdir=%{_datadir}/X11/app-defaults \ --with-grofferdir=%{_datadir}/%{name}/%{version}/groffer %make_build %install %make_install # 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}%{_docdir}/%{name}-%{version}/pdf/mom-pdf.pdf ln -s ../examples/mom/mom-pdf.pdf %{buildroot}%{_docdir}/%{name}-%{version}/pdf/mom-pdf.pdf # rename groff downloadable postscript 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 pushd %{buildroot}%{_docdir}/%{name}-%{version} find -name "*.html" | xargs sed -i "/^