groff-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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. Summary: A document formatting system.
  5. Summary(ja): GNU groff 日本語対応版
  6. Name: groff
  7. Version: 1.21
  8. Release: 2%{?_dist_release}
  9. License: GPL
  10. Group: Applications/Publishing
  11. URL: http://groff.ffii.org
  12. Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz
  13. #
  14. Patch2: groff-makefile-typo.patch
  15. Patch3: groff-manpages-typos.patch
  16. #
  17. Patch5: groff-1.21-pic-eqn-warnings.patch
  18. Patch6: groff-1.21-grotty-no-sgr.patch
  19. Patch7: groff-1.21-m-syntax.patch
  20. # Japanese Patch from Debian
  21. Patch10: groff-1.18.1.1-fix-minus-char.patch
  22. #
  23. Patch20: groff-1.21-no-doc.patch
  24. Buildroot: %{_tmppath}/%{name}-%{version}-root
  25. BuildRequires: libX11-devel, libICE-devel, libSM-devel, libXext-devel
  26. BuildRequires: libXmu-devel, libXpm-devel, libXt-devel
  27. BuildRequires: libXaw-devel >= 1.0.5
  28. BuildRequires: psutils, byacc, imake, netpbm-progs, ghostscript
  29. Requires(post): install-info
  30. Requires(preun): install-info
  31. Requires(postun): findutils
  32. Obsoletes: groff-tools
  33. Vendor: Project Vine
  34. Distribution: Vine Linux
  35. Packager: daisuke
  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: Applications/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: Applications/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. %prep
  71. %setup -q
  72. %patch2 -p1 -b .makefile-typo
  73. %patch3 -p1 -b .manpages-typos
  74. %patch5 -p1 -b .pic-eqn-warnings
  75. %patch6 -p1 -b .grotty-no-sgr
  76. %patch7 -p1 -b .m-syntax
  77. %patch10 -p0 -b .fix-minus
  78. %patch20 -p1 -b .no-doc
  79. for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \
  80. contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom}
  81. do
  82. iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_"
  83. mv "${file}_" "$file"
  84. done
  85. %build
  86. export PAGE=A4
  87. export YACC='bison -y'
  88. %configure --with-appresdir=%{_datadir}/X11/app-defaults
  89. %{__make}
  90. GROFF_NO_SGR=1 %{__make} -C doc meintro.txt meref.txt pic.txt
  91. %install
  92. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  93. %{__make} install DESTDIR=%{buildroot} \
  94. docdir=%{_docdir}/%{name}-%{version} \
  95. groffer_dir=%{_datadir}/%{name}/%{version}/groffer
  96. # some binaries need alias with 'g' or 'z' prefix
  97. for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} ; do
  98. ln -s ${file#?} %{buildroot}%{_bindir}/${file}
  99. ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz
  100. done
  101. # perl dependent files in /usr/bin will be in separate package
  102. rm -f files-perl files-nonperl
  103. for file in %{buildroot}%{_bindir}/*; do
  104. # package selection
  105. if grep -q -m1 '^#!.*\<perl\>' $file; then
  106. output_file=files-perl
  107. else
  108. output_file=files-nonperl
  109. fi
  110. echo %{_bindir}/$(basename $file) >> $output_file
  111. # manpage availability
  112. manfile=%{buildroot}%{_mandir}/man1/$(basename $file).\*
  113. if [ -f $manfile -o -L $manfile ]; then
  114. echo %{_mandir}/man1/$(basename $file).\* >> $output_file
  115. fi
  116. done
  117. # install info
  118. install -d $RPM_BUILD_ROOT%{_infodir}
  119. install -m644 doc/groff.info* $RPM_BUILD_ROOT%{_infodir}
  120. # remove unnecessary files and fix privileges
  121. rm -f %{buildroot}%{_infodir}/dir
  122. chmod 755 %{buildroot}%{_datadir}/groff/%{version}/groffer/version.sh
  123. chmod 755 %{buildroot}%{_datadir}/groff/%{version}/font/devlj4/generate/special.awk
  124. rm -f %{buildroot}%{_bindir}/zsoelim
  125. rm -f %{buildroot}%{_mandir}/man1/zsoelim.1*
  126. %clean
  127. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  128. %post
  129. /sbin/install-info --info-dir=%{_infodir} %{_infodir}/groff.info.gz ||:
  130. %preun
  131. if [ "$1" = 0 ]; then
  132. /sbin/install-info --delete \
  133. --info-dir=%{_infodir} %{_infodir}/groff.info.gz ||:
  134. fi
  135. %triggerpostun -- %{name} <= %{cache_clean_ver}
  136. find %{_var}/cache/man -type f -name "*.bz2" -exec %{__rm} -f {} \;
  137. %files -f files-nonperl
  138. %defattr(-,root,root)
  139. %doc BUG-REPORT COPYING FDL LICENSES MORE.STUFF NEWS PROBLEMS
  140. %doc doc/*.txt
  141. %{_datadir}/groff/
  142. # manpages for binaries are covered by -f
  143. %{_mandir}/man1/grohtml.*
  144. %{_mandir}/man5/*
  145. %{_mandir}/man7/*
  146. %{_infodir}/groff.info*
  147. %exclude %{_datadir}/groff/%{version}/groffer
  148. %exclude %{_bindir}/gxditview
  149. %exclude %{_bindir}/xtotroff
  150. %exclude %{_mandir}/man1/gxditview.*
  151. %exclude %{_mandir}/man1/xtotroff.*
  152. %files perl -f files-perl
  153. %defattr(-,root,root)
  154. %{_datadir}/groff/%{version}/groffer/
  155. %files gxditview
  156. %defattr(-,root,root)
  157. %{_bindir}/gxditview
  158. %{_bindir}/xtotroff
  159. %{_datadir}/X11/app-defaults/GXditview
  160. %{_datadir}/X11/app-defaults/GXditview-color
  161. %{_mandir}/man1/gxditview.*
  162. %{_mandir}/man1/xtotroff.*
  163. %changelog
  164. * Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.21-2
  165. - rebuild with VineSeed environment
  166. * Thu Mar 31 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.21-1
  167. - new upstream release
  168. - drop all cjk patch
  169. - add patch2,3 to fix typo
  170. * Fri Apr 02 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 1.18.1.1-5
  171. - add %posttriggerun to clean old caches (<BTS:VineLinux:960>)
  172. * Tue Mar 23 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 1.18.1.1-4
  173. - add Patch2 to fix minus/hyphen character width (<BTS:VineLinux:960>)
  174. - add BuildRequires: psutils, byacc, imake, netpbm-progs, ghostscript
  175. * Tue Apr 07 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.18.1.1-3
  176. - remove gxditview from main package
  177. * Sun Nov 09 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.18.1.1-2
  178. - rebuild with libXaw.so.7 (libXaw-1.0.5)
  179. * Sat May 10 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.18.1.1-1
  180. - rebuild with new versioning policy
  181. - update Debian patch
  182. * Sat Sep 22 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.18.1.1-0vl1
  183. - rebuilt with new toolchain
  184. - updated source and Japanese patch based on Debian
  185. - added BuildRequires: XOrg-devel
  186. * Fri Sep 22 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.17.2-0vl7
  187. - rebuild to add gpg sign
  188. * Tue Apr 8 2003 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 1.17.2-0vl6
  189. - rebuild
  190. * Mon Nov 25 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.17.2-0vl5
  191. - rebuilt with new toolchain
  192. * Wed Mar 06 2002 Toru Sagami <sagami@vinelinux.org> 1.17.2-0vl4
  193. - corrected zsoelim.1 symlink in %%{_mandir}
  194. * Mon Feb 11 2002 Satoshi MACHINO <machino@vinelinux.org> 1.17.2-0vl3
  195. - fixed symlink of *.tmac
  196. * Mon Jan 21 2002 Satoshi MACHINO <machino@vinelinux.org> 1.17.2-0vl2
  197. - build on VineSeed
  198. * Mon Jan 21 2002 Satoshi MACHINO <machino@vinelinux.org> 1.17.2-0vl1
  199. - updated groff-1.17.2
  200. -- security fixed of CAN-2002-0003
  201. -- changed japanese patch to debian patch
  202. -- modified spec file
  203. * Mon Sep 10 2001 Toru Sagami <sagami@vinelinux.org>
  204. - 1.16.1-0vl1: split perl components into separate subpackage
  205. * Tue Jul 17 2001 <sagami@vinelinux.org>
  206. - 1.16.1: version up to 1.16.1
  207. - add groff-1.16.1-japanese.patch originally taken from Kondara
  208. - use %%configure after autoconf, %%makeinstall
  209. * Tue Jan 23 2001 Toru Sagami <czs14350@mb.infoweb.ne.jp>
  210. - 1.15_jp-7
  211. - built on egcs-1.1/libstdc++2_9-2.9.0
  212. - fixed: whether or not build system compress man pages
  213. * Tue Dec 26 2000 Tomoya TAKA <tomoya@olive.plala.or.jp> 1.15_jp-6
  214. - some fixes to handle man pages correctly
  215. * Sat Nov 11 2000 MACHINO, Satoshi <machino@vinelinux.org> 1.15_jp-5
  216. - build on gcc-2.95.3
  217. - partially used macros
  218. * Mon Aug 7 2000 Jun Nishii <jun@vinelinux.org>
  219. - 1.15_jp-4
  220. - follow up to RHL62 (1.15-8)
  221. * Thu Feb 24 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  222. - 1.15_jp-3
  223. - modified ja patch, namely lib.h
  224. * Sun Jan 9 2000 Jun Nishii <jun@vinelinux.org>
  225. - groff-tmac-ja was lacked in Source entry(;_;) fixed!
  226. * Tue Jan 4 2000 Jun Nishii <jun@vinelinux.org>
  227. - build for Vine Linux 2.0 with ja patch
  228. * Wed Dec 29 1999 Bill Nottingham <notting@redhat.com>
  229. - update to 1.15
  230. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  231. - auto rebuild in the new build environment (release 9)
  232. * Tue Feb 16 1999 Cristian Gafton <gafton@redhat.com>
  233. - glibc 2.1 patch for xditview (#992)
  234. * Thu Oct 22 1998 Bill Nottingham <notting@redhat.com>
  235. - build for Raw Hide
  236. * Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
  237. - fix makefiles to work with bash2
  238. * Fri May 08 1998 Prospector System <bugs@redhat.com>
  239. - translations modified for de, fr, tr
  240. * Thu Apr 30 1998 Cristian Gafton <gafton@redhat.com>
  241. - use g++ for C++ code
  242. * Wed Apr 08 1998 Cristian Gafton <gafton@redhat.com>
  243. - manhattan and buildroot
  244. * Mon Nov 3 1997 Michael Fulbright <msf@redhat.com>
  245. - made xdefaults file a config file
  246. * Thu Oct 23 1997 Erik Troan <ewt@redhat.com>
  247. - split perl components into separate subpackage
  248. * Tue Oct 21 1997 Michael Fulbright <msf@redhat.com>
  249. - updated to 1.11a
  250. - added safe troff-to-ps.fpi
  251. * Tue Oct 14 1997 Michael Fulbright <msf@redhat.com>
  252. - removed troff-to-ps.fpi for security reasons.
  253. * Fri Jun 13 1997 Erik Troan <ewt@redhat.com>
  254. - built against glibc