groff-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. # clean old caches when groff =< %{cache_clean_ver}
  2. # is uninstalled.
  3. %define cache_clean_ver 1.18.1.1-4%{?_dist_release}
  4. %global __requires_exclude perl\\(.*\\.pl\\)$
  5. Summary: A document formatting system.
  6. Summary(ja): GNU groff 日本語対応版
  7. Name: groff
  8. Version: 1.23.0
  9. Release: 1%{?_dist_release}
  10. Group: publishing
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. Packager: daisuke
  14. License: GPL-3.0-or-later AND GFDL-1.3-or-later AND BSD-4-Clause-UC AND MIT AND X11 AND LicenseRef-Fedora-Public-Domain
  15. URL: https://www.gnu.org/software/groff/
  16. Source0: https://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz
  17. # resolves: #530788
  18. Patch0: 0001-missing-groff-x11-info-message-when-gxditview-not-fo.patch
  19. Patch1: 0002-load-site-font-and-site-tmac-from-etc-groff.patch
  20. # resolves: #709413, #720058, #720057
  21. Patch2: 0003-various-security-fixes.patch
  22. # resolves: #987069
  23. Patch3: 0004-don-t-use-usr-bin-env-in-shebang.patch
  24. # allow to specify custom docdir
  25. Patch4: 0005-do-not-overwrite-docdir.patch
  26. # Revert upstream change of mapping special characters for UTF-8 devices
  27. # Debian commit: https://salsa.debian.org/debian/groff/-/commit/d5394c68d70e6c5199b01d2522e094c8fd52e64e
  28. Patch5: 0006-Revert-upstream-change-of-mapping-special-characters.patch
  29. Buildroot: %{_tmppath}/%{name}-%{version}-root
  30. BuildRequires: libXmu-devel
  31. BuildRequires: libXaw-devel
  32. BuildRequires: psutils, bison, imake, netpbm-progs, ghostscript
  33. BuildRequires: texinfo
  34. Requires(postun): findutils
  35. Obsoletes: groff-tools
  36. %description
  37. Groff is a document formatting system. Groff takes standard text and
  38. formatting commands as input and produces formatted output. The
  39. created documents can be shown on a display or printed on a printer.
  40. Groff's formatting commands allow you to specify font type and size, bold
  41. type, italic type, the number and size of columns on a page, and more.
  42. You should install groff if you want to use it as a document formatting
  43. system. Groff can also be used to format man pages. If you are going
  44. to use groff with the X Window System, you'll also need to install the
  45. groff-gxditview package.
  46. %description -l ja
  47. GNU roff (groff) 日本語対応版です。日本語で書かれたマニュアルを表示す
  48. るのに必要です.
  49. %package perl
  50. Summary: Parts of the groff formatting system that require Perl.
  51. Group: publishing
  52. Requires: %{name} = %{version}
  53. Requires: mktemp
  54. %description perl
  55. The groff-perl package contains the parts of the groff text processor
  56. package that require Perl. These include the afmtodit font processor
  57. for creating PostScript font files, the grog utility that can be used
  58. to automatically determine groff command-line options, and the
  59. troff-to-ps print filter.
  60. %package gxditview
  61. Summary: An X previewer for groff text processor output.
  62. Group: publishing
  63. Requires: %{name} = %{version}
  64. %description gxditview
  65. Gxditview displays the groff text processor's output on an X Window
  66. System display.
  67. If you are going to use groff as a text processor, you should install
  68. gxditview so that you preview your processed text files in X. You'll also
  69. need to install the groff package and the X Window System.
  70. %debug_package
  71. %prep
  72. %setup -q
  73. %autopatch -p1
  74. for file in NEWS src/devices/grolbp/grolbp.1.man doc/{groff.texi*,webpage.ms} \
  75. contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom,mom.vim}
  76. do
  77. iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_"
  78. mv "${file}_" "$file"
  79. done
  80. %build
  81. export PAGE=A4
  82. export YACC='bison -y'
  83. %configure \
  84. --docdir=%{_pkgdocdir} \
  85. --with-appdefdir=%{_datadir}/X11/app-defaults \
  86. --with-grofferdir=%{_datadir}/%{name}/%{version}/groffer
  87. %make_build
  88. %install
  89. %make_install
  90. # some binaries need alias with 'g' or 'z' prefix
  91. for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} zsoelim; do
  92. ln -s ${file#?} %{buildroot}%{_bindir}/${file}
  93. ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz
  94. done
  95. # fix absolute symlink to relative symlink
  96. rm -f %{buildroot}%{_pkgdocdir}/pdf/mom-pdf.pdf
  97. ln -s ../examples/mom/mom-pdf.pdf %{buildroot}%{_pkgdocdir}/pdf/mom-pdf.pdf
  98. # rename groff downloadable postscript fonts to meet Fedora Font Packaging guidelines,
  99. # as these files are more PS instructions, than general-purpose fonts (bz #477394)
  100. for file in $(find %{buildroot}%{_datadir}/%{name}/%{version}/font/devps -name "*.pfa"); do
  101. mv ${file} ${file}_
  102. done
  103. sed --in-place 's/\.pfa$/.pfa_/' %{buildroot}%{_datadir}/%{name}/%{version}/font/devps/download
  104. # perl dependent files in /usr/bin will be in separate package
  105. rm -f files-perl files-nonperl
  106. for file in %{buildroot}%{_bindir}/*; do
  107. # package selection
  108. if grep -q -m1 '^#!.*\<perl\>' $file; then
  109. output_file=files-perl
  110. else
  111. output_file=files-nonperl
  112. fi
  113. echo %{_bindir}/$(basename $file) >> $output_file
  114. # manpage availability
  115. manfile=%{buildroot}%{_mandir}/man1/$(basename $file).\*
  116. if [ -f $manfile -o -L $manfile ]; then
  117. echo %{_mandir}/man1/$(basename $file).\* >> $output_file
  118. fi
  119. done
  120. # install info
  121. install -d $RPM_BUILD_ROOT%{_infodir}
  122. install -m644 doc/groff.info* $RPM_BUILD_ROOT%{_infodir}
  123. # remove unnecessary files and fix privileges
  124. rm -f %{buildroot}%{_infodir}/dir
  125. # remove CreationDate from documentation
  126. pushd %{buildroot}%{_pkgdocdir}
  127. find -name "*.html" | xargs sed -i "/^<!-- CreationDate: /d"
  128. find -name "*.ps" | xargs sed -i "/^%%%%CreationDate: /d"
  129. popd
  130. %triggerpostun -- %{name} <= %{cache_clean_ver}
  131. find %{_var}/cache/man -type f -name "*.bz2" -exec %{__rm} -f {} \;
  132. %files -f files-nonperl
  133. %license COPYING FDL LICENSES
  134. %doc %{_pkgdocdir}/*
  135. %doc BUG-REPORT MORE.STUFF NEWS PROBLEMS
  136. %dir %{_sysconfdir}/groff/
  137. %dir %{_sysconfdir}/groff/site-font
  138. %dir %{_sysconfdir}/groff/site-tmac
  139. %config(noreplace) %{_sysconfdir}/groff/site-tmac/*
  140. %{_datadir}/groff/
  141. # manpages for binaries are covered by -f
  142. %{_mandir}/man1/grohtml.*
  143. %{_mandir}/man5/*
  144. %{_mandir}/man7/*
  145. %{_infodir}/groff.info*
  146. %exclude %{_bindir}/gxditview
  147. %exclude %{_bindir}/xtotroff
  148. %exclude %{_mandir}/man1/gxditview.*
  149. %exclude %{_mandir}/man1/xtotroff.*
  150. %files perl -f files-perl
  151. %files gxditview
  152. %{_bindir}/gxditview
  153. %{_bindir}/xtotroff
  154. %{_datadir}/X11/app-defaults/GXditview
  155. %{_datadir}/X11/app-defaults/GXditview-color
  156. %{_mandir}/man1/gxditview.*
  157. %{_mandir}/man1/xtotroff.*
  158. %changelog
  159. * Fri Jul 19 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.23.0-1
  160. - new upstream release.
  161. * Mon May 13 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.22.4-1
  162. - new upstream release.
  163. - dropped all patches.
  164. - imported patches from rawhide.
  165. * Thu Jul 07 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.21-3
  166. - rebuild with gcc-5.4.0
  167. * Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.21-2
  168. - rebuild with VineSeed environment
  169. * Thu Mar 31 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.21-1
  170. - new upstream release
  171. - drop all cjk patch
  172. - add patch2,3 to fix typo
  173. * Fri Apr 02 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 1.18.1.1-5
  174. - add %posttriggerun to clean old caches (<BTS:VineLinux:960>)
  175. * Tue Mar 23 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 1.18.1.1-4
  176. - add Patch2 to fix minus/hyphen character width (<BTS:VineLinux:960>)
  177. - add BuildRequires: psutils, byacc, imake, netpbm-progs, ghostscript
  178. * Tue Apr 07 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.18.1.1-3
  179. - remove gxditview from main package
  180. * Sun Nov 09 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.18.1.1-2
  181. - rebuild with libXaw.so.7 (libXaw-1.0.5)
  182. * Sat May 10 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.18.1.1-1
  183. - rebuild with new versioning policy
  184. - update Debian patch
  185. * Sat Sep 22 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.18.1.1-0vl1
  186. - rebuilt with new toolchain
  187. - updated source and Japanese patch based on Debian
  188. - added BuildRequires: XOrg-devel
  189. * Fri Sep 22 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.17.2-0vl7
  190. - rebuild to add gpg sign
  191. * Tue Apr 8 2003 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 1.17.2-0vl6
  192. - rebuild
  193. * Mon Nov 25 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.17.2-0vl5
  194. - rebuilt with new toolchain
  195. * Wed Mar 06 2002 Toru Sagami <sagami@vinelinux.org> 1.17.2-0vl4
  196. - corrected zsoelim.1 symlink in %%{_mandir}
  197. * Mon Feb 11 2002 Satoshi MACHINO <machino@vinelinux.org> 1.17.2-0vl3
  198. - fixed symlink of *.tmac
  199. * Mon Jan 21 2002 Satoshi MACHINO <machino@vinelinux.org> 1.17.2-0vl2
  200. - build on VineSeed
  201. * Mon Jan 21 2002 Satoshi MACHINO <machino@vinelinux.org> 1.17.2-0vl1
  202. - updated groff-1.17.2
  203. -- security fixed of CAN-2002-0003
  204. -- changed japanese patch to debian patch
  205. -- modified spec file
  206. * Mon Sep 10 2001 Toru Sagami <sagami@vinelinux.org>
  207. - 1.16.1-0vl1: split perl components into separate subpackage
  208. * Tue Jul 17 2001 <sagami@vinelinux.org>
  209. - 1.16.1: version up to 1.16.1
  210. - add groff-1.16.1-japanese.patch originally taken from Kondara
  211. - use %%configure after autoconf, %%makeinstall
  212. * Tue Jan 23 2001 Toru Sagami <czs14350@mb.infoweb.ne.jp>
  213. - 1.15_jp-7
  214. - built on egcs-1.1/libstdc++2_9-2.9.0
  215. - fixed: whether or not build system compress man pages
  216. * Tue Dec 26 2000 Tomoya TAKA <tomoya@olive.plala.or.jp> 1.15_jp-6
  217. - some fixes to handle man pages correctly
  218. * Sat Nov 11 2000 MACHINO, Satoshi <machino@vinelinux.org> 1.15_jp-5
  219. - build on gcc-2.95.3
  220. - partially used macros
  221. * Mon Aug 7 2000 Jun Nishii <jun@vinelinux.org>
  222. - 1.15_jp-4
  223. - follow up to RHL62 (1.15-8)
  224. * Thu Feb 24 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  225. - 1.15_jp-3
  226. - modified ja patch, namely lib.h
  227. * Sun Jan 9 2000 Jun Nishii <jun@vinelinux.org>
  228. - groff-tmac-ja was lacked in Source entry(;_;) fixed!
  229. * Tue Jan 4 2000 Jun Nishii <jun@vinelinux.org>
  230. - build for Vine Linux 2.0 with ja patch
  231. * Wed Dec 29 1999 Bill Nottingham <notting@redhat.com>
  232. - update to 1.15
  233. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  234. - auto rebuild in the new build environment (release 9)
  235. * Tue Feb 16 1999 Cristian Gafton <gafton@redhat.com>
  236. - glibc 2.1 patch for xditview (#992)
  237. * Thu Oct 22 1998 Bill Nottingham <notting@redhat.com>
  238. - build for Raw Hide
  239. * Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
  240. - fix makefiles to work with bash2
  241. * Fri May 08 1998 Prospector System <bugs@redhat.com>
  242. - translations modified for de, fr, tr
  243. * Thu Apr 30 1998 Cristian Gafton <gafton@redhat.com>
  244. - use g++ for C++ code
  245. * Wed Apr 08 1998 Cristian Gafton <gafton@redhat.com>
  246. - manhattan and buildroot
  247. * Mon Nov 3 1997 Michael Fulbright <msf@redhat.com>
  248. - made xdefaults file a config file
  249. * Thu Oct 23 1997 Erik Troan <ewt@redhat.com>
  250. - split perl components into separate subpackage
  251. * Tue Oct 21 1997 Michael Fulbright <msf@redhat.com>
  252. - updated to 1.11a
  253. - added safe troff-to-ps.fpi
  254. * Tue Oct 14 1997 Michael Fulbright <msf@redhat.com>
  255. - removed troff-to-ps.fpi for security reasons.
  256. * Fri Jun 13 1997 Erik Troan <ewt@redhat.com>
  257. - built against glibc