grace-vl.spec 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. %define version 5.1.22
  2. %define name grace
  3. # relative do datadir
  4. %define type1fontdir fonts/default/Type1
  5. Summary: Numerical Data Processing and Visualization Tool (grace)
  6. Summary(ja): 数値データの処理および可視化を行うツール
  7. Name: %{name}
  8. Version: %{version}
  9. Release: 1%{?_dist_release}
  10. Group: Applications/Engineering
  11. License: GPLv2+
  12. URL: http://plasma-gate.weizmann.ac.il/Grace/
  13. Source0: ftp://plasma-gate.weizmann.ac.il/pub/grace/src/%{name}-%{version}.tar.gz
  14. Source1: %{name}.desktop
  15. Source2: %{name}.png
  16. #Icon: %{name}.gif
  17. #Requires: pdflib, openMotif
  18. #BuildPrereq: pdflib-devel,
  19. Buildroot: %{_tmppath}/%{name}-%{version}-root
  20. BuildRequires: libjpeg-devel libpng-devel netcdf-devel
  21. BuildRequires: fftw-devel gcc-gfortran
  22. BuildRequires: openMotif-devel t1lib-devel
  23. BuildRequires: libXmu-devel libXpm-devel
  24. BuildRequires: desktop-file-utils
  25. # to be able to generate FontDataBase
  26. BuildRequires: urw-fonts
  27. Requires: xdg-utils
  28. # /usr/share/fonts/default/Type1/
  29. Requires: urw-fonts
  30. Requires(post): gtk2
  31. Requires(postun): gtk2
  32. Obsoletes: xmgr
  33. %description
  34. Grace is a Motif application for two-dimensional data visualization.
  35. Grace can transform the data using free equations, FFT, cross- and
  36. auto-correlation, differences, integrals, histograms, and much more. The
  37. generated figures are of high quality. Grace is a very convenient tool
  38. for data inspection, data transformation, and and for making figures for
  39. publications.
  40. %description -l ja
  41. Grace は 2次元データを可視化するMotif アプリケーションです.昔 xmgr と呼ば
  42. れていたツールの子孫にあたります。利用には openMotif が必要です。
  43. Grace では,FFT, 相互相関,自己相関,微分,積分,ヒストグラムその他,自由に
  44. 方程式を用いてデータを変換することができます.高品質の図の作成も行えます.
  45. Grace はデータの解析や変換,出版向けの図の作成に大変便利です.
  46. %prep
  47. %setup -q
  48. %build
  49. %configure \
  50. --enable-editres \
  51. --with-helpviewer="xdg-open %s" \
  52. --with-printcmd="lpr" \
  53. --enable-grace-home=%{_datadir}/%{name} \
  54. --disable-pdfdrv \
  55. --with-x \
  56. --with-f77=gfortran \
  57. --with-extra-incpath=%{_includedir}/netcdf \
  58. make %{?_smp_mflags}
  59. %install
  60. rm -rf $RPM_BUILD_ROOT
  61. make install DESTDIR=$RPM_BUILD_ROOT
  62. #rm -f doc/*.1
  63. mkdir -pm 755 \
  64. $RPM_BUILD_ROOT%{_bindir} \
  65. $RPM_BUILD_ROOT%{_includedir} \
  66. $RPM_BUILD_ROOT%{_libdir} \
  67. $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps \
  68. $RPM_BUILD_ROOT%{_datadir}/applications \
  69. $RPM_BUILD_ROOT%{_mandir}/man1 \
  70. $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
  71. ##
  72. # Let's have some sanity
  73. #
  74. pushd %{buildroot}%{_datadir}/%{name}
  75. install -pm 755 bin/* %{buildroot}%{_bindir}/
  76. rm -rf bin
  77. #ln -s %{_bindir} bin
  78. ln -s ../../bin bin
  79. cp -p lib/* %{buildroot}%{_libdir}/
  80. rm -rf lib
  81. #ln -s %{_libdir} lib
  82. ln -s ../../%_lib lib
  83. install -pm 644 include/* %{buildroot}%{_includedir}/
  84. rm -rf include
  85. #ln -s %{_includedir} include
  86. ln -s ../../include include
  87. # use fonts from type1fontdir
  88. rm -rf fonts/type1
  89. ln -s ../../%{type1fontdir} fonts/type1
  90. mv fonts/FontDataBase %{buildroot}%{_sysconfdir}/%{name}
  91. #ln -s %{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase
  92. ln -s ../../../../%{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase
  93. # regenerate %{_sysconfdir}/%{name}/FontDataBase based on what is in
  94. # type1fontdir and original FontDataBase content
  95. FontDataBaseFile=%{buildroot}%{_sysconfdir}/%{name}/FontDataBase
  96. rm -f $FontDataBaseFile.tmp
  97. for file in %{_datadir}/%{type1fontdir}/*.pfb; do
  98. base=`basename $file .pfb`
  99. alias=
  100. if grep -qs $base $FontDataBaseFile; then
  101. # keep original aliases if the exist
  102. grep $base $FontDataBaseFile >> $FontDataBaseFile.tmp
  103. else
  104. # no original alias case. Use FullName from afm file and change space to -
  105. if [ -f %{_datadir}/%{type1fontdir}/$base.afm ]; then
  106. alias=`grep '^FullName' %{_datadir}/%{type1fontdir}/$base.afm | sed 's/^FullName *//' | sed 's/ *$//' | sed 's/ /-/g'`
  107. fi
  108. [ "z$alias" = 'z' ] && alias=$base
  109. echo "$alias $alias $base.pfb" >> $FontDataBaseFile.tmp
  110. fi
  111. done
  112. fontcount=`wc -l $FontDataBaseFile.tmp`
  113. echo $fontcount | sed 's:%{buildroot}.*::' > $FontDataBaseFile
  114. cat $FontDataBaseFile.tmp >> $FontDataBaseFile
  115. rm $FontDataBaseFile.tmp
  116. install -pm 644 doc/*.1 %{buildroot}%{_mandir}/man1/
  117. # doc and example directories are removed from GRACE_HOME and put in %doc
  118. rm -rf doc
  119. #ln -s %{_docdir}/%{name}-%{version}/doc doc
  120. ln -s ../doc/%{name}-%{version}/doc doc
  121. rm -rf examples
  122. #ln -s %{_docdir}/%{name}-%{version}/examples examples
  123. ln -s ../doc/%{name}-%{version}/examples examples
  124. # the convcal source file shouldn't be installed, it is removed here
  125. rm -f auxiliary/convcal.c
  126. # move config files to %{_sysconfdir} and do symlinks
  127. for conf in gracerc templates gracerc.user; do
  128. mv $conf %{buildroot}%{_sysconfdir}/%{name}
  129. #ln -s %{_sysconfdir}/%{name}/$conf $conf
  130. ln -s ../../../%{_sysconfdir}/%{name}/$conf $conf
  131. done
  132. popd
  133. ##
  134. # Desktop stuff
  135. #
  136. install -pm 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
  137. desktop-file-install \
  138. --dir %{buildroot}%{_datadir}/applications \
  139. %{SOURCE1}
  140. # clean up docs
  141. rm -rf __dist_doc
  142. mkdir __dist_doc
  143. cp -a doc __dist_doc
  144. rm __dist_doc/doc/Makefile __dist_doc/doc/*.sgml
  145. %clean
  146. rm -rf $RPM_BUILD_ROOT
  147. %post
  148. touch --no-create %{_datadir}/icons/hicolor || :
  149. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  150. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  151. fi
  152. %postun
  153. touch --no-create %{_datadir}/icons/hicolor || :
  154. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  155. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  156. fi
  157. %files
  158. %defattr(-,root,root)
  159. %doc ChangeLog CHANGES COPYRIGHT DEVELOPERS LICENSE README
  160. %doc examples/ __dist_doc/doc/
  161. %config(noreplace) %{_sysconfdir}/%{name}/
  162. %{_bindir}/*
  163. %{_datadir}/%{name}
  164. %{_datadir}/applications/*
  165. %{_datadir}/icons/hicolor/*/*/*
  166. %{_mandir}/man*/*
  167. %{_includedir}/*
  168. #{_datadir}/%{name}/include
  169. %{_libdir}/libgrace_np.a
  170. #{_datadir}/%{name}/lib
  171. %changelog
  172. * Fri Mar 20 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.1.22-1
  173. - applied new versioning policy, spec in UTF-8
  174. - updated to 5.1.22
  175. - changed Group to Applications/Engineering
  176. - used xdg-utils, gfortran
  177. * Mon Jun 2 2003 Jun Nishii <jun@vinelinux.org> 5.1.12-0vl1
  178. - ver.up and build with openMotif
  179. * Wed Sep 18 2002 Jun Nishii <jun@vinelinux.org> 5.1.10-0vl1
  180. - ver.up
  181. * Fri Aug 16 2002 Jun Nishii <jun@vinelinux.org> 5.1.9-0vl1
  182. - ver.up
  183. * Sun Mar 3 2002 Jun Nishii <jun@vinelinux.org> 5.1.6-0vl1
  184. - ver.up
  185. * Mon Jan 21 2002 Jun Nishii <jun@vinelinux.org> 5.1.5-0vl1
  186. - ver.up
  187. - added BuildPrereq: lesstif-devel to get xmgrace
  188. * Wed Aug 29 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 5.1.4-0vl2
  189. - remove ExclusiveArch
  190. * Mon Aug 27 2001 Jun Nishii <jun@vinelinux.org> 5.1.4-0vl1
  191. - ver.up
  192. * Fri Apr 20 2001 Jun Nishii <jun@vinelinux.org>
  193. - 5.1.3-0vl1
  194. - ver.up
  195. * Sat Nov 11 2000 Masato Bito <masato@nets.ce.hiroshima-cu.ac.jp>
  196. - 5.1.1-0vl2
  197. - added ExclusiveArch: sparc
  198. * Wed Sep 27 2000 Jun Nishii <jun@vinelinux.org>
  199. - 5.1.1-0vl1
  200. - build for Vine Linux 2.1