Issue #2033 - pde and rpm build updates

Former-commit-id: dbdb2fc2b0bb6e2354a089fab0ffcaa924c398a1
This commit is contained in:
Bryan Kowal 2013-09-20 12:36:12 -05:00
parent 2c9c5e3597
commit 9a77e3553a
3 changed files with 123 additions and 7 deletions

View file

@ -0,0 +1,80 @@
<project name="Build specific targets and properties" default="noDefault">
<!-- =====================================================================
The Following Properties are available in all targets:
- eclipse.base : the base folder everything will be collected into
- eclipse.plugins : the plugins folder
- eclipse.features: the features folder
- archiveFullPath : the full path of the final archive once it is created
===================================================================== -->
<!-- ===================================================================== -->
<!-- Called after each invocation of the gather.bin.parts target on the -->
<!-- individual plugins and features. -->
<!-- Available properties are: -->
<!-- projectLocation: location of the project being gathered -->
<!-- projectName: symbolic name with version (org.eclipse.foo_1.0.0.v123) -->
<!-- target.folder: the destination, eclipse/plugins or eclipse/features -->
<!-- -->
<!-- The generated pattern is that plugins/features are gathered into the -->
<!-- folder ${target.folder}/${projectName} -->
<!-- ===================================================================== -->
<target name="gather.bin.parts">
<available file="${projectLocation}/localization"
type="dir" property="plugin-etc-present" />
<antcall target="deploy.etc" />
</target>
<target name="deploy.etc" if="plugin-etc-present">
<!-- create the cave etc directory -->
<mkdir dir="${buildDirectory}/etc" />
<copy todir="${buildDirectory}/etc">
<fileset dir="${projectLocation}/localization"
includes="*/**" />
</copy>
</target>
<!-- ===================================================================== -->
<!-- Called after invoking the gather.bin.parts targets for all plugins -->
<!-- and features. Results exist as folders and have not yet been jarred. -->
<!-- ===================================================================== -->
<target name="post.gather.bin.parts">
</target>
<!-- ===================================================================== -->
<!-- Called just prior to signing a jar -->
<!-- In addititon to the properties listed above: -->
<!-- - source : plugins or features directory -->
<!-- - elementName: element being signed without .jar -->
<!-- (eg "org.eclipse.foo_1.0.0" -->
<!-- ===================================================================== -->
<target name="pre.jarSigning">
</target>
<!-- ===================================================================== -->
<!-- Called after all plugins and features have been jarred -->
<!-- (and potentially signed) -->
<!-- ===================================================================== -->
<target name="post.jarUp">
</target>
<!-- ===================================================================== -->
<!-- Called just before the archive file is built -->
<!-- In addititon to the properties listed above: -->
<!-- - rootFolder : the folder containing the root files -->
<!-- ===================================================================== -->
<target name="pre.archive">
</target>
<!-- ===================================================================== -->
<!-- Default target -->
<!-- ===================================================================== -->
<target name="noDefault">
<echo message="You must specify a target when invoking this file" />
</target>
</project>

View file

@ -32,6 +32,9 @@
<!-- Copy The P2 Build build.properties File. -->
<copy tofile="${basedir}/cave/p2/build.properties"
file="${basedir}/build.properties.p2" verbose="true" />
<!-- Copy the P2 Custom Assembly File. -->
<copy tofile="${basedir}/cave/p2/customAssembly.xml"
file="${basedir}/customAssembly.xml.p2" verbose="true" />
<!-- We Will Copy The Plugins Here Eventually. -->
<mkdir dir="${basedir}/cave/p2/plugins" />
@ -413,10 +416,40 @@
</if>
<!-- Package The Repository -->
<mkdir dir="${basedir}/cave/p2/STAGING/awips2" />
<mkdir dir="${basedir}/cave/p2/STAGING/awips2/cave/.repository" />
<mkdir dir="${basedir}/cave/p2/STAGING/awips2/cave/etc" />
<zip
destfile="${basedir}/cave/p2/dist/${feature}-repo-${build.os}.${build.arch}.zip"
destfile="${basedir}/cave/p2/STAGING/awips2/cave/.repository/${feature}-repo-${build.os}.${build.arch}.zip"
basedir="${basedir}/cave/p2/repository" />
<!-- copy etc to STAGING, if it exists -->
<if>
<available file="${basedir}/cave/p2/etc"
type="dir" />
<then>
<copy todir="${basedir}/cave/p2/STAGING/awips2/cave/etc">
<fileset dir="${basedir}/cave/p2/etc"
includes="*/**" />
</copy>
<!-- remove the etc directory -->
<delete includeemptydirs="true">
<fileset dir="${basedir}/cave/p2/etc" />
</delete>
</then>
</if>
<!-- zip the entire distribution -->
<zip
destfile="${basedir}/cave/p2/dist/${feature}-${build.os}.${build.arch}.zip"
basedir="${basedir}/cave/p2/STAGING" />
<delete includeemptydirs="true">
<fileset dir="${basedir}/cave/p2/STAGING" />
</delete>
<!-- Cleanup The Current Build -->
<if>
<available file="${basedir}/cave/p2/I.CAVE" type="dir" />

View file

@ -1,4 +1,5 @@
%define _component_zip_file_name %{_component_feature}-repo-linux.%{_build_arch}.zip
%define _component_zip_file_name %{_component_feature}-linux.%{_build_arch}.zip
%define _component_repo_zip_file_name %{_component_feature}-repo-linux.%{_build_arch}.zip
#
# awips2-cave Spec File
#
@ -41,7 +42,7 @@ if [ -d ${RPM_BUILD_ROOT} ]; then
rm -rf ${RPM_BUILD_ROOT}
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/cave/.repository
mkdir -p ${RPM_BUILD_ROOT}
CAVE_DIST_DIR="%{_baseline_workspace}/rpms/awips2.cave/setup/dist"
if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then
@ -49,8 +50,8 @@ if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then
exit 1
fi
cp ${CAVE_DIST_DIR}/%{_component_zip_file_name} \
${RPM_BUILD_ROOT}/awips2/cave/.repository
unzip ${CAVE_DIST_DIR}/%{_component_zip_file_name} \
-d ${RPM_BUILD_ROOT}
%build
@ -162,7 +163,7 @@ fi
# unzip the repository
cd /awips2/cave/.repository
cleanupUnzip
unzip %{_component_zip_file_name} > /dev/null 2>&1
unzip %{_component_repo_zip_file_name} > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Unzip of repository FAILED."
@ -248,5 +249,7 @@ rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/cave/
/awips2/cave/*
%dir /awips2/cave/.repository
/awips2/cave/.repository/*
/awips2/cave/.repository/*