Skip to content

Commit

Permalink
Moved installation dir to /opt.
Browse files Browse the repository at this point in the history
  • Loading branch information
endisd committed Nov 18, 2008
1 parent f8a6d70 commit ff75494
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 72 deletions.
18 changes: 9 additions & 9 deletions client/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<property name="module.name" value="penrose-client"/>

<property name="prefix" value=""/>
<property name="install.dir" value="${prefix}/usr/local/${module.name}-${product.version}"/>
<property name="client.home" value="${prefix}/opt/${module.name}-${product.version}"/>
<property name="docs.target" value="dist/javadoc"/>

<tstamp>
Expand Down Expand Up @@ -349,37 +349,37 @@
</target>

<target name="pre-install">
<mkdir dir="${install.dir}"/>
<mkdir dir="${client.home}"/>
<condition property="conf.missing">
<not>
<available file="${install.dir}/conf/log4j.xml"/>
<available file="${client.home}/conf/log4j.xml"/>
</not>
</condition>
</target>

<target name="copy-penrose-conf" if="conf.missing">
<copy todir="${install.dir}">
<copy todir="${client.home}">
<fileset dir="target/dist">
<include name="conf/**/*"/>
</fileset>
</copy>
</target>

<target name="install" depends="init,pre-install,copy-penrose-conf">
<mkdir dir="${install.dir}"/>
<mkdir dir="${client.home}"/>
<delete failonerror="false">
<fileset dir="${install.dir}">
<fileset dir="${client.home}">
<include name="lib/*"/>
</fileset>
</delete>
<copy todir="${install.dir}">
<copy todir="${client.home}">
<fileset dir="target/dist">
<include name="**/*"/>
<exclude name="conf/**/*"/>
</fileset>
</copy>
<chmod dir="${install.dir}" perm="ugo+rw" includes="**/*"/>
<chmod dir="${install.dir}" perm="ugo+rx" includes="**/*.sh"/>
<chmod dir="${client.home}" perm="ugo+rw" includes="**/*"/>
<chmod dir="${client.home}" perm="ugo+rx" includes="**/*.sh"/>
</target>

<target name="clean">
Expand Down
1 change: 0 additions & 1 deletion core/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

<property name="project.dist" value="../dist"/>

<property name="penrose.home" value="${prefix}/usr/local/${product.name}-${product.version}"/>
<property name="docs.target" value="${project.dist}/javadoc"/>

<tstamp>
Expand Down
8 changes: 3 additions & 5 deletions monitors/JMX/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<property name="monitor.title" value="JMX"/>
<property name="monitor.dir" value="monitors/${monitor.title}"/>

<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
</tstamp>
Expand Down Expand Up @@ -97,13 +95,13 @@
<target name="check-install">
<condition property="config.missing">
<not>
<available file="${penrose.home}/${monitor.dir}/MONITOR-INF/monitor.xml"/>
<available file="${server.home}/${monitor.dir}/MONITOR-INF/monitor.xml"/>
</not>
</condition>
</target>

<target name="install-config" if="config.missing">
<copy todir="${penrose.home}/${monitor.dir}">
<copy todir="${server.home}/${monitor.dir}">
<fileset dir="../../server/target/dist/${monitor.dir}">
<include name="MONITOR-INF/monitor.xml"/>
</fileset>
Expand All @@ -114,7 +112,7 @@
</target>

<target name="install" depends="init,check-install,install-config">
<copy todir="${penrose.home}/${monitor.dir}" overwrite="true">
<copy todir="${server.home}/${monitor.dir}" overwrite="true">
<fileset dir="../../server/target/dist/${monitor.dir}">
<exclude name="MONITOR-INF/monitor.xml"/>
</fileset>
Expand Down
8 changes: 3 additions & 5 deletions monitors/LDAP/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<property name="monitor.title" value="LDAP"/>
<property name="monitor.dir" value="monitors/${monitor.title}"/>

<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
</tstamp>
Expand Down Expand Up @@ -93,13 +91,13 @@
<target name="check-install">
<condition property="config.missing">
<not>
<available file="${penrose.home}/${monitor.dir}/MONITOR-INF/monitor.xml"/>
<available file="${server.home}/${monitor.dir}/MONITOR-INF/monitor.xml"/>
</not>
</condition>
</target>

<target name="install-config" if="config.missing">
<copy todir="${penrose.home}/${monitor.dir}">
<copy todir="${server.home}/${monitor.dir}">
<fileset dir="../../server/target/dist/${monitor.dir}">
<include name="MONITOR-INF/monitor.xml"/>
</fileset>
Expand All @@ -110,7 +108,7 @@
</target>

<target name="install" depends="init,check-install,install-config">
<copy todir="${penrose.home}/${monitor.dir}" overwrite="true">
<copy todir="${server.home}/${monitor.dir}" overwrite="true">
<fileset dir="../../server/target/dist/${monitor.dir}">
<exclude name="MONITOR-INF/monitor.xml"/>
</fileset>
Expand Down
1 change: 0 additions & 1 deletion monitors/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<property file="../build.properties"/>

<property name="prefix" value=""/>
<property name="penrose.home" value="${prefix}/usr/local/${product.name}-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
Expand Down
1 change: 0 additions & 1 deletion samples/ad_sync/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<property file="../../build.properties"/>

<property name="prefix" value=""/>
<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
Expand Down
3 changes: 1 addition & 2 deletions samples/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<property file="../build.properties"/>

<property name="prefix" value=""/>
<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
Expand Down Expand Up @@ -70,7 +69,7 @@
</target>

<target name="install" depends="init">
<copy todir="${penrose.home}/samples" overwrite="true">
<copy todir="${server.home}/samples" overwrite="true">
<fileset dir="../server/target/dist/samples"/>
</copy>
</target>
Expand Down
1 change: 0 additions & 1 deletion samples/changelog/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<property file="../../build.properties"/>

<property name="prefix" value=""/>
<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
Expand Down
1 change: 0 additions & 1 deletion samples/federation/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<property file="../../build.properties"/>

<property name="prefix" value=""/>
<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
Expand Down
1 change: 0 additions & 1 deletion samples/jboss/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
-->
<project name="penrose-jboss" default="build" basedir="../..">

<property name="penrose.home" value="${basedir}"/>
<property name="jboss.home" value="/usr/local/jboss"/>
<property name="jboss.server" value="default"/>
<property name="jboss.deploy" value="${jboss.home}/server/${jboss.server}/deploy"/>
Expand Down
1 change: 0 additions & 1 deletion samples/jdbc_sync/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<property file="../../build.properties"/>

<property name="prefix" value=""/>
<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
Expand Down
1 change: 0 additions & 1 deletion samples/ldap_sync/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<property file="../../build.properties"/>

<property name="prefix" value=""/>
<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
Expand Down
1 change: 0 additions & 1 deletion samples/lockout/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<property file="../../build.properties"/>

<property name="prefix" value=""/>
<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
Expand Down
2 changes: 1 addition & 1 deletion samples/tomcat/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<servlet-class>org.safehaus.penrose.example.tomcat.DemoServlet</servlet-class>
<init-param>
<param-name>penrose.home</param-name>
<param-value>${penrose.home}</param-value>
<param-value>${penrose.server.home}</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
Expand Down
1 change: 0 additions & 1 deletion samples/tomcat/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
-->
<project name="penrose-tomcat" default="build" basedir="../..">

<property name="penrose.home" value="${basedir}"/>
<property name="tomcat.home" value="/usr/local/tomcat"/>
<property name="webapp.name" value="penrose"/>
<property name="webapp.dir" value="${tomcat.home}/webapps/${webapp.name}"/>
Expand Down
33 changes: 17 additions & 16 deletions server/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<property name="module.name" value="${product.name}-server"/>
<property name="project.dist" value="dist"/>

<property name="penrose.home" value="${prefix}/usr/local/${module.name}-${product.version}"/>
<property name="server.home" value="${prefix}/opt/${module.name}-${product.version}"/>

<property name="docs.target" value="dist/javadoc"/>

<tstamp>
Expand Down Expand Up @@ -441,25 +442,25 @@
</target>

<target name="check-install">
<mkdir dir="${penrose.home}"/>
<mkdir dir="${server.home}"/>
<condition property="penrose.conf.missing">
<not>
<available file="${penrose.home}/conf/server.xml"/>
<available file="${server.home}/conf/server.xml"/>
</not>
</condition>
</target>

<target name="install-conf" if="penrose.conf.missing">
<echo message="Installing configuration files."/>
<copy todir="${penrose.home}">
<copy todir="${server.home}">
<fileset dir="target/dist">
<include name="conf/**/*"/>
</fileset>
</copy>
</target>

<target name="install" depends="init,check-install,install-conf">
<copy todir="${penrose.home}" overwrite="true">
<copy todir="${server.home}" overwrite="true">
<fileset dir="target/dist">
<exclude name="conf/**/*"/>
<exclude name="samples/**/*"/>
Expand All @@ -470,12 +471,12 @@
</fileset>
</copy>
<delete failonerror="true">
<fileset dir="${penrose.home}">
<fileset dir="${server.home}">
<include name="lib/*"/>
<include name="server/lib/*"/>
</fileset>
</delete>
<copy todir="${penrose.home}" overwrite="true">
<copy todir="${server.home}" overwrite="true">
<fileset dir="target/dist">
<include name="lib/*"/>
<include name="server/lib/*"/>
Expand All @@ -484,19 +485,19 @@
<ant dir="../monitors" target="install"/>
<ant dir="../services" target="install"/>
<ant dir="../samples" target="install"/>
<chmod dir="${penrose.home}" perm="ugo+rw" includes="**/*"/>
<chmod dir="${penrose.home}" perm="ugo+rx" includes="**/*.sh"/>
<chmod dir="${server.home}" perm="ugo+rw" includes="**/*"/>
<chmod dir="${server.home}" perm="ugo+rx" includes="**/*.sh"/>
</target>

<target name="uninstall" depends="init">
<delete failonerror="false" includeemptydirs="true">
<fileset dir="${penrose.home}/bin" includes="**/*"/>
<fileset dir="${penrose.home}/conf/default" includes="*"/>
<fileset dir="${penrose.home}/docs" includes="**/*"/>
<fileset dir="${penrose.home}/lib" includes="*"/>
<fileset dir="${penrose.home}/samples" includes="**/*"/>
<fileset dir="${penrose.home}/schema" includes="**/*"/>
<fileset dir="${penrose.home}" includes="*"/>
<fileset dir="${server.home}/bin" includes="**/*"/>
<fileset dir="${server.home}/conf/default" includes="*"/>
<fileset dir="${server.home}/docs" includes="**/*"/>
<fileset dir="${server.home}/lib" includes="*"/>
<fileset dir="${server.home}/samples" includes="**/*"/>
<fileset dir="${server.home}/schema" includes="**/*"/>
<fileset dir="${server.home}" includes="*"/>
</delete>
</target>

Expand Down
8 changes: 3 additions & 5 deletions services/ApacheDS/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<property name="service.title" value="ApacheDS"/>
<property name="service.dir" value="services/${service.title}"/>

<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
</tstamp>
Expand Down Expand Up @@ -103,13 +101,13 @@
<target name="check-install">
<condition property="config.missing">
<not>
<available file="${penrose.home}/${service.dir}/SERVICE-INF/service.xml"/>
<available file="${server.home}/${service.dir}/SERVICE-INF/service.xml"/>
</not>
</condition>
</target>

<target name="install-config" if="config.missing">
<copy todir="${penrose.home}/${service.dir}">
<copy todir="${server.home}/${service.dir}">
<fileset dir="../../server/target/dist/${service.dir}">
<include name="SERVICE-INF/service.xml"/>
</fileset>
Expand All @@ -120,7 +118,7 @@
</target>

<target name="install" depends="init,check-install,install-config">
<copy todir="${penrose.home}/${service.dir}" overwrite="true">
<copy todir="${server.home}/${service.dir}" overwrite="true">
<fileset dir="../../server/target/dist/${service.dir}">
<exclude name="SERVICE-INF/service.xml"/>
</fileset>
Expand Down
2 changes: 1 addition & 1 deletion services/ApacheDS/conf/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<beans>

<bean id="penroseServer" class="org.safehaus.penrose.server.PenroseServer">
<constructor-arg><value>${penrose.home}</value></constructor-arg>
<constructor-arg><value>${penrose.server.home}</value></constructor-arg>
</bean>

<bean id="penroseInterceptor" class="org.safehaus.penrose.ldapbackend.apacheds.LDAPBackendInterceptor">
Expand Down
8 changes: 3 additions & 5 deletions services/JMX/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<property name="service.title" value="JMX"/>
<property name="service.dir" value="services/${service.title}"/>

<property name="penrose.home" value="${prefix}/usr/local/penrose-server-${product.version}"/>

<tstamp>
<format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
</tstamp>
Expand Down Expand Up @@ -101,13 +99,13 @@
<target name="check-install">
<condition property="config.missing">
<not>
<available file="${penrose.home}/${service.dir}/SERVICE-INF/service.xml"/>
<available file="${server.home}/${service.dir}/SERVICE-INF/service.xml"/>
</not>
</condition>
</target>

<target name="install-config" if="config.missing">
<copy todir="${penrose.home}/${service.dir}">
<copy todir="${server.home}/${service.dir}">
<fileset dir="../../server/target/dist/${service.dir}">
<include name="SERVICE-INF/service.xml"/>
</fileset>
Expand All @@ -118,7 +116,7 @@
</target>

<target name="install" depends="init,check-install,install-config">
<copy todir="${penrose.home}/${service.dir}" overwrite="true">
<copy todir="${server.home}/${service.dir}" overwrite="true">
<fileset dir="../../server/target/dist/${service.dir}">
<exclude name="SERVICE-INF/service.xml"/>
</fileset>
Expand Down
Loading

0 comments on commit ff75494

Please sign in to comment.