# clean old caches when groff =< %{cache_clean_ver} # is uninstalled. %define cache_clean_ver 1.18.1.1-4%{?_dist_release} %global _pkgdocdir %{_docdir}/%{name}-%{version} %global __requires_exclude perl\\(.*\\.pl\\)$ Summary: A document formatting system. Summary(ja): GNU groff 日本語対応版 Name: groff Version: 1.22.4 Release: 1%{?_dist_release} License: GPL Group: Applications/Publishing URL: http://groff.ffii.org Source0: 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: #987069 Patch3: 0004-don-t-use-usr-bin-env-in-shebang.patch Buildroot: %{_tmppath}/%{name}-%{version}-root BuildRequires: libX11-devel, libICE-devel, libSM-devel, libXext-devel BuildRequires: libXmu-devel, libXpm-devel, libXt-devel BuildRequires: libXaw-devel >= 1.0.5 BuildRequires: psutils, byacc, imake, netpbm-progs, ghostscript BuildRequires: texinfo Requires(post): install-info Requires(preun): install-info Requires(postun): findutils Obsoletes: groff-tools Vendor: Project Vine Distribution: Vine Linux Packager: daisuke %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. You should install groff if you want to use it as a document formatting system. Groff can also be used to format man pages. If you are going to use groff with the X Window System, you'll also need to install the groff-gxditview package. %description -l ja GNU roff (groff) 日本語対応版です。日本語で書かれたマニュアルを表示す るのに必要です. %package perl Summary: Parts of the groff formatting system that require Perl. Group: Applications/Publishing Requires: %{name} = %{version} Requires: mktemp %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, the grog utility that can be used to automatically determine groff command-line options, and the troff-to-ps print filter. %package gxditview Summary: An X previewer for groff text processor output. Group: Applications/Publishing Requires: %{name} = %{version} %description gxditview Gxditview displays the groff text processor's output on an X Window System display. If you are going to use groff as a text processor, you should install gxditview so that you preview your processed text files in X. You'll also need to install the groff package and the X Window System. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch3 -p1 for file in NEWS src/devices/grolbp/grolbp.1.man doc/{groff.texi*,webpage.ms} \ contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom} do iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" mv "${file}_" "$file" done %build export PAGE=A4 export YACC='bison -y' %configure \ --with-appresdir=%{_datadir}/X11/app-defaults \ --with-grofferdir=%{_datadir}/%{name}/%{version}/groffer make %{?_smp_mflags} %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %{__make} install DESTDIR=%{buildroot} \ docdir=%{_docdir}/%{name}-%{version} # some binaries need alias with 'g' or 'z' prefix for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} ; 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 # perl dependent files in /usr/bin will be in separate package rm -f files-perl files-nonperl for file in %{buildroot}%{_bindir}/*; do # package selection if grep -q -m1 '^#!.*\' $file; then output_file=files-perl else output_file=files-nonperl fi echo %{_bindir}/$(basename $file) >> $output_file # manpage availability manfile=%{buildroot}%{_mandir}/man1/$(basename $file).\* if [ -f $manfile -o -L $manfile ]; then echo %{_mandir}/man1/$(basename $file).\* >> $output_file fi done # install info install -d $RPM_BUILD_ROOT%{_infodir} install -m644 doc/groff.info* $RPM_BUILD_ROOT%{_infodir} # remove unnecessary files and fix privileges 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 "/^