groff/groff.spec

171 lines
5.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package groff
#
# Copyright (c) 2012 SUSE LINUX Products 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 http://bugs.opensuse.org/
#
Name: groff
Version: 1.21
Release: 0
Summary: GNU troff Document Formatting System
License: BSD-3-Clause ; GPL-2.0+
Group: Productivity/Publishing/Troff
Url: http://www.gnu.org/software/groff/groff.html
Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz
Source3: zzz-groff.sh
Source4: zzz-groff.csh
# for file in `cat series | grep -v '^#' | grep '^[a-z]' `; do
# cat $file >> groff_1.21-6.debian.diff
# done
Patch0: groff_1.21-6.debian.diff
Patch1: groff-1.20.1-destbufferoverflow.patch
Patch2: groff-1.20.1-nroff-empty-LANGUAGE.patch
Patch3: groff-1.21-groffer-libexecdir.patch
Patch4: groff-1.20.1-deunicode.patch
Patch5: groff-1.21-CVE-2009-5044.patch
#PATCH-FIX-OPENSUSE: splitted patch6 and patch7 from
#http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/groff/groff-1.20.1-owl-tmp.diff?rev=1.2;content-type=text%2Fplain
Patch6: groff-1.21-CVE-2009-5080.patch
Patch7: 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
#so they would be available on next release of groff
Patch8: 0001-locale-support-in-papersize-definition.patch
Patch9: 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
Patch10: groff-force-locale-usage.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: gcc-c++
%if 0%{suse_version} > 1220
BuildRequires: makeinfo
%endif
Provides: jgroff = %{version}-%{release}
Provides: normal-groff = %{version}-%{release}
Obsoletes: jgroff < %{version}
Requires(pre): %fillup_prereq
Requires(pre): %install_info_prereq
# for pre-grohtml and pdfroff
Recommends: netpbm
Recommends: ghostscript-library
Recommends: pssutils
%description
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. Most
programs store their man pages in either /usr/share/man/ or
/usr/X11R6/man/.
%package doc
Summary: HTML documentation and examples for groff
Group: Productivity/Publishing/Troff
%description 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. Most
programs store their man pages in either /usr/share/man/ or
/usr/X11R6/man/.
%prep
%setup -q
%patch0 -p1 -b .debian
%patch1
%patch2 -p1 -b .bnc540600
%patch3 -p1 -b .groffer-libexecdir
%patch4 -p1 -b .deunicode
%patch5 -p1 -b .CVE-2009-5044
%patch6 -p1 -b .CVE-2009-5080
%patch7 -p1
%patch8 -p1 -b .locale
%patch9 -p1 -b .locale
%patch10 -p1 -b .force-locale
%build
PATH=$PWD/src/roff/troff:$PWD/src/preproc/pic:$PWD/src/preproc/eqn:$PWD/src/preproc/tbl:$PWDsrc/preproc/refer:$PWD/src/preproc/soelim:$PATH
PATH=$PWD/src/roff/grog:$PWD/src/roff/groff:$PWD/src/devices/grops:$PWD/src/devices/grotty:$PWD/src/devices/grodvi:$PWD/src/devices/grohtml:$PATH
GROFF_COMMAND_PREFIX=
GROFF_FONT_PATH=$PWD
GROFF_TMAC_PATH=$PWD/tmac:$PWD/src/roff/troff
export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH
#
#libtoolize --force
#autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%{configure}
ulimit -c unlimited
make %{?_smp_mflags}
pushd doc
make %{?_smp_mflags}
makeinfo groff.texinfo
popd
%install
%{makeinstall} docdir=%{_defaultdocdir}/%{name}
%{__rm} -f %{buildroot}%{_infodir}/dir
# documentation
%{__cp} -pr BUG-REPORT ChangeLog* COPYING FDL LICENSES MANIFEST MORE.STUFF NEWS PROBLEMS PROJECTS README README.MinGW REVISION VERSION doc/*ps \
%{buildroot}/%{_defaultdocdir}/%{name}/
# compat symlinks
%{__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/
%fdupes -s %{buildroot}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%files
%defattr(-, root, root)
%dir %{_defaultdocdir}/groff
%doc %{_defaultdocdir}/groff/
%exclude %{_defaultdocdir}/groff/html
%exclude %{_defaultdocdir}/groff/examples
%doc %{_infodir}/groff*
%doc %{_mandir}/man?/*
%{_bindir}/*
%config %{_sysconfdir}/profile.d/zzz-%{name}.*sh
%{_datadir}/%{name}
%{_libexecdir}/%{name}
%files doc
%defattr(-, root, root)
%dir %{_defaultdocdir}/groff
%doc %{_defaultdocdir}/groff/html
%doc %{_defaultdocdir}/groff/examples
%changelog