Sophie

Sophie

distrib > Mandriva > 9.2 > i586 > by-pkgid > 335009d280daab56f003a51eaf803a36 > files > 1

OpenDX-4.3.0-2mdk.src.rpm

%define samplesname 	dxsamples
%define sver	4.3.0
%define dxdir	%{_libdir}/dx

Name:		OpenDX
Summary:	IBM OpenDX (Data Explorer)

Version:	4.3.0
Release:	2mdk

Source:		http://opendx.npaci.edu/source/dx-4.3.0.tar.bz2
Source1:	http://opendx.npaci.edu/source/dxsamples-4.3.0.tar.bz2
Source2:	icons-dx.tar.bz2
Patch4:		dx-4.2.0-errno.patch.bz2
Patch5:		dx-4.2.0-xkb.patch.bz2
URL:		http://www.opendx.org/
Group:		Sciences/Other
License:	IBM Public License
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  freetype-devel
BuildRequires:	libMesaGLU1-devel
BuildRequires:  libMagick-devel
BuildRequires:  lesstif-devel
BuildRequires:  libjbig-devel
BuildRequires:	libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  netcdf-devel
BuildRequires:	XFree86-devel
%ifnarch ppc
BuildRequires:	HDF
%endif
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
OpenDX is a uniquely powerful, full-featured software package for the
visualization of scientific, engineering and analytical data: Its open
system design is built on a standard interface environments. And its
sophisticated data model provides users with great flexibility in
creating visualizations.

%package devel
Summary:	Development libraries for OpenDX
Group:		Development/C

%description devel
This package contains the header files and includes necessary to for developing
applications with OpenDX.

%prep
%setup -q -n dx-%{version} -a 1
%patch4 -p1 -b .errno
%patch5 -p1 -b .xkb
autoconf

%build
CFLAGS="%optflags -O1 -fno-fast-math -fno-exceptions" \
CXXFLAGS="%optflags -O1 -fno-fast-math -fno-exceptions -Wno-deprecated" \
%configure2_5x --prefix=%{_libdir} \
           --with-x \
	   --with-magick \
	   --with-netcdf \
           --with-jbig \
           --without-javadx
make

(cd %{samplesname}-%{sver}
%configure --prefix=%{_libdir}
%make) 

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir} \
	$RPM_BUILD_ROOT%{_includedir}
%makeinstall prefix=$RPM_BUILD_ROOT%{_libdir} \
	libdir=$RPM_BUILD_ROOT%{dxdir} \
	mandir=$RPM_BUILD_ROOT%{_mandir}
ln -sf %{dxdir}/include/dxconfig.h $RPM_BUILD_ROOT%{_includedir}/dxconfig.h
ln -sf %{dxdir}/include/dxl.h $RPM_BUILD_ROOT%{_includedir}/dxl.h
ln -sf %{dxdir}/include/dx $RPM_BUILD_ROOT%{_includedir}/dx
ln -sf %{dxdir}/lib_linux/libDX.a $RPM_BUILD_ROOT%{_libdir}/libDX.a
ln -sf %{dxdir}/lib_linux/libDXcallm.a $RPM_BUILD_ROOT%{_libdir}/libDXcallm.a
ln -sf %{dxdir}/lib_linux/libDXL.a $RPM_BUILD_ROOT%{_libdir}/libDXL.a
ln -sf %{dxdir}/lib_linux/libDXlite.a $RPM_BUILD_ROOT%{_libdir}/libDXlite.a
rm -rf $RPM_BUILD_ROOT%{dxdir}/man
#
(cd $RPM_BUILD_ROOT/%{dxdir}/html
ln -sf allguide.htm index.htm
ln -sf allguide.htm index.html
)
#
(cd %{samplesname}-%{sver}
make install prefix=$RPM_BUILD_ROOT%{_libdir}
)

mkdir -p $RPM_BUILD_ROOT%{dxdir}/lib
install -m 644 ./lib/mdf2c.awk $RPM_BUILD_ROOT%{dxdir}/lib/

# remove files not packaged
rm -rf $RPM_BUILD_ROOT%{_libdir}/bin/dx

# icons
mkdir -p $RPM_BUILD_ROOT%{_iconsdir} \
	 $RPM_BUILD_ROOT%{_menudir}
tar xjf %{SOURCE2} -C $RPM_BUILD_ROOT%{_iconsdir}

# menu
cat >$RPM_BUILD_ROOT%{_menudir}/OpenDX <<EOF
?package(OpenDX): command="%{_bindir}/dx" needs="X11" \
icon="dx.png" section="Applications/Sciences/Mathematics" title="OpenDX" \
longtitle="Visualization Data Explorer"
EOF

# Clean installed tree
find $RPM_BUILD_ROOT/%_libdir -type f -or -type d | xargs chmod go-w
rm -f $RPM_BUILD_ROOT%{dxdir}/samples/outboard/Makefile_os2 \
	$RPM_BUILD_ROOT%{dxdir}/samples/user/Makefile_os2

rm -f $RPM_BUILD_ROOT/%_libdir/dx/samples/data/externalfilter_alphax
rm -f $RPM_BUILD_ROOT/%_libdir/dx/samples/data/externalfilter_hp700
rm -f $RPM_BUILD_ROOT/%_libdir/dx/samples/data/externalfilter_ibm6000
rm -f $RPM_BUILD_ROOT/%_libdir/dx/samples/data/externalfilter_sgi
rm -f $RPM_BUILD_ROOT/%_libdir/dx/samples/data/externalfilter_solaris

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{update_menus}

%postun
%{clean_menus}

%files
%defattr(-,root,root)
%doc AUTHORS LICENSE README
%dir %{dxdir}
%{_bindir}/*
%{_mandir}/*/*
%{dxdir}/bin
%{dxdir}/bin_linux
%{dxdir}/doc
%{dxdir}/fonts
%{dxdir}/help
%{dxdir}/html
%{dxdir}/lib
%{dxdir}/ui
%{dxdir}/java
%{_iconsdir}/dx.*
%{_liconsdir}/dx.*
%{_miconsdir}/dx.*
%{_menudir}/OpenDX

%files devel
%defattr(-,root,root)
%attr(644,root,root) %{_libdir}/*.a
%doc dxsamples-%{version}/ChangeLog
%{_includedir}/*
%{dxdir}/include
%{dxdir}/samples
%{dxdir}/lib_linux
%{dxdir}/lib/mdf2c.awk

%changelog
* Wed Aug 27 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.3.0-2mdk
- Fixed DIRM distriblint prob.
- Removed unused patches.

* Fri Aug 08 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.3.0-1mdk
- Release 4.3.0.
- Use -O1 for now for gcc 3.3.1.
- Moved samples to devel package.
- Disabled Patch1,2,3,6 as no longer needed.
- Don't use %%make macro on building, otherwise doesn't build.

* Thu Jul 17 2003 David BAUDENS <baudens@mandrakesoft.com> 4.2.0-8mdk
- Rebuild

* Tue Jul 15 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 4.2.0-7mdk
- fix gcc-3.3 build (P6)
- use %%make macro
- fix location of man pages

* Tue Feb 18 2003 Giuseppe Ghibò <ghibo@mandrakesoft.cm> 4.2.0-6mdk
- Added Patch2,3 from cvs (report by Nikos Platis).
- Added Patch4,5 for get compiling under latest glibc and XFree86.

* Sat Nov 30 2002 Stefan van der Eijk <stefan@eijk.nu> 4.2.0-5mdk
- BuildRequires
- Remove files not packaged

* Mon Nov 25 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.2.0-4mdk
- Less verbose %%description.

* Fri Nov 22 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.2.0-3mdk
- Rebuilt against latest ImageMagick.

* Mon Nov 11 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.2.0-2mdk
- Added patch to use stringstreams and not deprecated C++ classes.

* Tue Sep 10 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.2.0-1mdk
- New version: 4.2.0.

* Tue Sep 10 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.3-12mdk
- Added missed file mdf2c.awk (reported by Nikos Platis).

* Wed Aug 28 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.3-11mdk
- Rebuilt against latest netcdf-devel package.

* Wed Aug 14 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.1.3-10mdk
- Automated rebuild with gcc 3.2-0.3mdk

* Thu Jul 25 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.1.3-9mdk
- Automated rebuild with gcc3.2

* Mon Jun  3 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.1.3-8mdk
- Use %%make
- Patch1: ISO C++ fixes
- Patch0: Don't include /usr/include in include search path

* Thu Feb 21 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.3-7mdk
- rebuilt.

* Sat Feb 02 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.3-6mdk
- rebuilt against HDF 4.1r5.

* Thu Jan 24 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.3-5mdk
- fixed icons (png).

* Mon Oct 15 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.3-4mdk
- Rebuilt against latest libpng.

* Thu Sep 06 2001 Stefan van der Eijk <stefan@eijk.nu> 4.1.3-3mdk
- BuildRequires:	flex
- Removed BuildRequires:	zlib-devel

* Wed Aug 01 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.3-2mdk
- added -fno-exceptions to compilation flags (thanks to Randall Hopper).
- forced -O2 due to gcc bug.

* Tue Jun 12 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.3-1mdk
- updated to version 4.1.3.
- cleaned SPEC file.

* Thu Mar 22 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.0-7mdk
- run aclocal/autoconf only for non ix86 architectures.
- added menu entry.

* Sat Mar 17 2001 David BAUDENS <baudens@mandrakesoft.com> 4.1.0-6mdk
- Don't BuildRequires HDF on PPC (HDF doesn't support PPC architecture)
- Use optimizations on PPC

* Fri Mar 16 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 4.1.0-5mdk
- Prefer arch "linux" to arch "alphax", for alpha.
- Re-generate configure with autoconf for each build.

* Mon Feb 26 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.0-4mdk
- add netcdf support.

* Sat Feb 24 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.0-3mdk
- added samples.
- added patches for allowing static building (thanks jloup).
- added mandirs.
- fixed docs.
- split into main and devel package.

* Tue Dec 26 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.0-2mdk
- added netcdf, hdf, cdf support.

* Mon Oct 09 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.0-1mdk
- more macros.
- added patch for ImageMagick.

* Sat Oct 07 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.1.0-0.9mdk
- initial release.