Omaha #3508 - created the yajsw rpm

Former-commit-id: 6bd0c60b4c5ba3ff6b424cac04c42728594b4c21
This commit is contained in:
Bryan Kowal 2014-12-04 16:26:29 -06:00
parent e0b9900a50
commit 127db6aaee
3 changed files with 99 additions and 0 deletions

View file

@ -0,0 +1,84 @@
%define _yajsw_version 11.11
#
# AWIPS II YAJSW Spec File
#
Name: awips2-yajsw
Summary: AWIPS II yajsw Distribution
Version: %{_yajsw_version}
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: noarch
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-yajsw
requires: awips2-java
%description
AWIPS II yajsw Distribution - A custom compilation of yajsw ${_yajsw_version} used
by several AWIPS II components.
# disable jar repacking
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
%prep
# Ensure that a "buildroot" has been specified.
if [ "%{_build_root}" = "" ]; then
echo "ERROR: A BuildRoot has not been specified."
echo "FATAL: Unable to Continue ... Terminating."
exit 1
fi
if [ -d %{_build_root} ]; then
rm -rf %{_build_root}
fi
/bin/mkdir -p %{_build_root}
if [ $? -ne 0 ]; then
exit 1
fi
%install
DIST_DIR="%{_baseline_workspace}/foss/yajsw-%{_yajsw_version}/packaged"
YAJSW_SCRIPTS_DIR="%{_baseline_workspace}/rpms/awips2.core/Installer.yajsw/scripts"
YAJSW_ZIP="yajsw-dist.zip"
unzip ${DIST_DIR}/${YAJSW_ZIP} -d %{_build_root}
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p %{_build_root}/etc
if [ $? -ne 0 ]; then
exit 1
fi
cp -rv ${YAJSW_SCRIPTS_DIR}/* %{_build_root}/etc
if [ $? -ne 0 ]; then
exit 1
fi
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2
%dir /awips2/yajsw
/awips2/yajsw/*.jar
/awips2/yajsw/*.txt
%dir /awips2/yajsw/lib
/awips2/yajsw/lib/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/yajsw/scripts
/awips2/yajsw/scripts/*.sh
%attr(744,root,root) /etc/profile.d/*

View file

@ -0,0 +1,11 @@
#!/bin/bash
# Is Yajsw installed?
rpm -q awips2-yajsw > /dev/null 2>&1
if [ $? -ne 0 ]; then
return
fi
YAJSW_INSTALL="/awips2/yajsw"
# Update The Environment
export YAJSW_HOME=${YAJSW_INSTALL}

View file

@ -251,6 +251,10 @@ function lookupRPM()
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.collab-dataserver"
return 0
fi
if [ "${1}" = "awips2-yajsw" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.yajsw"
return 0
fi
# awips2 rpms -> viz rpms.
if [ "${1}" = "awips2-alertviz" ]; then