]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
on the way making package.xml better
authorChristian Weiske <cweiske@cweiske.de>
Sat, 21 Aug 2010 22:57:31 +0000 (00:57 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Sat, 21 Aug 2010 22:57:31 +0000 (00:57 +0200)
build.xml

index 0654a2b1421d2de931d50f40a10fca2aab03b364..6134ad79d244ea616145475e9f9af6e780e3fd69 100644 (file)
--- a/build.xml
+++ b/build.xml
 
      </dependencies>
 
+     <!-- map directory (key) to role -->
      <dirroles key="www">www</dirroles>
      <dirroles key="data">data</dirroles>
      <dirroles key="doc">doc</dirroles>
      <dirroles key="src">php</dirroles>
      <dirroles key="tests">test</dirroles>
 
+     <!-- do not add the following file to the package -->
      <ignore>build*</ignore>
      <ignore>dist</ignore>
      <ignore>doc/developers</ignore>
             <install as="doctrine" name="bin/doctrine" />
             -->
    </d51pearpkg2>
+
+   <!-- time to fix the package.xml file since the task does not
+        allow everything we need:
+        - strip the base directory names like src, data and www
+        - remove that dumb baseinstalldir from files
+        - md5sums are generated automatically when packaging
+   -->
+   <!-- yes, we need to generate a 2nd file and move it back -->
+   <copy file="package.xml" tofile="package2.xml" overwrite="true">
+    <filterchain>
+     <replaceregexp>
+      <!-- remove md5sums -->
+      <regexp
+       pattern="md5sum=&quot;[a-z0-9]{32}&quot; "
+       replace=""
+       />
+      <!-- remove baseinstalldir for files -->
+      <regexp
+       pattern="&lt;file baseinstalldir=&quot;/&quot;"
+       replace="&lt;file"
+       />
+      <!-- install-as for different directories -->
+      <regexp
+       pattern="(&lt;file name=&quot;data/(.+)&quot;)"
+       replace="\1 install-as=&quot;SemanticScuttle/\2&quot;"
+       />
+     </replaceregexp>
+    </filterchain>
+   </copy>
+   <move file="package2.xml" tofile="package.xml" overwrite="true" />
+
    <!-- <tar destfile="${dist.dir}/DoctrineORM-${version_name}.tgz" basedir="${build.dir}/orm" compression="gzip" />-->
 
   </target>