Accepting request 197292 from Java:packages
- use add_maven_depmap from javapackages-tools - install non-versioned dirs and jars OBS-URL: https://build.opensuse.org/request/show/197292 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hamcrest?expand=0&rev=11
This commit is contained in:
parent
be21e996e5
commit
9f298a01f2
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 3 14:23:47 UTC 2013 - mvyskocil@suse.com
|
||||
|
||||
- use add_maven_depmap from javapackages-tools
|
||||
- install non-versioned dirs and jars
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 5 14:53:21 CEST 2009 - mvyskocil@suse.cz
|
||||
|
||||
|
113
hamcrest.spec
113
hamcrest.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package hamcrest (Version 1.1)
|
||||
# spec file for package hamcrest
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,10 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
|
||||
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
|
||||
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
|
||||
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
||||
%define _without_integration 1
|
||||
%define _without_tests 1
|
||||
%define _withouth_jarjar 1
|
||||
@ -37,11 +33,11 @@
|
||||
|
||||
Name: hamcrest
|
||||
Version: 1.1
|
||||
Release: 2
|
||||
Release: 0
|
||||
Summary: Library of matchers for building test expressions
|
||||
License: BSD-3-Clause
|
||||
Url: http://code.google.com/p/hamcrest/
|
||||
Group: Development/Libraries/Java
|
||||
Url: http://code.google.com/p/hamcrest/
|
||||
Source0: http://hamcrest.googlecode.com/files/hamcrest-1.1.tar.bz2
|
||||
Source1: http://repo1.maven.org/maven2/org/hamcrest/hamcrest-parent/1.1/hamcrest-parent-1.1.pom
|
||||
Source2: http://repo1.maven.org/maven2/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1.pom
|
||||
@ -59,10 +55,10 @@ Requires: easymock2
|
||||
Requires: jmock
|
||||
%endif
|
||||
Requires: qdox
|
||||
BuildRequires: jpackage-utils >= 1.7.4
|
||||
BuildRequires: java-devel >= 1.5.0
|
||||
BuildRequires: ant >= 1.6.5
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: java-devel >= 1.5.0
|
||||
BuildRequires: jpackage-utils >= 1.7.4
|
||||
%if %with integration
|
||||
BuildRequires: easymock2
|
||||
%endif
|
||||
@ -91,9 +87,8 @@ mocking libraries and UI validation rules.
|
||||
|
||||
|
||||
%package javadoc
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/Java
|
||||
Summary: Library of matchers for building test expressions
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description javadoc
|
||||
Provides a library of matcher objects (also known as constraints or
|
||||
@ -104,9 +99,8 @@ mocking libraries and UI validation rules.
|
||||
|
||||
|
||||
%package demo
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/Java
|
||||
Summary: Library of matchers for building test expressions
|
||||
Group: Development/Libraries/Java
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: junit
|
||||
#Requires: junit4
|
||||
@ -167,92 +161,75 @@ ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 -Dversion=%{versio
|
||||
|
||||
%install
|
||||
# jars
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
|
||||
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-parent.pom
|
||||
%add_to_maven_depmap org.hamcrest %{name}-parent %{version} JPP/%{name} parent
|
||||
install -m 644 build/%{name}-all-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/all-%{version}.jar
|
||||
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-all.pom
|
||||
%add_to_maven_depmap org.hamcrest %{name}-all %{version} JPP/%{name} all
|
||||
install -m 644 build/%{name}-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/core-%{version}.jar
|
||||
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-core.pom
|
||||
%add_to_maven_depmap org.hamcrest %{name}-core %{version} JPP/%{name} core
|
||||
install -m 644 build/%{name}-generator-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/generator-%{version}.jar
|
||||
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-generator.pom
|
||||
%add_to_maven_depmap org.hamcrest %{name}-generator %{version} JPP/%{name} generator
|
||||
install -m 644 build/%{name}-library-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/library-%{version}.jar
|
||||
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-library.pom
|
||||
%add_to_maven_depmap org.hamcrest %{name}-library %{version} JPP/%{name} library
|
||||
install -d -m 755 %{buildroot}%{_javadir}/%{name}
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP.%{name}-parent.pom
|
||||
%add_maven_depmap JPP.%{name}-parent.pom
|
||||
|
||||
install -m 644 build/%{name}-all-%{version}.jar %{buildroot}%{_javadir}/%{name}/all.jar
|
||||
install -m 644 %{SOURCE6} %{buildroot}%{_mavenpomdir}/JPP.%{name}-all.pom
|
||||
%add_maven_depmap JPP.%{name}-all.pom %{name}/all.jar
|
||||
|
||||
install -m 644 build/%{name}-core-%{version}.jar %{buildroot}%{_javadir}/%{name}/core.jar
|
||||
install -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP.%{name}-core.pom
|
||||
%add_maven_depmap JPP.%{name}-core.pom %{name}/core.jar
|
||||
|
||||
install -m 644 build/%{name}-generator-%{version}.jar %{buildroot}%{_javadir}/%{name}/generator.jar
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_mavenpomdir}/JPP.%{name}-generator.pom
|
||||
%add_maven_depmap JPP.%{name}-generator.pom %{name}/generator.jar
|
||||
|
||||
install -m 644 build/%{name}-library-%{version}.jar %{buildroot}%{_javadir}/%{name}/library.jar
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP.%{name}-library.pom
|
||||
%add_maven_depmap JPP.%{name}-library.pom %{name}/library.jar
|
||||
|
||||
%if %with integration
|
||||
install -m 644 build/%{name}-integration-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/integration-%{version}.jar
|
||||
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-integration.pom
|
||||
%add_to_maven_depmap org.hamcrest %{name}-integration %{version} JPP/%{name} integration
|
||||
install -m 644 build/%{name}-integration-%{version}.jar %{buildroot}%{_javadir}/%{name}/integration.jar
|
||||
install -m 644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/JPP.%{name}-integration.pom
|
||||
%add_maven_depmap JPP.%{name}-integration.pom %{name}/integration.jar
|
||||
%endif
|
||||
install -m 644 build/%{name}-text-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/text-%{version}.jar
|
||||
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-text.pom
|
||||
%add_to_maven_depmap org.hamcrest %{name}-text %{version} JPP/%{name} text
|
||||
|
||||
install -m 644 build/%{name}-text-%{version}.jar %{buildroot}%{_javadir}/%{name}/text.jar
|
||||
install -m 644 %{SOURCE7} %{buildroot}%{_mavenpomdir}/JPP.%{name}-text.pom
|
||||
%add_maven_depmap JPP.%{name}-text.pom %{name}/text.jar
|
||||
|
||||
%if %with tests
|
||||
install -m 644 build/%{name}-unit-test-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/unit-test-%{version}.jar
|
||||
install -m 644 build/%{name}-unit-test-%{version}.jar %{buildroot}%{_javadir}/%{name}/unit-test.jar
|
||||
%endif
|
||||
pushd $RPM_BUILD_ROOT%{_javadir}/%{name}
|
||||
for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done
|
||||
popd
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
cp -pr build/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||
# demo
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
|
||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||
%if %with integration
|
||||
install -m 644 build/%{name}-examples-%{version}.jar $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
|
||||
install -m 644 build/%{name}-examples-%{version}.jar %{buildroot}%{_datadir}/%{name}-%{version}
|
||||
%endif
|
||||
cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/
|
||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
cp -pr %{name}-examples %{buildroot}%{_datadir}/%{name}/
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc LICENSE.txt
|
||||
%dir %{_javadir}/%{name}
|
||||
%{_javadir}/%{name}/all-%{version}.jar
|
||||
%{_javadir}/%{name}/all.jar
|
||||
%{_javadir}/%{name}/core-%{version}.jar
|
||||
%{_javadir}/%{name}/core.jar
|
||||
%{_javadir}/%{name}/generator-%{version}.jar
|
||||
%{_javadir}/%{name}/generator.jar
|
||||
%if %with integration
|
||||
%{_javadir}/%{name}/integration-%{version}.jar
|
||||
%{_javadir}/%{name}/integration.jar
|
||||
%endif
|
||||
%{_javadir}/%{name}/library-%{version}.jar
|
||||
%{_javadir}/%{name}/library.jar
|
||||
%{_javadir}/%{name}/text-%{version}.jar
|
||||
%{_javadir}/%{name}/text.jar
|
||||
%if %with tests
|
||||
%{_javadir}/%{name}/unit-test-%{version}.jar
|
||||
%{_javadir}/%{name}/unit-test.jar
|
||||
%endif
|
||||
%{_datadir}/maven2/*
|
||||
%{_mavenpomdir}
|
||||
%config %{_mavendepmapfragdir}/*
|
||||
|
||||
%files javadoc
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_javadocdir}/%{name}-%{version}
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files demo
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_datadir}/%{name}-%{version}
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue May 05 2009 mvyskocil@suse.cz
|
||||
- Initial packaging of 1.1 in SUSE (from jpp 5.0)
|
||||
|
Loading…
Reference in New Issue
Block a user