Changeset 10197


Ignore:
Timestamp:
2005-06-30T17:12:37+12:00 (19 years ago)
Author:
kjdon
Message:

a bit of mac stuff for mysql

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/build.xml

    r10195 r10197  
    8989    <os family="unix"/>
    9090  </condition>
     91
     92  <condition property="current.os.isunixnotmac">
     93    <and>
     94      <os family="unix"/>
     95      <not>
     96      <os family="mac"/>
     97      </not>
     98    </and>
     99  </condition>
     100  <condition property="current.os.ismac">
     101    <os family="mac"/>
     102  </condition>
     103
    91104  <condition property="current.os.iswindows">
    92105    <os family="windows"/>
    93106  </condition>
     107
    94108  <!-- ============= Base dirs for each package and component ============ -->
    95109  <property name="applet.home" value="${src.home}/org/greenstone/applet"/>
     
    191205  <target name="test-setup">
    192206    <echo>ant java version=${ant.java.version}</echo>
    193     <echo>is linux : ${current.os.isunixx}</echo>
     207    <echo>is linux : ${current.os.isunix}</echo>
     208    <echo>is mac : ${current.os.ismac}</echo>
     209    <echo>is unixnotmac : ${current.os.isunixnotmac}</echo>
    194210    <echo>is windows : ${current.os.iswindows}</echo>
    195211  </target>
     
    555571      <and>
    556572    <isset property="mysql.islocal"/>
    557     <isset property="current.os.isunixx"/>
     573    <isset property="current.os.isunixnotmac"/>
    558574      </and>
    559575    </condition>
    560 
     576    <condition property="mysql.islocal.mac">
     577    <and>
     578    <isset property="mysql.islocal"/>
     579    <isset property="current.os.ismac"/>
     580    </and>
     581    </condition>       
    561582    <condition property="mysql.islocal.windows">
    562583      <and>
     
    567588   </target>
    568589 
    569  <target name="install-mysql" depends="init,init-mysql-vars,install-mysql-linux,install-mysql-windows"/>
     590 <target name="install-mysql" depends="init,init-mysql-vars,install-mysql-linux,install-mysql-windows,install-mysql-mac"/>
    570591 
    571592  <!-- install and set up the database -->
     
    598619  </target>
    599620
     621
     622  <!-- install and set up the database -->
     623  <target name="install-mysql-mac" depends="init,init-mysql-vars" if="mysql.islocal.mac" unless="mysql.present">
     624    <get src="http://www.greenstone.org/gs3files/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
     625      dest="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
     626      usetimestamp="true"/>
     627    <untar src="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
     628      dest="${packages.home}"
     629      compression="gzip"/>
     630    <move todir="${packages.home}/mysql">
     631      <fileset dir="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc"/>
     632    </move>   
     633    <!-- file permissions are screwed up, so make executables executable -->
     634    <chmod file="${mysql.home}/scripts/mysql_install_db" perm="a+x"/>
     635    <chmod perm="a+x">
     636      <fileset dir="${mysql.home}/bin" />
     637    </chmod>
     638    <mkdir dir="${mysql.home}/var/"/>
     639    <mkdir dir="${mysql.home}/var/log/"/>
     640    <chmod file="${mysql.home}/var/" perm="777" type="dir"/>
     641    <chmod file="${mysql.home}/var/log/" perm="777" type="dir"/>
     642    <exec executable="${mysql.home}/scripts/mysql_install_db" dir="${mysql.home}">
     643      <arg value="--datadir=./data"/>
     644      <arg value="--basedir=."/>
     645      <!--<arg value="- -user=root"/>
     646      <arg value="- -force"/>-->
     647    </exec>
     648  </target>
     649
    600650  <target name="install-mysql-windows" depends="init,init-mysql-vars" if="mysql.islocal.windows" unless="mysql.present">
    601651    <get src="http://www.greenstone.org/gs3files/mysql-noinstall-4.1.11-win32.zip"
     
    639689    description="Startup only mysql">
    640690    <exec executable="${mysql.home}/bin/mysqld_safe" dir="${mysql.home}"
    641       spawn="true" os="${os.linux}">
     691      spawn="true" os="${os.linux},${os.mac}">
    642692      <arg value="--user=root"/>
    643693      <arg value="--datadir=./data"/>
     
    663713    description="Shutdown only mysql">
    664714    <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
    665       failonerror="true" os="${os.linux}">
     715      failonerror="true" os="${os.linux},{os.mac}">
    666716      <arg value="--user=root"/>
    667717      <arg value="--socket=/tmp/mysql.sock"/>
Note: See TracChangeset for help on using the changeset viewer.