| | 401 | <target name="dist.debian" depends="prepare.version, dist.sources, dist.docs"> |
|---|
| | 402 | <property name="dist.debian.dir" value="dist/debian/${project.fullname}"/> |
|---|
| | 403 | <copy todir="${dist.debian.dir}"> |
|---|
| | 404 | <fileset dir="dist/sources"/> |
|---|
| | 405 | </copy> |
|---|
| | 406 | <copy todir="${dist.debian.dir}/debian"> |
|---|
| | 407 | <fileset dir="debian"/> |
|---|
| | 408 | </copy> |
|---|
| | 409 | <chmod perm="+x"> |
|---|
| | 410 | <fileset dir="${dist.debian.dir}/debian"> |
|---|
| | 411 | <include name="rules"/> |
|---|
| | 412 | <include name="ant"/> |
|---|
| | 413 | </fileset> |
|---|
| | 414 | </chmod> |
|---|
| | 415 | <exec executable="debchange" dir="${dist.debian.dir}"> |
|---|
| | 416 | <arg line="--newversion ${project.version}-0"/> |
|---|
| | 417 | <arg line="New upstream release"/> |
|---|
| | 418 | </exec> |
|---|
| | 419 | <copy todir="${dist.debian.dir}/docs"> |
|---|
| | 420 | <fileset dir="dist/docs"> |
|---|
| | 421 | <exclude name="**/.touch" /> |
|---|
| | 422 | <exclude name="xref/**" /> |
|---|
| | 423 | <exclude name="api/**" /> |
|---|
| | 424 | </fileset> |
|---|
| | 425 | </copy> |
|---|
| | 426 | </target> |
|---|
| | 427 | |
|---|
| 453 | | |
|---|
| 454 | | <target name="export.debian" depends="export.debian.changelog, dist, dist.docs"> |
|---|
| 455 | | <exec executable="fakeroot" failonerror="true"> |
|---|
| 456 | | <arg line="./debian/rules binary"/> |
|---|
| 457 | | </exec> |
|---|
| 458 | | <exec executable="sed" outputproperty="export.debian.changelog.version" failonerror="true"> |
|---|
| 459 | | <arg line="-n '1 s/freecast (\(.*\)).*/\1/p'"/> |
|---|
| 460 | | <arg file="debian/changelog"/> |
|---|
| 461 | | </exec> |
|---|
| 462 | | <echo message="${export.debian.changelog.version}"/> |
|---|
| 463 | | <move file="../freecast_${export.debian.changelog.version}_all.deb" todir="export"/> |
|---|
| 464 | | </target> |
|---|
| 465 | | |
|---|
| 466 | | <target name="export.debian.clean"> |
|---|
| 467 | | <exec executable="fakeroot" failonerror="true"> |
|---|
| 468 | | <arg line="./debian/rules clean"/> |
|---|
| 469 | | </exec> |
|---|
| 470 | | </target> |
|---|
| 471 | | |
|---|
| 472 | | <target name="export.debian.changelog.check" depends="prepare.version"> |
|---|
| 473 | | <exec executable="sed" outputproperty="export.debian.changelog.currentversion" failonerror="true"> |
|---|
| 474 | | <arg line="-n '1 s/freecast (\(.*\)).*/\1/p'"/> |
|---|
| 475 | | <arg file="debian/changelog"/> |
|---|
| 476 | | </exec> |
|---|
| 477 | | |
|---|
| 478 | | <condition property="export.debian.changelog.notRequired"> |
|---|
| 479 | | <contains string="${export.debian.changelog.currentversion}" substring="${project.version}"/> |
|---|
| 480 | | </condition> |
|---|
| 481 | | </target> |
|---|
| 482 | | |
|---|
| 483 | | <target name="export.debian.changelog" unless="export.debian.changelog.notRequired" depends="export.debian.changelog.check"> |
|---|
| 484 | | <tempfile property="export.debian.changelog.append"/> |
|---|
| 485 | | <tstamp> |
|---|
| 486 | | <format property="export.debian.changelog.date" pattern="EEE, dd MMM yyyy hh:mm:ss Z"/> |
|---|
| 487 | | </tstamp> |
|---|
| 488 | | <copy tofile="${export.debian.changelog.append}" file="debian/changelog.template"> |
|---|
| 489 | | <filterset> |
|---|
| 490 | | <filter token="project.version" value="${project.version}" /> |
|---|
| 491 | | <filter token="date" value="${export.debian.changelog.date}" /> |
|---|
| 492 | | </filterset> |
|---|
| 493 | | </copy> |
|---|
| 494 | | |
|---|
| 495 | | <exec executable="cat" failonerror="true"> |
|---|
| 496 | | <arg value="${export.debian.changelog.append}"/> |
|---|
| 497 | | </exec> |
|---|
| 498 | | |
|---|
| 499 | | <tempfile property="export.debian.changelog.output"/> |
|---|
| 500 | | <concat destfile="${export.debian.changelog.output}"> |
|---|
| 501 | | <fileset file="${export.debian.changelog.append}"/> |
|---|
| 502 | | <filelist dir="${basedir}" files="debian/changelog"/> |
|---|
| 503 | | </concat> |
|---|
| 504 | | |
|---|
| 505 | | <copy tofile="debian/changelog" file="${export.debian.changelog.output}"/> |
|---|
| 506 | | |
|---|
| 507 | | <delete file="${export.debian.changelog.output}"/> |
|---|
| 508 | | <delete file="${export.debian.changelog.append}"/> |
|---|
| 509 | | </target> |
|---|
| 510 | | |
|---|
| | 480 | |
|---|
| | 481 | <target name="export.debian.check"> |
|---|
| | 482 | <uptodate property="export.debian.notRequired" targetfile="export/debian/.touch"> |
|---|
| | 483 | <srcfiles dir="${dist.debian.dir}"/> |
|---|
| | 484 | </uptodate> |
|---|
| | 485 | </target> |
|---|
| | 486 | |
|---|
| | 487 | <target name="export.debian" depends="dist.debian, export.debian.check" unless="export.debian.notRequired"> |
|---|
| | 488 | <exec executable="dpkg-buildpackage" dir="${dist.debian.dir}" failonerror="true"> |
|---|
| | 489 | <arg line="-rfakeroot -I.svn"/> |
|---|
| | 490 | </exec> |
|---|
| | 491 | <copy todir="export/debian"> |
|---|
| | 492 | <fileset dir="dist/debian"> |
|---|
| | 493 | <include name="freecast_${project.version}*"/> |
|---|
| | 494 | </fileset> |
|---|
| | 495 | </copy> |
|---|
| | 496 | <touch file="export/debian/.touch"/> |
|---|
| | 497 | </target> |
|---|
| | 498 | |
|---|