5307N/A<!--
5307N/A ! CDDL HEADER START
5307N/A !
5307N/A ! The contents of this file are subject to the terms of the
5307N/A ! Common Development and Distribution License, Version 1.0 only
5307N/A ! (the "License"). You may not use this file except in compliance
5307N/A ! with the License.
5307N/A !
6983N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
5307N/A ! or http://forgerock.org/license/CDDLv1.0.html.
5307N/A ! See the License for the specific language governing permissions
5307N/A ! and limitations under the License.
5307N/A !
5307N/A ! When distributing Covered Code, include this CDDL HEADER in each
6983N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6983N/A ! If applicable, add the following below this CDDL HEADER, with the
6983N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6983N/A ! information:
5307N/A ! Portions Copyright [yyyy] [name of copyright owner]
5307N/A !
5307N/A ! CDDL HEADER END
5307N/A !
5307N/A !
5307N/A ! Copyright 2006-2009 Sun Microsystems, Inc.
6360N/A ! Portions Copyright 2010-2013 ForgeRock AS.
5307N/A ! -->
5307N/A
5307N/A<project name="OpenDJ SVR4 layout" basedir=".">
5307N/A <description>
5307N/A This is a build script that extends the OpenDJ build script by adding
5307N/A SVR4 packaging functions.
5307N/A </description>
5758N/A
5307N/A
5307N/A <target name="pkgversion"
5307N/A description="Set svr4.version property" >
5307N/A <!-- Construct the version number string -->
5307N/A <taskdef name="getversionnumber"
5307N/A classname="org.opends.build.tools.CreateVersionString">
5307N/A <classpath>
5307N/A <fileset dir="${build.dir}/build-tools">
5307N/A <include name="*.jar" />
5307N/A </fileset>
5307N/A </classpath>
5307N/A </taskdef>
5307N/A
5307N/A <getversionnumber property="svr4.fullversion" />
5758N/A <property name="svr4.version"
5307N/A value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}" />
5307N/A </target>
5307N/A
5307N/A <property name="resource.dir" location="src/resource" />
5307N/A
5307N/A <!-- Construct layout -->
5758N/A <target name="layout" if="isSunOS"
5307N/A description="Create layout based on zip layout" >
5307N/A <!-- Get the revision number of the current Subversion workspace -->
5307N/A <taskdef name="getsvnrevision"
5307N/A classname="org.opends.build.tools.GetSubversionRevision">
5307N/A <classpath>
5307N/A <fileset dir="${build.dir}/build-tools">
5307N/A <include name="*.jar" />
5307N/A </fileset>
5307N/A <fileset dir="${svnkit.dir}">
5307N/A <include name="*.jar" />
5307N/A </fileset>
5307N/A </classpath>
5307N/A </taskdef>
5307N/A
5758N/A <getsvnrevision property="REVISION_NUMBER" />
5307N/A
5307N/A <property name="zip.dir"
5307N/A location="${package.dir}/${product}-${svr4.fullversion}" />
5758N/A
5758N/A <echo
5307N/A message="Building layout for ${svr4.name} pkg based on ${zip.dir}" />
5307N/A <!-- copy ZIP layout.
5307N/A Use exec instead of copy task to preserve file permissions -->
5307N/A <mkdir dir="${svr4.layout.dir}"/>
5307N/A <exec executable="cp">
5307N/A <arg value="-R"/>
5307N/A <arg value="${zip.dir}"/>
5307N/A <arg value="${svr4.layout.pkg.dir}"/>
5307N/A </exec>
5758N/A <chmod dir="${svr4.layout.pkg.dir}" perm="755"/>
5307N/A <!-- Remove Windows specific files -->
5307N/A <delete includeemptydirs="true">
5307N/A <fileset dir="${svr4.layout.pkg.dir}" includes="**/*.exe"/>
5307N/A <fileset dir="${svr4.layout.pkg.dir}" includes="**/*.bat"/>
5307N/A <fileset dir="${svr4.layout.pkg.dir}" includes="**/bat/"/>
5307N/A </delete>
5307N/A <!-- Remove MacOS specific files -->
5307N/A <delete includeemptydirs="true">
5307N/A <fileset dir="${svr4.layout.pkg.dir}" includes="**/*.app/" />
5307N/A </delete>
5307N/A <!-- Remove uninstall file -->
5307N/A <delete file="${svr4.layout.pkg.dir}/uninstall" />
6360N/A <!-- Add svc-opendj.sh wrapper -->
6360N/A <copy file="${svr4.src.dir}/_svc-opendj.sh"
6360N/A tofile="${svr4.layout.pkg.dir}/lib/_svc-opendj.sh" />
6360N/A <chmod file="${svr4.layout.pkg.dir}/lib/_svc-opendj.sh" perm="755" />
6360N/A <!-- Add the SMF Manifest for OpenDJ in a resources directory -->
6360N/A <mkdir dir="${svr4.layout.pkg.dir}/resources"/>
6360N/A <copy file="${svr4.src.dir}/opendj-manifest.xml"
6360N/A tofile="${svr4.layout.pkg.dir}/resources/opendj-manifest.xml" />
6360N/A <chmod file="${svr4.layout.pkg.dir}/resources/opendj-manifest.xml"
6360N/A perm="644" />
6360N/A <!-- Add man pages -->
6360N/A <copy todir="${svr4.layout.pkg.dir}/man">
6360N/A <fileset dir="${resource.dir}/man"/>
6360N/A </copy>
5307N/A </target>
5307N/A
5307N/A</project>