groff/groff.spec
2011-03-15 08:36:36 +00:00

177 lines
5.8 KiB
RPMSpec

#
# spec file for package groff (Version 1.20.1)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: groff
License: BSD3c(or similar) ; GPLv2+
Group: Productivity/Publishing/Troff
Version: 1.20.1
Release: 1
Summary: GNU troff Document Formatting System
Url: http://www.gnu.org/software/groff/groff.html
Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.bz2
Source1: SuSEconfig.groff
Source2: sysconfig.suseconfig-groff
Source3: zzz-groff.sh
Source4: zzz-groff.csh
# for file in `cat series | grep -v '^#' | grep '^[a-z]' ` do
# cat $file >> groff_1.20.1-10.debian.diff
# done
Patch0: groff_1.20.1-10.debian.diff
Patch1: groff-1.20.1-destbufferoverflow.patch
Patch2: groff-1.20.1-nroff-empty-LANGUAGE.patch
Patch3: groff-1.20.1-groffer-libexecdir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: bison
BuildRequires: fdupes
Provides: normal-groff = %{version}-%{release}
Provides: jgroff = %{version}-%{release}
Obsoletes: jgroff < %{version}
Requires(pre): %fillup_prereq
Requires(pre): %install_info_prereq
AutoReqProv: on
# 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/.
Authors:
--------
James Clark <jjc@clark.com>
%package doc
License: BSD3c(or similar) ; GPLv2+
Group: Productivity/Publishing/Troff
Summary: HTML documentation and examples for groff
%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/.
Authors:
--------
James Clark <jjc@clark.com>
%prep
%setup -q -n groff-%{version}
%patch0 -p1 -b .debian
%patch1
%patch2 -p1 -b .bnc540600
%patch3 -p1 -b .groffer-libexecdir
%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="-fno-strict-aliasing"
export CXXFLAGS="-fno-strict-aliasing"
%{configure}
%{__make}
pushd doc
%{__make}
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
# SUSEconfig stuff
%{__install} -d -m 0755 %{buildroot}/sbin/conf.d
%{__install} -d -m 0755 %{buildroot}%{_localstatedir}/adm/fillup-templates
%{__install} -m 0755 %{SOURCE1} %{buildroot}/sbin/conf.d/
%{__install} -m 0644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}
echo "a4" > %{buildroot}%{_sysconfdir}/papersize
%{__chmod} 0644 %{buildroot}%{_sysconfdir}/papersize
# 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}
%clean
rm -rf %{buildroot}
%post
%{fillup_only -an suseconfig}
%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(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/papersize
%config %{_sysconfdir}/profile.d/zzz-%{name}.*sh
%{_datadir}/%{name}
%{_libexecdir}/%{name}
#%verify(not md5) /usr/share/groff/1.18.1/tmac/mm/locale
#%verify(not md5) /usr/share/groff/1.18.1/tmac/mm/se_locale
/sbin/conf.d/SuSEconfig.%{name}
%{_localstatedir}/adm/fillup-templates/sysconfig.suseconfig-%{name}
%files doc
%defattr(-, root, root)
%dir %{_defaultdocdir}/groff
%doc %{_defaultdocdir}/groff/html
%doc %{_defaultdocdir}/groff/examples
%changelog