Browse Source

groff-1.22.4-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@12092 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 5 years ago
parent
commit
63015b2f75
1 changed files with 57 additions and 36 deletions
  1. 57 36
      g/groff/groff-vl.spec

+ 57 - 36
g/groff/groff-vl.spec

@@ -2,36 +2,32 @@
 # 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.21
-Release: 3%{?_dist_release}
+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
 
-#
-Patch2: groff-makefile-typo.patch
-Patch3: groff-manpages-typos.patch
-#
-Patch5: groff-1.21-pic-eqn-warnings.patch
-Patch6: groff-1.21-grotty-no-sgr.patch
-Patch7: groff-1.21-m-syntax.patch
-
-# Japanese Patch from Debian
-Patch10: groff-1.18.1.1-fix-minus-char.patch
-
-#
-Patch20: groff-1.21-no-doc.patch
+# 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
@@ -89,18 +85,11 @@ need to install the groff package and the X Window System.
 %prep
 %setup -q
 
-%patch2 -p1 -b .makefile-typo
-%patch3 -p1 -b .manpages-typos
-
-%patch5 -p1 -b .pic-eqn-warnings
-%patch6 -p1 -b .grotty-no-sgr
-%patch7 -p1 -b .m-syntax
-
-%patch10 -p0 -b .fix-minus
-
-%patch20 -p1 -b .no-doc
+%patch0 -p1
+%patch1 -p1
+%patch3 -p1
 
-for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \
+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}_"
@@ -111,17 +100,17 @@ done
 %build
 export PAGE=A4
 export YACC='bison -y'
-%configure --with-appresdir=%{_datadir}/X11/app-defaults
-%{__make}
+%configure \
+	--with-appresdir=%{_datadir}/X11/app-defaults \
+	--with-grofferdir=%{_datadir}/%{name}/%{version}/groffer
 
-GROFF_NO_SGR=1 %{__make} -C doc meintro.txt meref.txt pic.txt
+make %{?_smp_mflags}
 
 %install
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 
 %{__make} install DESTDIR=%{buildroot} \
-                  docdir=%{_docdir}/%{name}-%{version} \
-                  groffer_dir=%{_datadir}/%{name}/%{version}/groffer
+                  docdir=%{_docdir}/%{name}-%{version}
 
 # some binaries need alias with 'g' or 'z' prefix
 
@@ -129,7 +118,19 @@ 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
@@ -157,11 +158,15 @@ 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
 
-rm -f %{buildroot}%{_bindir}/zsoelim
-rm -f %{buildroot}%{_mandir}/man1/zsoelim.1*
+# remove CreationDate from documentation
+pushd %{buildroot}%{_pkgdocdir}
+    find -name "*.html" | xargs sed -i "/^<!-- CreationDate: /d"
+    find -name "*.ps"   | xargs sed -i "/^%%%%CreationDate: /d"
+popd
 
 %clean
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
@@ -182,8 +187,16 @@ find %{_var}/cache/man -type f -name "*.bz2" -exec %{__rm} -f {} \;
 
 %files -f files-nonperl
 %defattr(-,root,root)
-%doc BUG-REPORT COPYING FDL LICENSES MORE.STUFF NEWS PROBLEMS
-%doc doc/*.txt
+%license COPYING FDL LICENSES
+%doc BUG-REPORT MORE.STUFF NEWS PROBLEMS
+%doc doc/*.html doc/*.css doc/*xpm doc/img
+%dir %{_sysconfdir}/groff/
+%dir %{_sysconfdir}/groff/site-font
+%dir %{_sysconfdir}/groff/site-tmac
+%config(noreplace) %{_sysconfdir}/groff/site-tmac/*
+%dir %{_libdir}/groff
+%{_libdir}/groff/groff_opts_no_arg.txt
+%{_libdir}/groff/groff_opts_with_arg.txt
 %{_datadir}/groff/
 # manpages for binaries are covered by -f
 %{_mandir}/man1/grohtml.*
@@ -200,6 +213,9 @@ find %{_var}/cache/man -type f -name "*.bz2" -exec %{__rm} -f {} \;
 %files perl -f files-perl
 %defattr(-,root,root)
 %{_datadir}/groff/%{version}/groffer/
+%{_libdir}/groff/glilypond
+%{_libdir}/groff/gpinyin
+%{_libdir}/groff/grog
 
 
 %files gxditview
@@ -213,6 +229,11 @@ find %{_var}/cache/man -type f -name "*.bz2" -exec %{__rm} -f {} \;
 
 
 %changelog
+* Mon May 13 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.22.4-1
+- new upstream release.
+- dropped all patches.
+- imported patches from rawhide.
+
 * Thu Jul 07 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.21-3
 - rebuild with gcc-5.4.0