source: projects/specs/trunk/g/grace/grace-vl.spec @ 521

Revision 521, 7.1 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1%define version 5.1.22
2%define name grace
3# relative do datadir
4%define type1fontdir fonts/default/Type1
5
6Summary: Numerical Data Processing and Visualization Tool (grace)
7Summary(ja): 数値データの処理および可視化を行うツール
8
9Name: %{name}
10Version: %{version}
11Release: 1%{?_dist_release}
12Group: Applications/Engineering
13License: GPLv2+
14URL: http://plasma-gate.weizmann.ac.il/Grace/
15Source0: ftp://plasma-gate.weizmann.ac.il/pub/grace/src/%{name}-%{version}.tar.gz
16Source1: %{name}.desktop
17Source2: %{name}.png
18
19#Icon: %{name}.gif
20#Requires: pdflib, openMotif
21#BuildPrereq: pdflib-devel,
22Buildroot: %{_tmppath}/%{name}-%{version}-root
23BuildRequires: libjpeg-devel libpng-devel netcdf-devel
24BuildRequires: fftw-devel gcc-gfortran
25BuildRequires: openMotif-devel t1lib-devel
26BuildRequires: libXmu-devel libXpm-devel
27BuildRequires: desktop-file-utils
28# to be able to generate FontDataBase
29BuildRequires: urw-fonts
30
31Requires: xdg-utils
32# /usr/share/fonts/default/Type1/
33Requires: urw-fonts
34Requires(post): gtk2
35Requires(postun): gtk2
36
37Obsoletes: xmgr
38
39
40%description
41Grace is a Motif application for two-dimensional data visualization.
42Grace can transform the data using free equations, FFT, cross- and
43auto-correlation, differences, integrals, histograms, and much more. The
44generated figures are of high quality.  Grace is a very convenient tool
45for data inspection, data transformation, and and for making figures for
46publications.
47
48%description -l ja
49Grace は 2次元データを可視化するMotif アプリケーションです.昔 xmgr と呼ば
50れていたツールの子孫にあたります。利用には openMotif が必要です。
51
52Grace では,FFT, 相互相関,自己相関,微分,積分,ヒストグラムその他,自由に
53方程式を用いてデータを変換することができます.高品質の図の作成も行えます.
54Grace はデータの解析や変換,出版向けの図の作成に大変便利です.
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
70make %{?_smp_mflags}
71
72%install
73rm -rf $RPM_BUILD_ROOT
74make install DESTDIR=$RPM_BUILD_ROOT
75
76#rm -f doc/*.1
77
78mkdir -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#
90pushd %{buildroot}%{_datadir}/%{name}
91install -pm 755 bin/*   %{buildroot}%{_bindir}/
92rm -rf bin
93#ln -s %{_bindir} bin
94ln -s ../../bin bin
95cp -p lib/*   %{buildroot}%{_libdir}/
96rm -rf lib
97#ln -s %{_libdir} lib
98ln -s ../../%_lib lib
99install -pm 644 include/* %{buildroot}%{_includedir}/
100rm -rf include
101#ln -s %{_includedir} include
102ln -s ../../include include
103# use fonts from type1fontdir
104rm -rf fonts/type1
105ln -s ../../%{type1fontdir} fonts/type1
106mv fonts/FontDataBase %{buildroot}%{_sysconfdir}/%{name}
107#ln -s %{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase
108ln -s ../../../../%{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase
109
110# regenerate %{_sysconfdir}/%{name}/FontDataBase based on what is in
111# type1fontdir and original FontDataBase content
112FontDataBaseFile=%{buildroot}%{_sysconfdir}/%{name}/FontDataBase
113rm -f $FontDataBaseFile.tmp
114for 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
128done
129fontcount=`wc -l $FontDataBaseFile.tmp`
130echo $fontcount | sed 's:%{buildroot}.*::' > $FontDataBaseFile
131cat $FontDataBaseFile.tmp >> $FontDataBaseFile
132rm $FontDataBaseFile.tmp
133
134install -pm 644 doc/*.1 %{buildroot}%{_mandir}/man1/
135# doc and example directories are removed from GRACE_HOME and put in %doc
136rm -rf doc
137#ln -s %{_docdir}/%{name}-%{version}/doc doc
138ln -s ../doc/%{name}-%{version}/doc doc
139rm -rf examples
140#ln -s %{_docdir}/%{name}-%{version}/examples examples
141ln -s ../doc/%{name}-%{version}/examples examples
142# the convcal source file shouldn't be installed, it is removed here
143rm -f auxiliary/convcal.c
144# move config files to %{_sysconfdir} and do symlinks
145for 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
149done
150popd
151
152##
153# Desktop stuff
154#
155install -pm 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
156desktop-file-install \
157    --dir %{buildroot}%{_datadir}/applications          \
158    %{SOURCE1}
159
160# clean up docs
161rm -rf __dist_doc
162mkdir __dist_doc
163cp -a doc __dist_doc
164rm __dist_doc/doc/Makefile __dist_doc/doc/*.sgml
165
166%clean
167rm -rf $RPM_BUILD_ROOT
168
169%post
170touch --no-create %{_datadir}/icons/hicolor || :
171if [ -x %{_bindir}/gtk-update-icon-cache ]; then
172   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
173fi
174
175%postun
176touch --no-create %{_datadir}/icons/hicolor || :
177if [ -x %{_bindir}/gtk-update-icon-cache ]; then
178   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
179fi
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
Note: See TracBrowser for help on using the repository browser.