# # spec file for package groff # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "full" %bcond_without full_build %else %bcond_with full_build %endif Name: groff Version: 1.22.4 Release: 0 Summary: GNU troff Document Formatting System License: GPL-3.0-or-later Group: Productivity/Publishing/Troff URL: http://www.gnu.org/software/groff/groff.html Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz Source1: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz.sig Source2: groff.keyring Source3: zzz-groff.sh Source4: zzz-groff.csh Patch0: groff-1.20.1-nroff-empty-LANGUAGE.patch Patch1: groff-1.20.1-deunicode.patch Patch2: groff-1.21-CVE-2009-5044.patch # http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/groff/groff-1.20.1-owl-tmp.diff?rev=1.2;content-type=text%2Fplain Patch3: groff-1.21-CVE-2009-5081.patch # PATCH-FIX-OPENSUSE: FATE#312586 # sent upstream http://lists.gnu.org/archive/html/bug-groff/2011-09/msg00002.html Patch4: 0001-locale-support-in-papersize-definition.patch Patch5: 0002-documentation-for-the-locale-keyword.patch # change the papersize definition to force the locale usage # it can be supressed by /etc/papersize if needed Patch6: groff-force-locale-usage.patch Patch7: 0004-don-t-use-usr-bin-env-in-shebang.patch # Patches from debian Patch100: https://salsa.debian.org/debian/groff/raw/master/debian/patches/bash-scripts.patch Patch101: https://salsa.debian.org/debian/groff/raw/master/debian/patches/sort-perl-hash-keys.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: makeinfo BuildRequires: pkgconfig %if %{with full_build} BuildRequires: ghostscript-library BuildRequires: groff BuildRequires: netpbm BuildRequires: psutils BuildRequires: pkgconfig(uchardet) # for gxditview and X fontx BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xaw7) BuildRequires: pkgconfig(xmu) BuildRequires: pkgconfig(xt) # for pre-grohtml and pdfroff Requires: ghostscript-library # requires the -base package Requires: groff = %{version} Requires: netpbm Requires: psutils Requires(post): %{install_info_prereq} Provides: jgroff = %{version}-%{release} Provides: normal-groff = %{version}-%{release} Obsoletes: jgroff < %{version} # X fonts were moved back Provides: groff-devx = %{version}-%{release} Obsoletes: groff-devx <= 1.21 %else Recommends: groff-full %endif %description The groff package is a stripped-down package containing the necessary components to read manual pages in ASCII, Latin-1, and UTF-8, plus the PostScript device (groff's default). Users who want a full groff installation, with the standard set of devices, fonts, macros, and documentation, should install the groff-full package. %package -n groff-full Summary: GNU troff Document Formatting System - full variant Group: Productivity/Publishing/Troff %description -n groff-full The groff-full package provides aditional tools excluded from base groff package, like grohtml, X fonts et. all. Groff is used to "compile" man pages stored in groff or nroff format for different output devices, for example, displaying to a screen or in PostScript(tm) format for printing on a PostScript(tm) printer. %package -n groff-doc Summary: HTML documentation and examples for groff Group: Productivity/Publishing/Troff BuildArch: noarch %description -n groff-doc The groff package provides compatible versions of troff, nroff, eqn, tbl, and other Unix text formatting utilities. Groff is used to "compile" man pages stored in groff or nroff format for different output devices, for example, displaying to a screen or in PostScript(tm) format for printing on a PostScript(tm) printer. %package -n gxditview Summary: Ditroff Output Displayer for Groff Group: Productivity/Publishing/Troff Requires: groff-full = %{version} # bnc#668254 Supplements: packageand(groff:xorg-x11-libX11) Conflicts: jgxdview Provides: gxdview = %{version}-%{release} Obsoletes: gxdview < %{version} %description -n gxditview This version of xditview is called gxditview and has some extensions used by the groff command. gxditview is used by groff if called with the -X option. %prep %setup -q -n groff-%{version} %autopatch -p1 # remove hardcoded docdir sed -i \ -e '/^docdir=/d' \ Makefile.am %build autoreconf -fvi # libdir redefined as it is just bunch of perl scripts %configure \ --disable-silent-rules \ --docdir=%{_defaultdocdir}/groff \ --libdir=%{_libexecdir} \ --with-appresdir=%{_datadir}/X11/app-defaults \ --with-grofferdir=%{_libexecdir}/groff/groffer make %{?_smp_mflags} %install %make_install %if %{with full_build} # remove groff basic files from bellow exit 1 %else # FIXME: remove all that is not present in current groff in TW # and personalize the filelist to be exact here # remove all not really wanted files rm -rf %{buildroot}%{_mandir}/man5/ rm -rf %{buildroot}%{_mandir}/man7/ rm -rf %{buildroot}%{_infodir}/ rm -rf %{buildroot}%{_libexecdir}/groff/groffer/ rm -rf %{buildroot}%{_libexecdir}/groff/gpinyin/ rm -rf %{buildroot}%{_libexecdir}/groff/glilypond/ rm -f %{buildroot}%{_libexecdir}/groff/{groff_opts_no_arg.txt,groff_opts_with_arg.txt} rm -rf %{buildroot}%{_docdir}/groff # compat symlinks ln -s -f current %{buildroot}%{_datadir}/%{name}/%{version} ln -s -f eqn %{buildroot}%{_bindir}/geqn ln -s -f tbl %{buildroot}%{_bindir}/gtbl # install profiles to disable the use of ANSI colour sequences by default: install -d -m 0755 %{buildroot}/%{_sysconfdir}/profile.d install -m 644 %{SOURCE3} %{SOURCE4} %{buildroot}/%{_sysconfdir}/profile.d/ %endif %fdupes -s %{buildroot} %if %{with full_build} %post -n groff-full %install_info --info-dir=%{_infodir} %{_infodir}/groff.info.gz %preun -n groff-full %install_info_delete --info-dir=%{_infodir} %{_infodir}/groff.info.gz %endif %if !%{with full_build} %files %license COPYING FDL LICENSES %doc BUG-REPORT ChangeLog* MANIFEST MORE.STUFF NEWS PROBLEMS PROJECTS README %{_mandir}/man1/* %{_bindir}/* %config %{_sysconfdir}/profile.d/zzz-%{name}.*sh %{_datadir}/%{name} %dir %{_libexecdir}/groff %dir %{_libexecdir}/groff/grog %{_libexecdir}/groff/grog/subs.pl %else #groff_base_only %files -n groff-full %dir %{_datadir}/groff/%{version} %dir %{_libexecdir}/groff %doc %{_docdir}/groff %dir %{_libexecdir}/groff %dir %{_libexecdir}/groff/glilypond %{_libexecdir}/groff/glilypond/args.pl %{_libexecdir}/groff/glilypond/oop_fh.pl %{_libexecdir}/groff/glilypond/subs.pl %dir %{_libexecdir}/groff/gpinyin %{_libexecdir}/groff/gpinyin/subs.pl %{_libexecdir}/groff/groff_opts_no_arg.txt %{_libexecdir}/groff/groff_opts_with_arg.txt %exclude %{_docdir}/groff/html %exclude %{_docdir}/groff/examples %{_infodir}/groff* %{_mandir}/man5/* %{_mandir}/man7/* %exclude %{_mandir}/man1/gxditview.1* %{_bindir}/* %exclude %{_bindir}/gxditview %dir %{_datadir}/groff %{_datadir}/groff/%{version}/font %{_datadir}/groff/%{version}/oldfont %{_datadir}/groff/%{version}/pic %{_datadir}/groff/%{version}/tmac %{_datadir}/groff/current %{_datadir}/groff/site-tmac %{_libexecdir}/groff/groffer %files -n groff-doc %dir %{_docdir}/groff %doc %{_docdir}/groff/html %doc %{_docdir}/groff/examples %files -n gxditview %dir %{_datadir}/X11/app-defaults %doc src/devices/xditview/ChangeLog %doc src/devices/xditview/README %doc src/devices/xditview/TODO %{_bindir}/gxditview %{_mandir}/man1/gxditview.1%{?ext_man} %{_datadir}/X11/app-defaults/GXditview %{_datadir}/X11/app-defaults/GXditview-color %endif #groff_base_only %changelog