Skip to content

Commit

Permalink
Fixing phing building and cli for pear install.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwage committed May 26, 2010
1 parent f54dce9 commit 2a24f88
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
4 changes: 2 additions & 2 deletions bin/doctrine.php
Expand Up @@ -2,10 +2,10 @@

require_once 'Doctrine/Common/ClassLoader.php';

$classLoader = new \Doctrine\Common\ClassLoader('Doctrine', __DIR__ . '/../lib');
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
$classLoader->register();

$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . '/../lib/vendor');
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', 'Doctrine');
$classLoader->register();

$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php';
Expand Down
30 changes: 21 additions & 9 deletions build.xml
Expand Up @@ -48,6 +48,13 @@
<include name="Doctrine/ORM/**"/>
</fileset>

<!--
Fileset for source of the Symfony YAML and Console components.
-->
<fileset id="symfony-sources" dir="./lib/vendor">
<include name="Symfony/Components/**"/>
</fileset>

<!--
Fileset for the Doctrine ORM tools + sandbox.
-->
Expand Down Expand Up @@ -91,12 +98,15 @@
<fileset refid="shared-artifacts"/>
<fileset refid="orm-tools"/>
</copy>
<copy todir="${build.dir}/orm/DoctrineORM-${version}">
<copy todir="${build.dir}/orm">
<fileset refid="common-sources"/>
<fileset refid="dbal-sources"/>
<fileset refid="orm-sources"/>
</copy>
<copy todir="${build.dir}/orm/DoctrineORM-${version}/bin">
<copy todir="${build.dir}/orm/Doctrine">
<fileset refid="symfony-sources"/>
</copy>
<copy todir="${build.dir}/orm/bin">
<fileset refid="bin-scripts"/>
</copy>
</target>
Expand Down Expand Up @@ -160,16 +170,18 @@
<php minimum_version="5.3.0" />
<pear minimum_version="1.6.0" recommended_version="1.6.1" />
</dependencies>
<dirroles key="DoctrineORM-${version}/bin">script</dirroles>
<replacement path="DoctrineORM-${version}/bin/doctrine" type="pear-config" from="@php_bin@" to="php_bin" />
<replacement path="DoctrineORM-${version}/bin/doctrine.php" type="pear-config" from="@php_bin@" to="php_bin" />
<replacement path="DoctrineORM-${version}/bin/doctrine.php" type="pear-config" from="@bin_dir@" to="bin_dir" />
<dirroles key="bin">script</dirroles>
<replacement path="bin/doctrine" type="pear-config" from="@php_bin@" to="php_bin" />
<replacement path="bin/doctrine.php" type="pear-config" from="@php_bin@" to="php_bin" />
<replacement path="bin/doctrine.php" type="pear-config" from="@bin_dir@" to="bin_dir" />
<release>
<install as="doctrine" name="DoctrineORM-${version}/bin/doctrine" />
<install as="doctrine.php" name="DoctrineORM-${version}/bin/doctrine.php" />
<install as="doctrine" name="bin/doctrine" />
<install as="doctrine.php" name="bin/doctrine.php" />
</release>
</d51pearpkg2>
<tar destfile="${dist.dir}/DoctrineORM-${version_name}.tgz" basedir="${build.dir}/orm" compression="gzip" />
<exec command="pear package" dir="${build.dir}/orm" passthru="true" />
<exec command="cp DoctrineORM-${version}.tgz ../../dist/DoctrineORM-${version_name}.tgz" dir="${build.dir}/orm" passthru="true" />
<!--<tar destfile="${dist.dir}/DoctrineORM-${version_name}.tgz" basedir="${build.dir}/orm" compression="gzip" />-->
</target>

</project>

0 comments on commit 2a24f88

Please sign in to comment.