le.name" />
    <attribute name="rpm.command" default="-tb" />

    <sequential>
      <untar
        src="@{rpm.dir}/@{rpm.subfolder}/@{tarball.name}"
        dest="@{rpm.dir}/@{rpm.subfolder}"
        compression="gzip" />

      <copy
        file="${build.base}/@{spec.file.name}"
        tofile="@{rpm.dir}/@{rpm.subfolder}/@{build.subfolder}/rpm.spec"
        overwrite="true" />

      <mkdir
        dir="@{rpm.dir}/@{rpm.subfolder}/@{build.subfolder}/rcfiles" />

      <copy
        file="@{init.file.name}"
        todir="@{rpm.dir}/@{rpm.subfolder}/@{build.subfolder}/rcfiles"
        overwrite="true" />

      <copy
        todir="@{rpm.dir}/@{rpm.subfolder}/@{build.subfolder}"
        overwrite="true" >

        <fileset dir="@{rpm.dir}" >
          <include name="expect/" />
        </fileset>
      </copy>

      <tar
        destfile="${rpm.build.home}/SOURCES/@{tarball.name}"
        compression="gzip"
        longfile="gnu" >

        <tarfileset dir="@{rpm.dir}/@{rpm.subfolder}"
          includes="@{build.subfolder}/"
          excludes="expect/*.*,rcfiles/*.*,**/*.sh,**/*.bat,**/bin/" />

        <tarfileset dir="@{rpm.dir}/@{rpm.subfolder}"
          includes="@{build.subfolder}/expect/*.*,@{build.subfolder}/rcfiles/*.*,@{build.subfolder}/*.sh,@{build.subfolder}/*.bat,**/bin/"
          filemode="755" />

      </tar>

      <delete quiet="true">
        <dirset dir="@{rpm.dir}/@{rpm.subfolder}/@{build.subfolder}" />
        <fileset file="@{rpm.dir}/@{rpm.subfolder}/@{tarball.name}" />
      </delete>

      <rpm
        specFile="../SOURCES/@{tarball.name}"
        topDir="${rpm.build.home}"
        command="@{rpm.command}"
        quiet="true"
        cleanBuildDir="true"
        removeSpec="true"
        removeSource="true"
        failOnError="true"
        error="${top.rpm.dir}/rpm_error.log" />

    </sequential>
  </macrodef>

</project>


/*
Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance wit