1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
<!--
BEGIN COPYRIGHT BLOCK
Copyright (C) 2007 Red Hat, Inc.
All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation version
2.1 of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
END COPYRIGHT BLOCK
-->
<project name="389-console" default="build" basedir=".">
<!-- Load properties -->
<property file="build.properties"/>
<!-- Paths -->
<property name="built.dir" value="${console.root}/../built"/>
<!-- Prepare -->
<target name="prepare">
<!-- Create directories -->
<mkdir dir="${built.dir}"/>
<!-- Classdest is the location you intend to install the theme jar -->
<property name="classdest" value="/usr/share/java"/>
<!-- Override these properties to use components from other system locations -->
<property name="ldapjdk.local.location" value="/usr/share/java"/>
<property name="jss.local.location" value="/usr/lib/java"/>
<property name="console.local.location" value="/usr/share/java"/>
<property name="lib.dir" value="/usr/lib"/>
<property name="need_libdir" value=""/>
<!-- Verify that the required jars exist -->
<fail message="LDAP JDK (${ldapjdk.jar.name}) does not exist in ${ldapjdk.local.location}">
Please set the correct location with -Dldapjdk.local.location=[path]
<condition>
<not>
<available file="${ldapjdk.local.location}/${ldapjdk.jar.name}"/>
</not>
</condition>
</fail>
<fail message="JSS (${jss.jar.name}) does not exist in ${jss.local.location}">
Please set the correct location with -Djss.local.location=[path]
<condition>
<not>
<available file="${jss.local.location}/${jss.jar.name}"/>
</not>
</condition>
</fail>
<fail message="Console base jar (${console.base.name}.jar) does not exist in ${console.local.location}">
Please set the correct location with -Dconsole.local.location=[path]
<condition>
<not>
<available file="${console.local.location}/${console.base.name}.jar"/>
</not>
</condition>
</fail>
<fail message="Console mcc jar (${console.mcc.name}.jar) does not exist in ${console.local.location}">
Please set the correct location with -Dconsole.local.location=[path]
<condition>
<not>
<available file="${console.local.location}/${console.mcc.name}.jar"/>
</not>
</condition>
</fail>
<fail message="Console nmclf jar (${console.nmclf.name}.jar) does not exist in ${console.local.location}">
Please set the correct location with -Dconsole.local.location=[path]
<condition>
<not>
<available file="${console.local.location}/${console.nmclf.name}.jar"/>
</not>
</condition>
</fail>
</target>
<!-- Build -->
<target name="build" depends="prepare,buildjar,buildscript"/>
<target name="buildnoscript" depends="prepare,buildjar"/>
<target name="buildjar" depends="prepare">
<!-- Create the theme jar file -->
<jar jarfile="${built.dir}/${theme.name}_${lang}.jar" >
<fileset dir="${console.root}">
<include name="com/netscape/management/client/theme/**" />
<exclude name="com/netscape/management/client/theme/**/*.xcf" />
</fileset>
</jar>
</target>
<target name="buildscript" depends="prepare">
<!-- create 389-console script -->
<copy file="389-console" todir="${built.dir}"/>
<replace file="${built.dir}/389-console">
<replacefilter token="@classdest@" value="${classdest}"/>
<replacefilter token="@jssjar@" value="${jss.local.location}/${jss.jar.name}"/>
<replacefilter token="@ldapjdkjar@" value="${ldapjdk.local.location}/${ldapjdk.jar.name}"/>
<replacefilter token="@basejar@" value="${console.base.name}.jar"/>
<replacefilter token="@mccjar@" value="${console.mcc.name}.jar"/>
<replacefilter token="@mcclangjar@" value="${console.mcc.name}_${lang}.jar"/>
<replacefilter token="@nmclfjar@" value="${console.nmclf.name}.jar"/>
<replacefilter token="@nmclflangjar@" value="${console.nmclf.name}_${lang}.jar"/>
<replacefilter token="@themejar@" value="${theme.name}_${lang}.jar"/>
<replacefilter token="@prefsdir@" value="${theme.core}"/>
<replacefilter token="@libdir@" value="${lib.dir}"/>
<replacefilter token="@need_libdir@" value="${need_libdir}"/>
</replace>
</target>
</project>
|