2012-01-20 13:38:00 -06:00
|
|
|
#
|
2012-08-21 15:27:03 -05:00
|
|
|
# AWIPS II edex-shapefiles Spec File
|
2012-01-20 13:38:00 -06:00
|
|
|
#
|
2012-08-21 15:27:03 -05:00
|
|
|
Name: awips2-edex-shapefiles
|
|
|
|
Summary: AWIPS II Edex
|
2012-01-20 13:38:00 -06:00
|
|
|
Version: %{_component_version}
|
|
|
|
Release: %{_component_release}
|
|
|
|
Group: AWIPSII
|
2012-08-21 15:27:03 -05:00
|
|
|
BuildRoot: %{_build_root}
|
|
|
|
BuildArch: noarch
|
2012-01-20 13:38:00 -06:00
|
|
|
URL: N/A
|
|
|
|
License: N/A
|
|
|
|
Distribution: N/A
|
2015-08-02 10:19:49 -06:00
|
|
|
Vendor: Unidata
|
|
|
|
Packager: Michael James
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
AutoReq: no
|
|
|
|
provides: awips2-edex-shapefiles
|
|
|
|
requires: awips2
|
|
|
|
requires: awips2-edex-base
|
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
# Turn off the brp-python-bytecompile script
|
|
|
|
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
|
|
|
|
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
|
|
|
|
|
2012-01-20 13:38:00 -06:00
|
|
|
%description
|
2012-08-21 15:27:03 -05:00
|
|
|
AWIPS II Edex Shapefiles - includes the shapefiles required by AWIPS II.
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%prep
|
|
|
|
# Verify That The User Has Specified A BuildRoot.
|
2012-08-21 15:27:03 -05:00
|
|
|
if [ "%{_build_root}" = "" ]
|
2012-01-20 13:38:00 -06:00
|
|
|
then
|
2012-08-21 15:27:03 -05:00
|
|
|
echo "ERROR: The RPM Build Root has not been specified."
|
2012-01-20 13:38:00 -06:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
if [ -d %{_build_root} ]; then
|
|
|
|
rm -rf %{_build_root}
|
|
|
|
fi
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
2013-08-07 11:31:07 -05:00
|
|
|
mkdir -p %{_build_root}/awips2/edex/data/utility/edex_static/base/shapefiles
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
AWIPS2_STATIC=%{_awipscm_share}/awips2-static
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
# Determine which version of the shapefiles we should use.
|
2012-08-21 15:27:03 -05:00
|
|
|
COMMON=%{_baseline_workspace}/rpms/common
|
|
|
|
if [ ! -f ${COMMON}/static.versions/LATEST.maps ]; then
|
|
|
|
file ${COMMON}/static.versions/LATEST.maps
|
2012-01-20 13:38:00 -06:00
|
|
|
exit 1
|
|
|
|
fi
|
2012-08-21 15:27:03 -05:00
|
|
|
|
|
|
|
LATEST=`cat ${COMMON}/static.versions/LATEST.maps`
|
|
|
|
if [ $? -ne 0 ]; then
|
2012-01-20 13:38:00 -06:00
|
|
|
exit 1
|
|
|
|
fi
|
2012-08-21 15:27:03 -05:00
|
|
|
SHAPEFILES=${AWIPS2_STATIC}/maps/${LATEST}/shapefiles
|
|
|
|
if [ ! -d ${SHAPEFILES} ]; then
|
|
|
|
file ${SHAPEFILES}
|
2012-01-20 13:38:00 -06:00
|
|
|
exit 1
|
|
|
|
fi
|
2012-08-21 15:27:03 -05:00
|
|
|
|
|
|
|
cp -r ${SHAPEFILES}/* \
|
|
|
|
%{_build_root}/awips2/edex/data/utility/edex_static/base/shapefiles
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit 1
|
2012-01-20 13:38:00 -06:00
|
|
|
fi
|
|
|
|
|
2014-12-17 16:44:06 -05:00
|
|
|
mkdir -p %{_build_root}/awips2/edex/data/utility/edex_static/base/shapefiles/WarnGenLoc
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-02-03 10:12:54 -06:00
|
|
|
|
|
|
|
#create a list of all files packaged for /awips2/edex/data/utility
|
|
|
|
UTILITY=/awips2/edex/data/utility
|
|
|
|
if [ -d %{_build_root}/$UTILITY ]; then
|
|
|
|
cd %{_build_root}/$UTILITY
|
|
|
|
find . -type f > %{_build_root}/awips2/edex/util_filelist.%{name}.txt
|
|
|
|
fi
|
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
%pre
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%post
|
2012-08-21 15:27:03 -05:00
|
|
|
|
2015-02-03 10:12:54 -06:00
|
|
|
|
|
|
|
#change date stamp of utility files
|
|
|
|
UTILITY=/awips2/edex/data/utility
|
|
|
|
UTIL_FILENAME=/awips2/edex/util_filelist.%{name}.txt
|
|
|
|
if [ -d $UTILITY ] && [ -f $UTIL_FILENAME ]; then
|
|
|
|
while read fileName
|
|
|
|
do
|
|
|
|
touch "$UTILITY/$fileName"
|
|
|
|
done < $UTIL_FILENAME
|
|
|
|
rm -f $UTIL_FILENAME
|
|
|
|
fi
|
|
|
|
|
2012-01-20 13:38:00 -06:00
|
|
|
%preun
|
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
%postun
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
|
2012-01-20 13:38:00 -06:00
|
|
|
%files
|
|
|
|
%defattr(775,awips,fxalpha,755)
|
|
|
|
%dir /awips2
|
|
|
|
%dir /awips2/edex
|
2012-02-23 16:46:48 -06:00
|
|
|
/awips2/edex/*
|