ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/etc antsrc.spec ant.spec
Date Mon, 19 Nov 2001 14:30:22 GMT
conor       01/11/19 06:30:22

  Modified:    .        build.xml
               src/etc  ant.spec
  Added:       src/etc  antsrc.spec
  Log:
  An initial cut at getting the RPMs for Ant to build as part of the
  distribution build.
  
  Revision  Changes    Path
  1.205     +63 -4     jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.204
  retrieving revision 1.205
  diff -u -w -u -r1.204 -r1.205
  --- build.xml	2001/11/18 14:39:14	1.204
  +++ build.xml	2001/11/19 14:30:22	1.205
  @@ -534,12 +534,12 @@
            Create the binary distribution
          ===================================================================
     -->
  -  <target name="distribution" 
  -          description="--> creates a binary distribution">
  +  <target name="main_distribution" 
  +          description="--> creates the zip and tar distributions">
  +    <delete dir="${dist.name}" />
       <mkdir dir="${dist.base}"/>
       <mkdir dir="${dist.base}/src"/>
       <mkdir dir="${dist.base}/bin"/>
  -    <mkdir dir="${dist.base}/rpms"/>
   
       <antcall inheritAll="false" target="internal_dist">
         <param name="dist.dir" value="${dist.name}" />
  @@ -590,6 +590,65 @@
       <delete dir="${dist.name}" />
     </target>
   
  +  <target name="rpm_check">
  +    <available property="rpm.present" 
  +               file="/bin/rpm"/>
  +  </target>              
  +  
  +  <target name="rpm" description="Build the RPM files for ant" 
  +          depends="prepare, rpm_check"
  +          if="rpm.present">
  +    <tstamp>
  +      <format property="rpmyear" pattern="yyyyMMdd"/>
  +      <format property="nightlybuild.dir" pattern="yyyy-MM-dd"/>
  +    </tstamp>
  +    <property name="rpm.release" value="cvs${rpmyear}"/>
  +    <property name="rpm.source" value="nightly/${nightlybuild.dir}/"/>
  +
  +    <mkdir dir="build/rpm/SPECS"/>
  +    <mkdir dir="build/rpm/SOURCES"/>
  +    <mkdir dir="build/rpm/BUILD"/>
  +    <mkdir dir="build/rpm/RPMS"/>
  +    <mkdir dir="build/rpm/SRPMS"/>
  +
  +    <property name="disttar" location="${dist.base}/bin/${dist.name}-bin.tar.gz"/>
  +    <copy file="src/etc/ant.spec" tofile="build/rpm/SPECS/ant.spec">
  +      <filterset refid="ant.filters"/>
  +      <filterset>
  +        <filter token="RPM_RELEASE" value="${rpm.release}"/>
  +        <filter token="RPM_SOURCE" value="${rpm.source}"/>
  +        <filter token="DIST_TAR" value="${disttar}"/>
  +      </filterset>
  +    </copy>
  +    <copy file="src/etc/antsrc.spec" tofile="build/rpm/SPECS/antsrc.spec">
  +      <filterset refid="ant.filters"/>
  +      <filterset>
  +        <filter token="RPM_RELEASE" value="${rpm.release}"/>
  +        <filter token="RPM_SOURCE" value="${rpm.source}"/>
  +      </filterset>
  +    </copy>
  +    <rpm topDir="build/rpm" 
  +         specfile="ant.spec"
  +         command="-bb"/>
  +
  +    <copy file="distribution/src/${dist.name}-src.tar.gz" todir="build/rpm/SOURCES"/>
  +    <rpm topDir="build/rpm" 
  +         specfile="antsrc.spec"
  +         command="-bs"/>
  +
  +    <mkdir dir="${dist.base}/rpms"/>
  +    <copy todir="${dist.base}/rpms">
  +      <fileset dir="build/rpm/RPMS/noarch"/>
  +    </copy>         
  +    <copy todir="${dist.base}/rpms">         
  +      <fileset dir="build/rpm/SRPMS"/>
  +    </copy>         
  +  </target>
  +
  +  <target name="distribution" depends="main_distribution, rpm">
  +  </target>
  +
  +  
     <!--
          ===================================================================
            Cleans up build and distribution directories
  
  
  
  1.3       +34 -31    jakarta-ant/src/etc/ant.spec
  
  Index: ant.spec
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/ant.spec,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -u -r1.2 -r1.3
  --- ant.spec	2000/01/27 03:48:46	1.2
  +++ ant.spec	2001/11/19 14:30:22	1.3
  @@ -1,52 +1,55 @@
  -Summary: Java build tool
  +%define	packname    jakarta-ant
  +%define	applibdir   /usr/share/ant
  +%define dist_tar    @DIST_TAR@
  +
  +Summary: A Java based build tool.
   Name: ant
  -Version: 1.0
  -Release: 0
  +Version: @VERSION@
  +Release: @RPM_RELEASE@
   Group: Development/Tools
  -Copyright: Apache - free
  +Copyright: Apache Software License
   Provides: ant
  -Url: http://jakarta.apache.org
  -
  -Source: http://jakarta.apache.org/builds/nightly/ant/jakarta-tools.src.zip
  -Prefix: /opt
  +Url: http://jakarta.apache.org/ant
  +BuildArch: noarch
  +Source: http://jakarta.apache.org/builds/jakarta-ant/@RPM_SOURCE@/src/%{packname}-%{version}-src.tar.gz
  +BuildRoot: /var/tmp/ant-root
  +Vendor: Apache Software Foundation
  +Packager: Apache Software Foundation
   
   %description
  -Platform-independent build tool for java.
  +Apache Ant is a platform-independent build tool implemented in Java.
  +It is used to build a number of projects including the Apache Jakarta 
  +and XML projects.
   
   %prep
  -rm -rf ${RPM_BUILD_DIR}/jakarta-tools
  -unzip -x $RPM_SOURCE_DIR/jakarta-tools.src.zip
   
   %build
  -cd ${RPM_BUILD_DIR}/jakarta-tools
  -cd ant
  -sh bootstrap.sh
  -sh build.sh 
   
   %install
  -cd ${RPM_BUILD_DIR}/jakarta-tools
  -cd ant
  -sh build.sh -Ddist.dir /opt  dist
  +mkdir -p $RPM_BUILD_ROOT/%{applibdir}
  +cd $RPM_BUILD_ROOT
  +tar zxvf %{dist_tar}
  +cp -r $RPM_BUILD_ROOT/%{packname}-%{version}/bin $RPM_BUILD_ROOT/%{applibdir}
  +cp -r $RPM_BUILD_ROOT/%{packname}-%{version}/lib $RPM_BUILD_ROOT/%{applibdir}
  +cp -r $RPM_BUILD_ROOT/%{packname}-%{version}/docs $RPM_BUILD_DIR 
  +cp -r $RPM_BUILD_ROOT/%{packname}-%{version}/LICENSE $RPM_BUILD_DIR 
  +cp -r $RPM_BUILD_ROOT/%{packname}-%{version}/README $RPM_BUILD_DIR 
  +cp -r $RPM_BUILD_ROOT/%{packname}-%{version}/KEYS $RPM_BUILD_DIR
  +cp -r $RPM_BUILD_ROOT/%{packname}-%{version}/WHATSNEW $RPM_BUILD_DIR
   
   %clean
  +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
   
   %post
  -ln -s /opt/ant/bin/ant /usr/bin
   
   %preun
     
   %files
  -## %defattr(-,root,root)
  -%dir /opt/ant
  -%dir /opt/ant/bin
  -%dir /opt/ant/lib
  -%dir /opt/ant/docs
  -/opt/ant/lib/ant.jar
  -/opt/ant/lib/xml.jar
  -/opt/ant/lib/moo.jar
  -%config /opt/ant/lib/build.xml
  -/opt/ant/bin/ant
  -/opt/ant/bin/antRun
  -/opt/ant/docs/index.html
  +%defattr(-,root,root)
  +%doc LICENSE README WHATSNEW KEYS
  +%doc docs
  +%{applibdir}/lib
  +%{applibdir}/bin
  +
   
   %changelog
  
  
  
  1.1                  jakarta-ant/src/etc/antsrc.spec
  
  Index: antsrc.spec
  ===================================================================
  %define	packname    jakarta-ant
  %define	applibdir   /usr/share/ant
  %define manualdir   /usr/share/doc/%{name}
  
  Summary: A Java based build tool.
  Name: ant
  Version: @VERSION@
  Release: @RPM_RELEASE@
  Group: Development/Tools
  Copyright: Apache Software License
  Provides: ant
  Url: http://jakarta.apache.org/ant
  BuildArch: noarch
  Source: http://jakarta.apache.org/builds/jakarta-ant/@RPM_SOURCE@/src/%{packname}-%{version}-src.tar.gz
  BuildRoot: /var/tmp/ant-root
  Vendor: Apache Software Foundation
  Packager: Apache Software Foundation
  
  %description
  Apache Ant is a platform-independent build tool implemented in Java.
  It is used to build a number of projects including the Apache Jakarta 
  and XML projects.
  
  %prep
  %setup -n %{packname}-%{version}
  
  %build
  sh build.sh
  
  %install
  mkdir -p $RPM_BUILD_ROOT
  export ANT_HOME=$RPM_BUILD_ROOT/%{applibdir} 
  sh build.sh install 
  cp -r $RPM_BUILD_ROOT/%{applibdir}/docs $RPM_BUILD_DIR
  cp -r $RPM_BUILD_ROOT/%{applibdir}/LICENSE $RPM_BUILD_DIR
  cp -r $RPM_BUILD_ROOT/%{applibdir}/README $RPM_BUILD_DIR
  cp -r $RPM_BUILD_ROOT/%{applibdir}/WHATSNEW $RPM_BUILD_DIR
  cp -r $RPM_BUILD_ROOT/%{applibdir}/KEYS $RPM_BUILD_DIR
  
  %clean
  [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  
  %post
  
  %preun
    
  %files
  %defattr(-,root,root)
  %doc LICENSE README WHATSNEW KEYS
  %doc docs
  %{applibdir}/lib
  %{applibdir}/bin
  
  %changelog
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message