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