]> git.pld-linux.org Git - packages/grace.git/blob - grace.spec
- more modyfications for PLD packaging policy.
[packages/grace.git] / grace.spec
1 Summary:        Numerical Data Processing and Visualization Tool (grace)
2 Name:           grace
3 Version:        5.1.0
4 Release:        1
5 License:        GPL
6 Group:          Applications/Math
7 Source0:        ftp://plasma-gate.weizmann.ac.il/pub/grace/src/%{name}-%{version}.tar.gz
8 Source1:        xmgrace
9 Source2:        fftw.tar.gz
10 Patch0:         %{name}.perl.patch
11 Icon:           %{name}.gif
12 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13
14 %description
15 Grace is a Motif application for two-dimensional data visualization. Grace
16 can transform the data using free equations, FFT, cross- and
17 auto-correlation, differences, integrals, histograms, and much more. The
18 generated figures are of high quality. Grace is a very convenient tool for
19 data inspection, data transformation, and and for making figures for
20 publications.
21
22 %package dynamic
23 Group:          Applications/Math
24 Summary:        Numerical Data Processing and Visualization Tool (grace)
25 Provides:       %{name}
26 Conflicts:      %{name}-semistatic
27
28 %description dynamic
29 Grace is a Motif application for two-dimensional data visualization. Grace
30 can transform the data using free equations, FFT, cross- and
31 auto-correlation, differences, integrals, histograms, and much more. The
32 generated figures are of high quality. Grace is a very convenient tool for
33 data inspection, data transformation, and and for making figures for
34 publications.
35
36 %package semistatic
37 Group:          Applications/Math
38 Summary:        grace with statically linked Motif libraries
39 Provides:       %{name}
40 Conflicts:      %{name}-dynamic
41
42 %description semistatic
43 Grace is a Motif application for two-dimensional data visualization. Grace
44 can transform the data using free equations, FFT, cross- and
45 auto-correlation, differences, integrals, histograms, and much more. The
46 generated figures are of high quality. Grace is a very convenient tool for
47 data inspection, data transformation, and and for making figures for
48 publications.
49
50 In this package the Motif libraries are linked statically for users who have
51 no Motif runtime libraries.
52
53 %prep
54 %setup -q
55 %patch0 -p1
56 tar -xzf $RPM_SOURCE_DIR/fftw.tar.gz
57
58 %build
59 %configure
60
61 make
62
63 cd ..
64 rm -rf gd1.3 fftw-1.3
65 ./configure --prefix=/usr/X11R6 --enable-grace-home=/usr/X11R6/lib/X11/grace \
66         --enable-editres \
67         --enable-extra-incpath=$PKG_BUILD_DIR/include \
68         --enable-extra-ldpath=$PKG_BUILD_DIR/lib --enable-debug
69 make
70 cd src
71 rm xmgrace
72 `make -n xmgrace | grep '^gcc' | head -1 | \
73  sed -e 's/\([ \t]\|^\)-lnetcdf\b/\1-Wl,-Bstatic,-lnetcdf,-Bdynamic/g'`
74 mv xmgrace xmgrace.dynamic
75 `make -n xmgrace | grep '^gcc' | head -1 | \
76  sed -e 's/\([ \t]\|^\)-lXm\b/\1-Wl,-Bstatic,-lXm,-Bdynamic/g' \
77      -e 's/\([ \t]\|^\)-lXbae\b/\1-Wl,-Bstatic,-lXbae,-Bdynamic/g' \
78      -e 's/\([ \t]\|^\)-lnetcdf\b/\1-Wl,-Bstatic,-lnetcdf,-Bdynamic/g'`
79 cd ..
80
81 %install
82 if [ "x$RPM_BUILD_ROOT" != "x/" ]; then
83     rm -rf $RPM_BUILD_ROOT
84 fi
85 mkdir -p $RPM_BUILD_ROOT/usr/X11R6/bin
86 make PREFIX=$RPM_BUILD_ROOT/usr/X11R6 \
87      GRACE_HOME=$RPM_BUILD_ROOT/usr/X11R6/lib/X11/grace \
88      install
89 strip $RPM_BUILD_ROOT/usr/X11R6/lib/X11/grace/bin/xmgrace
90 mv $RPM_BUILD_ROOT/usr/X11R6/lib/X11/grace/bin/xmgrace \
91     $RPM_BUILD_ROOT/usr/X11R6/lib/X11/grace/bin/xmgrace.semistatic
92 strip $RPM_BUILD_ROOT/usr/X11R6/lib/X11/grace/bin/grconvert
93 install -s src/xmgrace.dynamic $RPM_BUILD_ROOT/usr/X11R6/lib/X11/grace/bin
94 rm -f $RPM_BUILD_ROOT/usr/X11R6/bin/xmgrace
95 rm -f $RPM_BUILD_ROOT/usr/X11R6/bin/gracebat
96 install -m755 $RPM_SOURCE_DIR/xmgrace $RPM_BUILD_ROOT/usr/X11R6/bin/xmgrace
97 ln -sf /usr/X11R6/bin/xmgrace $RPM_BUILD_ROOT/usr/X11R6/bin/gracebat
98 mkdir -p $RPM_BUILD_ROOT/usr/include
99 ln -sf /usr/X11R6/lib/X11/grace/include/grace_np.h \
100     $RPM_BUILD_ROOT/usr/include/grace_np.h
101 mkdir -p $RPM_BUILD_ROOT/usr/lib
102 ln -sf /usr/X11R6/lib/X11/grace/lib/libgrace_np.a \
103     $RPM_BUILD_ROOT/usr/lib/libgrace_np.a
104
105 cd $RPM_BUILD_ROOT
106 find ./usr/X11R6/lib/X11/grace -type d \
107         | sed 's,^\.,\%attr(-\,root\,root) \%dir ,' \
108         > $RPM_BUILD_DIR/file.list.%{name}
109 find . -type f \
110         | egrep -v 'xmgrace\.(dynamic|semistatic)' \
111         | sed 's,^\.,\%attr(-\,root\,root) ,' \
112         >> $RPM_BUILD_DIR/file.list.%{name}
113 find . -type l \
114         | sed 's,^\.,\%attr(-\,root\,root) ,' \
115         >> $RPM_BUILD_DIR/file.list.%{name}
116
117 %clean
118 if [ "x$RPM_BUILD_ROOT" != "x/" ]; then
119     rm -rf $RPM_BUILD_ROOT
120 fi
121 rm -f $RPM_BUILD_DIR/file.list.%{name}
122
123 %files dynamic -f ../file.list.%{name}
124 /usr/X11R6/lib/X11/grace/bin/xmgrace.dynamic
125
126 %files semistatic -f ../file.list.%{name}
127 /usr/X11R6/lib/X11/grace/bin/xmgrace.semistatic
This page took 0.140951 seconds and 4 git commands to generate.