Name: grace
Version: 5.1.19
Release: 4%{?dist}
Summary: Numerical Data Processing and Visualization Tool
License: GPL
# Xbae is BSD and cephes is LGPL, see also Source3 and Source4
URL: http://plasma-gate.weizmann.ac.il/Grace/
Source0: ftp://plasma-gate.weizmann.ac.il/pub/grace/src/grace5/%{name}-%{version}.tar.gz
Source1: %{name}.desktop
Source2: %{name}.png
Source3: cephes-license.email
Source4: LICENSE.cephes
Patch: %{name}-gracerc-no_auxiliary.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Group: Applications/Engineering
BuildRequires: libjpeg-devel, libpng-devel, netcdf-devel
BuildRequires: zlib-devel, fftw2-devel, t1lib-devel
BuildRequires: openmotif-devel, gcc-gfortran
BuildRequires: desktop-file-utils, font-utils
%if "%{fedora}" >= "5"
BuildRequires: libXpm-devel
%else
BuildRequires: xorg-x11-devel
%endif
Requires: nedit
Requires(post): chkfontpath
Requires(postun): chkfontpath
%description
Grace is a Motif application for two-dimensional data visualization.
Grace can transform the data using free equations, FFT, cross- and
auto-correlation, differences, integrals, histograms, and much more. The
generated figures are of high quality. Grace is a very convenient tool
for data inspection, data transformation, and and for making figures for
publications.
%package devel
Summary: Files needed for grace development
Group: Development/Libraries
License: LGPL
Requires: %{name} = %{version}-%{release}
%description devel
Install these files if you need to compile software that requires grace.
%prep
%setup -q
%patch
# remove stripping option to have meaningfull debuginfo packages
sed -i -e 's/^\(.*INSTALL_PROGRAM.*\) -s /\1 /' */Makefile
%build
cp %{SOURCE3} %{SOURCE4} .
%configure \
--enable-editres \
--with-editor=nedit \
--with-printcmd="lpr" \
--enable-grace-home=%{_datadir}/%{name} \
--disable-pdfdrv \
--with-x \
--with-f77=gfortran \
--with-extra-incpath=%{_includedir}/netcdf-3 \
--with-extra-ldpath=%{_libdir}/netcdf-3
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
cp Xbae/LICENSE LICENSE.Xbae
rm -f doc/*.1
mkdir -pm 755 \
%{buildroot}%{_bindir} \
%{buildroot}%{_includedir} \
%{buildroot}%{_libdir} \
%{buildroot}%{_datadir}/pixmaps \
%{buildroot}%{_datadir}/applications \
%{buildroot}%{_mandir}/man1 \
%{buildroot}%{_sysconfdir}/%{name}
##
# Let's have some sanity
#
pushd %{buildroot}%{_datadir}/%{name}
install -pm 755 bin/* %{buildroot}%{_bindir}/
rm -rf bin
ln -s %{_bindir} bin
install -pm 755 lib/* %{buildroot}%{_libdir}/
rm -rf lib
ln -s %{_libdir} lib
install -pm 644 include/* %{buildroot}%{_includedir}/
rm -rf include
ln -s %{_includedir} include
install -pm 644 doc/*.1 %{buildroot}%{_mandir}/man1/
# doc and example directories are removed from GRACE_HOME and put in %doc
rm -rf doc
rm -rf examples
# the convcal source file shouldn't appear in %doc, it is removed here
rm -f auxiliary/convcal.c
# move config files to %{_sysconfdir} and do symlinks
for conf in gracerc templates gracerc.user; do
mv $conf %{buildroot}%{_sysconfdir}/%{name}
ln -s %{_sysconfdir}/%{name}/$conf $conf
done
mv fonts/FontDataBase %{buildroot}%{_sysconfdir}/%{name}
ln -s %{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase
popd
mkfontdir %{buildroot}%{_datadir}/%{name}/fonts/type1
##
# Desktop stuff
#
install -pm 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
desktop-file-install --vendor fedora --delete-original \
--dir %{buildroot}%{_datadir}/applications \
--add-category Application \
--add-category Graphics \
%{buildroot}%{_datadir}/applications/%{name}.desktop
%clean
rm -rf %{buildroot}
%post
%{_sbindir}/chkfontpath -q -a %{_datadir}/%{name}/fonts/type1
%postun
%{_sbindir}/chkfontpath -q -r %{_datadir}/%{name}/fonts/type1
%files
%defattr(-,root,root,-)
%doc ChangeLog CHANGES COPYRIGHT DEVELOPERS LICENSE README LICENSE.Xbae
%doc cephes-license.email LICENSE.cephes
%doc examples/ doc/
%config(noreplace) %{_sysconfdir}/%{name}/
%{_bindir}/*
%{_datadir}/%{name}
%exclude %{_datadir}/%{name}/include
%exclude %{_datadir}/%{name}/lib
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_mandir}/man*/*
%files devel
%defattr(-,root,root,-)
%doc grace_np/LICENSE
%{_includedir}/*
%{_datadir}/%{name}/include
%{_libdir}/*
%{_datadir}/%{name}/lib
%changelog
* Thu Feb 16 2006 Jose' Matos <jamatos@fc.up.pt> - 5.1.19-4
- Remove stripping option from Makefiles to have meaningfull debuginfo packages.
- Thanks to Ville Skyttä for the fix. (bz#180106)
* Thu Feb 16 2006 José Matos <jamatos@fc.up.pt> - 5.1.19-3
- Unify spec file starting from FC-4.
- Rebuild for FC-5.
* Wed Feb 1 2006 José Matos <jamatos@fc.up.pt> - 5.1.19-2
- Update BR from fftw to fftw2.
- Remove references to previous profile scripts.
* Fri Jan 13 2006 José Matos <jamatos@fc.up.pt> - 5.1.19-1
- new upstream version
- remove name from Summary
- disable setting environment variable GRACE_HOME
- replace x11-xorg-devel by libXpm-devel in BuildRequires for FC-5.
* Mon Jan 9 2006 Patrice Dumas <dumas@centre-cired.fr> - 5.1.18-7
- put config files in /etc
- licence is GPL and not BSD/GPL, as it is not dual licensed
* Wed Sep 14 2005 José Matos <jamatos@fc.up.pt> - 5.1.18-6
- Require nedit as an explicit Require.
* Tue Sep 13 2005 José Matos <jamatos@fc.up.pt> - 5.1.18-5
- Normalize buildroot and change default editor to nedit.
* Fri Sep 9 2005 José Matos <jamatos@fc.up.pt> - 5.1.18-4
- Add license to cephes library as well as the original mail where permission is given.
- Move permission of profile.d files from 644 to 755.
* Sat Sep 3 2005 Patrice Dumas <dumas@centre-cired.fr> - 5.1.18-3
- cleanup licences
- put examples/ and doc/ in %%doc
- remove duplicate manpages
- add patch to change fdf2fit path in graderc
* Sun Aug 21 2005 José Matos <jamatos@fc.up.pt> - 5.1.18-2
- Add post and postun requires.
* Sat Aug 20 2005 José Matos <jamatos@fc.up.pt> - 5.1.18-1
- Prepare for Fedora Extras submission, based on a previous spec file
from Konstantin Ryabitsev (icon) and Seth Vidal from duke.edu