iucar / rpms / ncl

Forked from rpms/ncl 3 years ago
Clone
8720494
Name:           ncl
4376e00
Version:        5.1.1
38cfbd8
Release:        6%{?dist}
8720494
Summary:        NCAR Command Language and NCAR Graphics
8720494
8720494
Group:          Applications/Engineering
8720494
License:        BSD
8720494
URL:            http://www.ncl.ucar.edu
8720494
# You must register for a free account at http://www.earthsystemgrid.org/ before being able to download the source.
4d9c8c2
Source0:        ncl_ncarg_src-%{version}.tar.gz
8720494
Source1:        Site.local.ncl
b941ecd
Source2:        ncarg.csh
b941ecd
Source3:        ncarg.sh
8720494
8720494
# ymake uses cpp with some defines on the command line to generate a 
8720494
# Makefile which consists in:
8720494
#  Template: command line defines
8720494
#  Site.conf
8720494
#  LINUX
8720494
#  Site.conf
8720494
#  Template: generic defaults, including default paths
8720494
#  Project
8720494
#  Rules
8720494
#  yMakefile
8720494
#  Template: some rules
8720494
#
8720494
# install paths are set up in Project. Paths used in code are also in 
8720494
# Project, in NGENV_DESCRIPT.
5a0606c
Patch0:         ncl-5.1.0-paths.patch
8720494
Patch1:         ncarg-4.4.1-deps.patch
4d9c8c2
Patch2:         ncl-5.1.0-ppc64.patch
38cfbd8
# Add needed -lm to ictrans build
38cfbd8
Patch3:         ncl-5.1.1-libs.patch
8720494
Patch7:         ncl-5.0.0-atlas.patch
8720494
# don't have the installation target depends on the build target since
8720494
# for library it implies running ranlib and modifying the library timestamp
8720494
Patch10:        ncl-5.0.0-no_install_dep.patch
8720494
# put install and build rules before script rules such that the default rule
8720494
# is all
8720494
Patch11:        ncl-5.0.0-build_n_scripts.patch
4d9c8c2
Patch12:        ncl-5.1.0-netcdff.patch
4d9c8c2
Patch13:        ncl-5.1.0-includes.patch
08cda3c
# Use /etc/udunits.dat
08cda3c
Patch15:        ncl-5.0.0-udunits.patch
8720494
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
8720494
6c6b513
BuildRequires:  /bin/csh, gcc-gfortran, netcdf-devel
6c6b513
BuildRequires:  hdf-static, hdf-devel >= 4.2r2, libjpeg-devel
013cc2f
BuildRequires:  g2clib-static, g2clib-devel, libnc-dap-devel, librx-devel, atlas-devel
8720494
# imake needed for makedepend
8720494
BuildRequires:  imake, libXt-devel, libXaw-devel, libXext-devel, libXpm-devel
8720494
BuildRequires:  byacc, flex
08cda3c
BuildRequires:  udunits-devel
0ee9afa
Requires:       %{name}-common = %{version}-%{release}
08cda3c
Requires:       udunits
8720494
8720494
Provides:       ncarg = %{version}-%{release}
8720494
Obsoletes:      ncarg < %{version}-%{release}
8720494
8720494
8720494
%description
8720494
The NCAR Command Language (NCL) is a free interpreted language designed
8720494
specifically for scientific data processing and visualization. NCL has robust
8720494
file input and output. It can read and write netCDF-3, netCDF-4 classic (as
8720494
of version 4.3.1), HDF4, binary, and ASCII data, and read HDF-EOS2, GRIB1 and
8720494
GRIB2 (as of version 4.3.0). The graphics are world class and highly
8720494
customizable.
8720494
8720494
As of version 5.0.0, NCL and NCAR Graphics are released as one package.
8720494
8720494
The software comes with a couple of useful command line tools:
8720494
8720494
  * ncl_filedump - prints the contents of supported files (netCDF, HDF,
8720494
    GRIB1, GRIB2, HDF-EOS2, and CCM History Tape)
8720494
  * ncl_convert2nc - converts one or more GRIB1, GRIB2, HDF and/or HDF-EOS
8720494
    files to netCDF formatted files. 
8720494
8720494
0ee9afa
%package common
0ee9afa
Summary:        Common files for NCL and NCAR Graphics
0ee9afa
Group:          Applications/Engineering
0ee9afa
Requires:       %{name} = %{version}-%{release}
4e1cb3c
%if 0%{?fedora} > 9 || 0%{?rhel} > 5
0ee9afa
BuildArch:      noarch
4e1cb3c
%endif
0ee9afa
0ee9afa
%description common
0ee9afa
%{summary}.
0ee9afa
0ee9afa
8720494
%package devel
8720494
Summary:        Development files for NCL and NCAR Graphics
8720494
Group:          Development/Libraries
8720494
Requires:       %{name} = %{version}-%{release}
8720494
Requires:       libXext-devel
8720494
Provides:       ncl-static = %{version}-%{release}
8720494
Provides:       ncarg-devel = %{version}-%{release}
8720494
Obsoletes:      ncarg-devel < %{version}-%{release}
8720494
8720494
%description devel
8720494
%{summary}.
8720494
8720494
8720494
%package examples
8720494
Summary:        Example programs and data using NCL
8720494
Group:          Development/Libraries
8720494
Requires:       %{name}-devel = %{version}-%{release}
4e1cb3c
%if 0%{?fedora} > 9 || 0%{?rhel} > 5
0ee9afa
BuildArch:      noarch
4e1cb3c
%endif
8720494
8720494
%description examples
8720494
Example programs and data using NCL.
8720494
8720494
8720494
%prep
8720494
%setup -q -n ncl_ncarg-%{version}
8720494
%patch0 -p1 -b .paths
8720494
%patch1 -p1 -b .deps
8720494
%patch2 -p1 -b .ppc64
38cfbd8
%patch3 -p1 -b .libs
8720494
%patch7 -p1 -b .atlas
8720494
%patch10 -p1 -b .no_install_dep
8720494
%patch11 -p1 -b .build_n_scripts
8720494
%patch12 -p1 -b .netcdff
fc158c3
%patch13 -p1 -b .includes
485bbdf
%patch15 -p1 -b .udunits
8720494
8720494
#Use ppc config if needed
8720494
%ifarch ppc ppc64
8720494
cp config/LINUX.ppc32.GNU config/LINUX
8720494
%endif
8720494
fc158c3
#Fixup LINUX config (to expose vsnprintf prototype)
fc158c3
sed -i -e '/StdDefines/s/-DSYSV/-D_ISOC99_SOURCE/' config/LINUX
8720494
8720494
#Fixup libdir for atlas lib locations
8720494
sed -i -e s,%LIBDIR%,%{_libdir}, config/Project
8720494
8720494
rm -rf external/blas external/lapack
8720494
8720494
# fix the install directories
8720494
sed -e 's;@prefix@;%{_prefix};' \
8720494
 -e 's;@mandir@;%{_mandir};' \
8720494
 -e 's;@datadir@;%{_datadir};' \
8720494
 -e 's;@libdir@;%{_libdir};' \
8720494
 %{SOURCE1} > config/Site.local
8720494
bb127d4
#Setup the profile scripts
bb127d4
cp %{SOURCE2} %{SOURCE3} .
b941ecd
sed -i -e s,@LIB@,%{_lib},g ncarg.csh ncarg.sh
bb127d4
5a0606c
sed -i -e 's;load "\$NCARG_ROOT/lib/ncarg/nclex\([^ ;]*\);loadscript(ncargpath("nclex") + "\1);' \
8720494
    -e 's;"\$NCARG_ROOT/lib/ncarg/\(data\|database\);ncargpath("\1") + ";' \
5a0606c
    -e 's;\$NCARG_ROOT/lib/ncarg/nclscripts;$NCARG_ROOT/share/ncarg/nclscripts;' \
5a0606c
    `find ni/src -name \*.ncl`
8720494
08cda3c
8720494
%build
8720494
# short-cicuit:
8720494
./config/ymkmf
8720494
8720494
# ./config/ymkmf could be also short circuited, since it does:
8720494
# (cd ./config; make -f Makefile.ini clean all)
8720494
# ./config/ymake -config ./config -Curdir . -Topdir .
8720494
fc158c3
#make Build CCOPTIONS="$RPM_OPT_FLAGS -fPIC -Werror-implicit-function-declaration" F77=gfortran F77_LD=gfortran\
fc158c3
8720494
make Build CCOPTIONS="$RPM_OPT_FLAGS -fPIC" F77=gfortran F77_LD=gfortran\
8720494
 CTOFLIBS="-lgfortran" FCOPTIONS="$RPM_OPT_FLAGS -fPIC -fno-second-underscore -fno-range-check" \
8720494
 COPT= FOPT=
8720494
8720494
8720494
%install
8720494
rm -rf $RPM_BUILD_ROOT
8720494
export NCARG=`pwd`
8720494
make install DESTDIR=$RPM_BUILD_ROOT
bb127d4
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
b941ecd
install -m 0644 ncarg.csh ncarg.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
46c6c87
# database, fontcaps, and graphcaps are arch dependent
46c6c87
mv $RPM_BUILD_ROOT%{_datadir}/ncarg/{database,{font,graph}caps} \
8a08015
   $RPM_BUILD_ROOT%{_libdir}/ncarg/
8720494
# Don't conflict with allegro-devel (generic API names)
8720494
for manpage in $RPM_BUILD_ROOT%{_mandir}/man3/*
8720494
do
8720494
   manname=`basename $manpage`
8720494
   mv $manpage $RPM_BUILD_ROOT%{_mandir}/man3/%{name}_$manname
8720494
done
08cda3c
# Use system udunits
08cda3c
rm -r $RPM_BUILD_ROOT%{_datadir}/ncarg/udunits
8720494
# Remove $RPM_BUILD_ROOT from MakeNcl
8720494
#sed -i -e s,$RPM_BUILD_ROOT,,g $RPM_BUILD_ROOT%{_bindir}/MakeNcl
8720494
8720494
8720494
%clean
8720494
rm -rf $RPM_BUILD_ROOT
8720494
8720494
8720494
%files
8720494
%defattr(-,root,root,-)
8720494
%doc COPYING Copyright README
b941ecd
%{_sysconfdir}/profile.d/ncarg.*sh
8720494
%{_bindir}/ConvertMapData
8720494
%{_bindir}/WriteLineFile
8720494
%{_bindir}/WriteNameFile
8720494
%{_bindir}/WritePlotcharData
8720494
%{_bindir}/cgm2ncgm
8720494
%{_bindir}/ctlib
8720494
%{_bindir}/ctrans
8720494
%{_bindir}/ezmapdemo
8720494
%{_bindir}/fcaps
8720494
%{_bindir}/findg
8720494
%{_bindir}/fontc
8720494
%{_bindir}/gcaps
8720494
%{_bindir}/graphc
8720494
%{_bindir}/ictrans
8720494
%{_bindir}/idt
8720494
%{_bindir}/med
8720494
%{_bindir}/ncargfile
8720494
%{_bindir}/ncargpath
8720494
%{_bindir}/ncargrun
8720494
%{_bindir}/ncargversion
8720494
%{_bindir}/ncargworld
8720494
%{_bindir}/ncarlogo2ps
8720494
%{_bindir}/ncarvversion
8720494
%{_bindir}/ncgm2cgm
8720494
%{_bindir}/ncgmstat
8720494
%{_bindir}/ncl
8720494
%{_bindir}/ncl_convert2nc
8720494
%{_bindir}/ncl_filedump
8720494
%{_bindir}/ncl_grib2nc
8720494
%{_bindir}/nnalg
8720494
%{_bindir}/pre2ncgm
8720494
%{_bindir}/pre2ncgm.prog
8720494
%{_bindir}/psblack
8720494
%{_bindir}/psplit
8720494
%{_bindir}/pswhite
8720494
%{_bindir}/pwritxnt
8720494
%{_bindir}/ras2ccir601
8720494
%{_bindir}/rascat
8720494
%{_bindir}/rasgetpal
8720494
%{_bindir}/rasls
8720494
%{_bindir}/rassplit
8720494
%{_bindir}/rasstat
8720494
%{_bindir}/rasview
8720494
%{_bindir}/tdpackdemo
8720494
%{_bindir}/tgks0a
8720494
%{_bindir}/tlocal
46c6c87
%{_libdir}/ncarg/database/
8a08015
%{_libdir}/ncarg/fontcaps/
8a08015
%{_libdir}/ncarg/graphcaps/
0ee9afa
0ee9afa
%files common
0ee9afa
%defattr(-,root,root,-)
8720494
%dir %{_datadir}/ncarg
8720494
%{_datadir}/ncarg/colormaps/
8720494
%{_datadir}/ncarg/data/
8720494
%{_datadir}/ncarg/grib2_codetables/
8720494
%{_datadir}/ncarg/nclscripts/
8720494
%{_datadir}/ncarg/ngwww/
8720494
%{_datadir}/ncarg/sysresfile/
8720494
%{_datadir}/ncarg/xapp/
8720494
%{_mandir}/man1/*.gz
8720494
%{_mandir}/man5/*.gz
8720494
%{_bindir}/scrip_check_input
8720494
8720494
%files devel
8720494
%defattr(-,root,root,-)
8720494
%{_bindir}/MakeNcl
8720494
%{_bindir}/WRAPIT
8720494
%{_bindir}/ncargcc
8720494
%{_bindir}/ncargf77
8720494
%{_bindir}/ncargf90
8720494
%{_bindir}/nhlcc
8720494
%{_bindir}/nhlf77
8720494
%{_bindir}/nhlf90
8720494
%{_bindir}/wrapit77
8720494
%{_includedir}/ncarg/
8720494
%dir %{_libdir}/ncarg
8720494
%{_libdir}/ncarg/libcgm.a
8720494
%{_libdir}/ncarg/libfftpack5_dp.a
8720494
%{_libdir}/ncarg/libhlu.a
8720494
%{_libdir}/ncarg/libncarg.a
8720494
%{_libdir}/ncarg/libncarg_c.a
8720494
%{_libdir}/ncarg/libncarg_gks.a
8720494
%{_libdir}/ncarg/libncarg_ras.a
8720494
%{_libdir}/ncarg/libncl.a
8720494
%{_libdir}/ncarg/libnclapi.a
8720494
%{_libdir}/ncarg/libngmath.a
8720494
%{_libdir}/ncarg/libnfp.a
8720494
%{_libdir}/ncarg/libnfpfort.a
4376e00
%{_libdir}/ncarg/libnio.a
8720494
%{_libdir}/ncarg/libsphere3.1_dp.a
68ee028
%{_libdir}/ncarg/ncarg/
8720494
%{_mandir}/man3/*.gz
8720494
8720494
%files examples
8720494
%defattr(-,root,root,-)
8720494
%{_bindir}/ncargex
8720494
%{_bindir}/ng4ex
8720494
%{_datadir}/ncarg/examples/
8720494
%{_datadir}/ncarg/hluex/
8720494
%{_datadir}/ncarg/nclex/
8720494
%{_datadir}/ncarg/resfiles/
8720494
%{_datadir}/ncarg/tests/
8720494
%{_datadir}/ncarg/tutorial/
8720494
8720494
8720494
%changelog
38cfbd8
* Tue Feb 16 2010 - Orion Poplawski <orion@cora.nwra.com> - 5.1.1-6
38cfbd8
- Add patch to fix FTBFS bug #564856
38cfbd8
6c6b513
* Tue Dec  8 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 5.1.1-5
6c6b513
- Same as below with hdf-static
013cc2f
- Explicitly BR g2clib-static in accordance with the Packaging
013cc2f
  Guidelines (g2clib-devel is still static-only).
013cc2f
7a6815f
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.1-3
7a6815f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7a6815f
5cccb08
* Thu Jul 23 2009 - Orion Poplawski <orion@cora.nwra.com> - 5.1.1-2
5cccb08
- Rebuild for libdap 3.9.3
5cccb08
4376e00
* Mon Jul 13 2009 - Orion Poplawski <orion@cora.nwra.com> - 5.1.1-1
4376e00
- Update to 5.1.1
4376e00
5a0606c
* Tue Jul 7 2009 - Orion Poplawski <orion@cora.nwra.com> - 5.1.0-4
5a0606c
- Fixup more paths in shipped ncl scripts (bug #505240)
5a0606c
46c6c87
* Tue May 26 2009 - Orion Poplawski <orion@cora.nwra.com> - 5.1.0-3
46c6c87
- Move database back to main arch dependent package
46c6c87
 
8a08015
* Tue May 19 2009 - Orion Poplawski <orion@cora.nwra.com> - 5.1.0-2
8a08015
- Set NCARG_NCARG to /usr/share/ncarg
8a08015
- Move fontcaps and graphcaps back to main arch dependent package
8a08015
4d9c8c2
* Thu Mar 5 2009 - Orion Poplawski <orion@cora.nwra.com> - 5.1.0-1
4d9c8c2
- Update to 5.1.0
4d9c8c2
- Rebase ppc64, netcdff patch
4d9c8c2
- Drop triangle, flex, hdf, png, wrapit, uint32 patch upstreamed
4d9c8c2
0ee9afa
* Tue Feb 24 2009 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-19
0ee9afa
- Rebuild for gcc 4.4.0 and other changes
0ee9afa
- Move data files into noarch sub-package
0ee9afa
- Make examples sub-package noarch
0ee9afa
68ee028
* Mon Feb 2 2009 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-18
68ee028
- Fix unowned directory (bug #483468)
68ee028
c1d2513
* Mon Dec 15 2008 Deji Akingunola <dakingun@gmail.com> - 5.0.0-17
c1d2513
- Rebuild for atlas-3.8.2
c1d2513
bb127d4
* Fri Dec 12 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-16
bb127d4
- Re-add profile.d startup scripts to set NCARG env variables
bb127d4
476e453
* Mon Dec 8 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-15
476e453
- Try changing the udunits path in config/Project
476e453
485bbdf
* Thu Dec 4 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-14
485bbdf
- Actually apply udunits patch
485bbdf
08cda3c
* Thu Nov 27 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-13
08cda3c
- Enable udunits support add use system udunits.dat
08cda3c
f5067aa
* Thu Sep 11 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-12
f5067aa
- Rebuild for new libdap
5858210
- Fix netcdf include location
f5067aa
76e6e52
* Fri Apr 11 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-11
76e6e52
- Add patch to fix raster image problems on non 32-bit platforms
76e6e52
- Add more includes to includes patch
76e6e52
fc158c3
* Thu Mar 27 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-10
fc158c3
- Add patch to fixup some missing includes
fc158c3
- Define _ISOC99_SOURCE to expose vsnprintf prototype
fc158c3
- Update hdf patch to remove hdf/netcdf.h include
fc158c3
8720494
* Mon Feb 18 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-9
8720494
- Rename Site.local to Site.local.ncl
8720494
- Add comment for imake BR
8720494
8720494
* Wed Feb  6 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-8
8720494
- Move examples into separate sub-package
8720494
8720494
* Fri Feb  1 2008 - Patrice Dumas <pertusus@free.fr> - 5.0.0-7
8720494
- put noarch files in datadir
8720494
- avoid compilation in %%install
8720494
8720494
* Mon Jan 14 2008 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-6
8720494
- Make BR hdf-devel >= 4.2r2.
8720494
8720494
* Fri Dec 14 2007 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-5
8720494
- Fixup wrapit flex compilation
8720494
8720494
* Fri Dec 14 2007 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-4
8720494
- Actually get ncl to build
8720494
8720494
* Sun Nov 18 2007 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-3
8720494
- Move robj to -devel
8720494
- Provide ncl-static in ncl-devel
8720494
- Turn on BuildUdunits.  Turn off BuildV5D.
8720494
- Drop config/LINUX patch, use sed
8720494
8720494
* Wed Nov 14 2007 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-2
8720494
- Fixup profile.d script permissions, Group, move aed.a to devel
8720494
8720494
* Tue Nov  6 2007 - Orion Poplawski <orion@cora.nwra.com> - 5.0.0-1
8720494
- Initial ncl package, based on ncarg