[Jpackage-commits] dist/lucene/devel lucene.spec,1.8,1.9

David Walluck david at ryu.zarb.org
Mon Oct 24 20:08:22 CEST 2011


Update of /home/projects/jpackage/cvs/dist/lucene/devel
In directory ryu.zarb.org:/tmp/cvs-serv7009

Modified Files:
	lucene.spec 
Log Message:
- remove stupid java-devel BuildRequires
- remove stupid javadoc workaround
- fix mixed use of name macro in install
- use real jar names
- add BuildRoot
- fix %%install
- add %%defattr
- add Requires(post,postun) on jpackage-utils
- use ant macro
- remove duplicate LICENSE.txt
- change Group
- remove some logic from %%build to %%prep
- name main package core


Index: lucene.spec
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/lucene/devel/lucene.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** lucene.spec	24 Oct 2011 17:44:07 -0000	1.8
--- lucene.spec	24 Oct 2011 18:08:19 -0000	1.9
***************
*** 1,3 ****
! # Copyright (c) 2000-2005, JPackage Project
  # All rights reserved.
  #
--- 1,3 ----
! # Copyright (c) 2000-2011, JPackage Project
  # All rights reserved.
  #
***************
*** 27,40 ****
  # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- #
  
- Summary:        High-performance, full-featured text search engine
  Name:           lucene
  Version:        2.9.4
! Release:        7%{?dist}
  Epoch:          0
  License:        ASL 2.0
  URL:            http://lucene.apache.org/
! Group:          Development/Libraries
  Source0:        http://archive.apache.org/dist/lucene/java/%{name}-%{version}-src.tar.gz
  Source1:        lucene-%{version}-core-OSGi-MANIFEST.MF
--- 27,39 ----
  # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
  Name:           lucene
  Version:        2.9.4
! Release:        8%{?dist}
  Epoch:          0
+ Summary:        High-performance, full-featured text search engine
  License:        ASL 2.0
  URL:            http://lucene.apache.org/
! Group:          Development/Java
  Source0:        http://archive.apache.org/dist/lucene/java/%{name}-%{version}-src.tar.gz
  Source1:        lucene-%{version}-core-OSGi-MANIFEST.MF
***************
*** 55,68 ****
  BuildRequires:  unzip
  BuildRequires:  zip
! BuildRequires:  java-devel >= 1:1.6.0
  BuildRequires:  apache-commons-compress
  BuildRequires:  icu4j
  # for tests
  BuildRequires:  subversion
- 
- Provides:       lucene-core = %{epoch}:%{version}-%{release}
- # previously used by eclipse but no longer needed
- Obsoletes:      lucene-devel < %{version}
  BuildArch:      noarch
  
  Requires:       jpackage-utils
--- 54,64 ----
  BuildRequires:  unzip
  BuildRequires:  zip
! BuildRequires:  java-devel
  BuildRequires:  apache-commons-compress
  BuildRequires:  icu4j
  # for tests
  BuildRequires:  subversion
  BuildArch:      noarch
+ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
  
  Requires:       jpackage-utils
***************
*** 74,77 ****
--- 70,84 ----
  cross-platform.
  
+ %package core
+ Summary:        High-performance, full-featured text search engine
+ Group:          Development/Java
+ Obsoletes:      lucene < %{epoch}:%{version}-%{release}
+ Provides:       lucene = %{epoch}:%{version}-%{release}
+ # previously used by eclipse but no longer needed
+ Obsoletes:      lucene-devel < %{version}
+ Requires(post): jpackage-utils
+ Requires(postun): jpackage-utils
+ Requires:       jpackage-utils
+ 
  %package javadoc
  Summary:        Javadoc for Lucene
***************
*** 84,88 ****
  %package demo
  Summary:        Lucene demonstration library
! Group:          Development/Libraries
  Requires:       %{name} = %{epoch}:%{version}-%{release}
  
--- 91,95 ----
  %package demo
  Summary:        Lucene demonstration library
! Group:          Development/Java
  Requires:       %{name} = %{epoch}:%{version}-%{release}
  
***************
*** 92,96 ****
  %package contrib
  Summary:        Lucene contributed extensions
! Group:          Development/Libraries
  Requires:       %{name} = %{epoch}:%{version}-%{release}
  
--- 99,103 ----
  %package contrib
  Summary:        Lucene contributed extensions
! Group:          Development/Java
  Requires:       %{name} = %{epoch}:%{version}-%{release}
  
***************
*** 113,124 ****
               sed -i "s:@version@:%{version}:g" \{\} \;
  
- %build
  mkdir -p docs
  mkdir -p lib
  export OPT_JAR_LIST="ant/ant-junit junit"
  export CLASSPATH=$(build-classpath jline jtidy regexp commons-digester apache-commons-compress icu4j)
- rm -r contrib/db
  
! ant -Dbuild.sysclasspath=first \
    -Djavacc.home=%{_bindir}/javacc \
    -Djavacc.jar=%{_javadir}/javacc.jar \
--- 120,133 ----
               sed -i "s:@version@:%{version}:g" \{\} \;
  
  mkdir -p docs
  mkdir -p lib
+ 
+ rm -r contrib/db
+ 
+ %build
  export OPT_JAR_LIST="ant/ant-junit junit"
  export CLASSPATH=$(build-classpath jline jtidy regexp commons-digester apache-commons-compress icu4j)
  
! %{ant} -Dbuild.sysclasspath=first \
    -Djavacc.home=%{_bindir}/javacc \
    -Djavacc.jar=%{_javadir}/javacc.jar \
***************
*** 142,152 ****
  
  %install
  
  # jars
  install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
  install -d -m 0755 $RPM_BUILD_ROOT%{_mavenpomdir}
! install -m 0644 build/%{name}-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
! ln -sf %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-core.jar
! install -m 0644 build/%{name}-demos-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-demos.jar
  
  # contrib jars
--- 151,161 ----
  
  %install
+ rm -rf $RPM_BUILD_ROOT
  
  # jars
  install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
  install -d -m 0755 $RPM_BUILD_ROOT%{_mavenpomdir}
! install -p -m 0644 build/lucene-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-core-%{version}.jar
! install -p -m 0644 build/lucene-demos-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-demos-%{version}.jar
  
  # contrib jars
***************
*** 156,170 ****
           snowball spatial spellchecker surround swing wikipedia wordnet \
           xml-query-parser; do
!     install -m 0644 build/contrib/$c/%{name}-${c}-%{version}.jar \
!         $RPM_BUILD_ROOT%{_javadir}/%{name}-contrib/%{name}-${c}.jar
  
!     install -m 0644 contrib/$c/pom.xml.template \
                 $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.lucene-contrib-lucene-$c.pom
!     %add_to_maven_depmap org.apache.lucene lucene-$c %{version} JPP/lucene-contrib lucene-$c
  done
  
  # main poms
  for pom in contrib core demos parent; do
!     install -m 0644 lucene-$pom-pom.xml.template \
             $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-lucene-$pom.pom
      %add_to_maven_depmap org.apache.lucene lucene-$pom %{version} JPP lucene-$pom
--- 165,181 ----
           snowball spatial spellchecker surround swing wikipedia wordnet \
           xml-query-parser; do
!     install -p -m 0644 build/contrib/$c/lucene-${c}-%{version}.jar \
!         $RPM_BUILD_ROOT%{_javadir}/%{name}-contrib/lucene-${c}.jar
  
!     install -p -m 0644 contrib/$c/pom.xml.template \
                 $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.lucene-contrib-lucene-$c.pom
!     %add_to_maven_depmap org.apache.lucene lucene-$c %{version} JPP/%{name}-contrib lucene-$c
  done
  
+ (cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -s ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
+ 
  # main poms
  for pom in contrib core demos parent; do
!     install -p -m 0644 lucene-$pom-pom.xml.template \
             $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-lucene-$pom.pom
      %add_to_maven_depmap org.apache.lucene lucene-$pom %{version} JPP lucene-$pom
***************
*** 172,189 ****
  
  # javadoc
! install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
  cp -pr build/docs/api/* \
!   $RPM_BUILD_ROOT%{_javadocdir}/%{name}
  
  # webapp
  install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
! install -m 0644 build/%{name}web.war \
    $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
  
- %pre javadoc
- # workaround for rpm bug, can be removed in F-17
- [ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
- rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
- 
  %post
  %update_maven_depmap
--- 183,197 ----
  
  # javadoc
! install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
  cp -pr build/docs/api/* \
!   $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
! ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
  
  # webapp
+ # XXX: dwalluck: shouldn't this go in %%_javadir
  install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
! install -p -m 0644 build/luceneweb.war \
    $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
  
  %post
  %update_maven_depmap
***************
*** 192,216 ****
  %update_maven_depmap
  
! 
! %files
  %doc CHANGES.txt LICENSE.txt README.txt NOTICE.txt
! %{_mavenpomdir}/JPP*pom
  %{_mavendepmapfragdir}/%{name}
! %{_javadir}/%{name}.jar
  %{_javadir}/%{name}-core.jar
  %{_datadir}/%{name}-%{version}
  
  %files javadoc
! %doc LICENSE.txt
  %{_javadocdir}/%{name}
  
  %files contrib
  %{_javadir}/%{name}-contrib
  %doc contrib/CHANGES.txt
  
  %files demo
  %{_javadir}/%{name}-demos.jar
  
  %changelog
  * Mon Sep 12 2011 Alexander Kurtakov <akurtako at redhat.com> 0:2.9.4-7
  - Fix duplicate Manifes-version warnings.
--- 200,242 ----
  %update_maven_depmap
  
! %files core
! %defattr(0644,root,root,0755)
  %doc CHANGES.txt LICENSE.txt README.txt NOTICE.txt
! #%%{_mavenpomdir}/JPP*pom
  %{_mavendepmapfragdir}/%{name}
! %{_javadir}/%{name}-core-%{version}.jar
  %{_javadir}/%{name}-core.jar
  %{_datadir}/%{name}-%{version}
  
  %files javadoc
! %defattr(0644,root,root,0755)
! %{_javadocdir}/%{name}-%{version}
  %{_javadocdir}/%{name}
  
  %files contrib
+ %defattr(0644,root,root,0755)
  %{_javadir}/%{name}-contrib
  %doc contrib/CHANGES.txt
  
  %files demo
+ %defattr(0644,root,root,0755)
  %{_javadir}/%{name}-demos.jar
  
  %changelog
+ * Mon Oct 24 2011 David Walluck <dwalluck at redhat.com> 0:2.9.4-8
+ - remove stupid java-devel BuildRequires
+ - remove stupid javadoc workaround
+ - fix mixed use of name macro in install
+ - use real jar names
+ - add BuildRoot
+ - fix %%install
+ - add %%defattr
+ - add Requires(post,postun) on jpackage-utils
+ - use ant macro
+ - remove duplicate LICENSE.txt
+ - change Group
+ - remove some logic from %%build to %%prep
+ - name main package core
+ 
  * Mon Sep 12 2011 Alexander Kurtakov <akurtako at redhat.com> 0:2.9.4-7
  - Fix duplicate Manifes-version warnings.




More information about the JPackage-commits mailing list