summaryrefslogtreecommitdiffstats
path: root/pki/base/config/release.xml
blob: e527ce41a6e7a2075709027b72eecaa40d195722 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!-- ### BEGIN COPYRIGHT BLOCK ###
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; version 2 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along
  with this program; if not, write to the Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

  Copyright (C) 2007 Red Hat, Inc.
  All rights reserved.
     ### END COPYRIGHT BLOCK ### -->
<project name="release.xml" default="main" basedir="${basedir}">

    <echo message="Importing shared properties ..."/>
    <import file="product.xml"/>
    <import file="product-ext.xml" optional="true"/>
    <import file="release-ext.xml" optional="true"/>
    <echo message="Completed importing shared properties."/>


    <target name="local"
            depends=""
            description="--> Generate this target locally">
        <echo message="Generating the '${product.name}' target locally ..."/>
        <exec executable="ant" dir="${release.root}">
            <arg value="-Dproduct.ui.flavor.prefix=${product.ui.flavor.prefix}"/>
            <arg value="-Dproduct.prefix=${product.prefix}"/>
            <arg value="-Dproduct=${product}"/>
            <arg value="-Dversion=${version}"/>
            <arg value="-Dspecfile=${product.name}.spec"/>
            <arg value="-Ddirsec=${dirsec}"/>
            <arg value="${target}"/>
        </exec>
        <echo message="Completed generating the '${product.name}' target locally."/>
    </target>


    <target name="main"
            depends=""
            description="--> Generate component RPMS and SRPMS">
        <echo message="Generating '${product.name}' RPMS and SRPMS ..."/>

        <exec executable="pwd"
              failonerror="true"
              outputproperty="top.dir"/>
        <echo message="Established the '${top.dir}' top-level directory."/>

        <echo message="Creating the '${product.name}' source distribution ..."/>
        <exec executable="ant"
              dir="${release.root}">
            <arg value="-Dproduct.ui.flavor.prefix=${product.ui.flavor.prefix}"/>
            <arg value="-Dproduct.prefix=${product.prefix}"/>
            <arg value="-Dproduct=${product}"/>
            <arg value="-Dversion=${version}"/>
            <arg value="-Dspecfile=${product.name}.spec"/>
            <arg value="-Ddirsec=${dirsec}"/>
            <arg value="distribute_source"/>
        </exec>
        <echo message="Completed creating the '${product.name}' source distribution."/>

        <echo message="Creating '${product.name}' RPM directories ..."/>
        <mkdir dir="${release.root}/dist/rpmpkg"/>
        <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/>
        <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/>
        <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/>
        <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/>
        <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/>
        <echo message="Completed creating '${product.name}' RPM directories."/>

        <echo message="Building '${product.name}' RPMS and SRPMS ..."/>
        <exec executable="rpmbuild"
              dir="${release.root}">
            <arg value="--define"/>
            <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/>
            <arg value="--define"/>
            <arg value="rhel ${rhel}"/>
            <arg value="-ta"/>
            <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/>
        </exec>
        <echo message="Completed building '${product.name}' RPMS and SRPMS."/>

        <echo message="Removing various '${product.name}' RPM directories and files ..."/>
        <delete dir="${release.root}/dist/rpmpkg/BUILD"/>
        <echo message="Completed removing various '${product.name}' RPM directories and files."/>

        <echo message="Completed generating '${product.name}' RPMS and SRPMS."/>
    </target>

</project>