awips2/rpms/awips2.core/Installer.notification/component.spec
Shawn.Hooper 0e372cd13e ASM #16805 - Removed references to obsolete license.txt file and renamed Master_Rights_file.pdf
Change-Id: I2b3a021440c834df3505ed11a2883f0fb214a868

Former-commit-id: e29cf5a57591e5a25b6e73b267c0abb46e9f95c2
2014-10-22 14:47:42 -04:00

139 lines
3.4 KiB
RPMSpec

%define _component_name awips2-notification
%define _component_project_dir awips2.core/Installer.notification
%define _component_default_prefix /awips2/notification
%define _cdt_build_loc %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%define _build_arch %(uname -i)
%if %_build_arch == "x86_64"
%define _lib_dir lib64
%else
%define _lib_dir lib
%endif
#
# AWIPS II Notification Spec File
#
%define __prelink_undo_cmd %{nil}
Name: %{_component_name}
Summary: AWIPS II Notification
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
BuildArch: %{_build_arch}
Prefix: %{_component_default_prefix}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: boost >= 1.33.1
requires: awips2-qpid-lib
provides: awips2-notification
%description
AWIPS II Notification Distribution - the AWIPS II Notification application.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
if [ -d ${RPM_BUILD_ROOT} ]; then
rm -rf ${RPM_BUILD_ROOT}
if [ $? -ne 0 ]; then
exit 1
fi
fi
if [ -d %{_cdt_build_loc} ]; then
rm -rf %{_cdt_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
fi
%build
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
{
# $1 == Component Build Root
COMPONENT_BUILD_DIR=${1}
mkdir -p ${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
# Create a Tar file with our FOSS licenses.
tar -cjf %{_baseline_workspace}/rpms/legal/FOSS_licenses.tar \
%{_baseline_workspace}/rpms/legal/FOSS_licenses/
cp "%{_baseline_workspace}/rpms/legal/Master_Rights_File.pdf" \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp %{_baseline_workspace}/rpms/legal/FOSS_licenses.tar \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
rm -f %{_baseline_workspace}/rpms/legal/FOSS_licenses.tar
}
mkdir -p ${RPM_BUILD_ROOT}/awips2/notification
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
if [ $? -ne 0 ]; then
exit 1
fi
BUILD_NATIVE="%{_baseline_workspace}/build.native"
mkdir -p %{_cdt_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null 2>&1
cd ${BUILD_NATIVE}
/bin/bash build-notification.sh %{_baseline_workspace} \
%{_uframe_eclipse} %{_cdt_build_loc} ${RPM_BUILD_ROOT}
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null 2>&1
PROFILE_D_DIR="rpms/awips2.core/Installer.notification/scripts/profile.d"
cp %{_baseline_workspace}/${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
copyLegal "awips2/notification"
%pre
%post
%postun
%clean
rm -rf ${RPM_BUILD_ROOT}
rm -rf %{_cdt_build_loc}
%files
%defattr(644,awips,fxalpha,755)
%attr(755,root,root) /etc/profile.d/awips2Notification.csh
%attr(755,root,root) /etc/profile.d/awips2Notification.sh
%dir /awips2/notification
%dir /awips2/notification/include
/awips2/notification/include/*
%dir /awips2/notification/%{_lib_dir}
/awips2/notification/%{_lib_dir}/*
%docdir /awips2/notification/licenses
%dir /awips2/notification/licenses
/awips2/notification/licenses/*
%dir /awips2/notification/src
/awips2/notification/src/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/notification/bin
/awips2/notification/bin/*