Remove incomplete SCL macros

This commit is contained in:
Mat Booth 2016-07-25 18:07:31 +01:00
parent 188d2ef004
commit d6a767b61d
1 changed files with 37 additions and 44 deletions

View File

@ -1,5 +1,3 @@
%global pkg_name tycho
%{?scl:%scl_package %{pkg_name}}
# Bootstrap build
# Tycho depends on itself, and Eclipse to build but in certain cases
# these requirements may not be satisfiable.
@ -25,9 +23,9 @@
%define __requires_exclude osgi*
Name: %{?scl_prefix}tycho
Name: tycho
Version: 0.25.0
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
# license file is missing but all files having some licensing information are ASL 2.0
@ -55,21 +53,20 @@ Source6: fedoraproject-p2-%{fp_p2_sha}.tar.xz
# artifacts. It is used in OSGi requires generation.
Source7: p2-install.sh
Patch0: %{pkg_name}-fix-build.patch
Patch2: %{pkg_name}-fix-surefire.patch
Patch3: %{pkg_name}-use-custom-resolver.patch
Patch4: %{pkg_name}-maven-delegation.patch
Patch0: %{name}-fix-build.patch
Patch2: %{name}-fix-surefire.patch
Patch3: %{name}-use-custom-resolver.patch
Patch4: %{name}-maven-delegation.patch
# Additional changes needed just for bootstrap build
Patch5: %{pkg_name}-fix-bootstrap-build.patch
Patch5: %{name}-fix-bootstrap-build.patch
# Accepted upstream: https://git.eclipse.org/r/49897
Patch7: %{pkg_name}-port-to-plexus-archiver-3.0.1.patch
Patch7: %{name}-port-to-plexus-archiver-3.0.1.patch
Patch8: tycho-maven-archiver-3.0.1.patch
Patch9: tycho-eclipse-neon.patch
BuildArch: noarch
BuildRequires: java-devel
BuildRequires: maven-local >= 4.2.0
BuildRequires: maven-local
BuildRequires: xmvn
BuildRequires: maven-clean-plugin
BuildRequires: maven-dependency-plugin
@ -117,7 +114,7 @@ BuildRequires: mockito
Requires: apache-commons-exec
Requires: decentxml
Requires: maven-local >= 4.2.0
Requires: maven-local
Requires: xmvn
Requires: maven-dependency-plugin
Requires: maven-verifier
@ -169,10 +166,10 @@ no duplication of metadata between POM and OSGi metadata.
%package javadoc
Summary: Javadocs for %{pkg_name}
Summary: Javadocs for %{name}
%description javadoc
This package contains the API documentation for %{pkg_name}.
This package contains the API documentation for %{name}.
%prep
%setup -q -n org.eclipse.tycho-%{git_tag}
@ -180,7 +177,6 @@ This package contains the API documentation for %{pkg_name}.
# Prepare fedoraproject-p2
tar -xf %{SOURCE6}
%{?scl:scl enable %{scl} - << "EOF"}
%pom_disable_module org.fedoraproject.p2.tests fedoraproject-p2
%patch0 -p1
@ -249,7 +245,7 @@ popd
# Perform the 'minimal' (bootstrap) build of Tycho
cp %{SOURCE2} %{SOURCE3} .
./%{pkg_name}-bootstrap.sh %{eclipse_bootstrap}
./tycho-bootstrap.sh %{eclipse_bootstrap}
%patch5 -p1 -R
@ -292,12 +288,10 @@ sed '
# Tests are skipped anyways, so remove some test dependencies
%pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-compiler-plugin
%pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-packaging-plugin
%{?scl:EOF}
sed -i -e "s|javax.servlet|javax.servlet-api|g" tycho-bundles/org.eclipse.tycho.test.utils/META-INF/MANIFEST.MF
%build
%{?scl:scl enable %{scl} - << "EOF"}
xmvn -o -Dtycho-version=%{version}-SNAPSHOT -Dmaven.test.skip=true \
-Dmaven.repo.local=$(pwd)/.m2 -Dfedora.p2.repos=$(pwd)/bootstrap \
-f fedoraproject-p2/pom.xml \
@ -306,11 +300,8 @@ clean install org.apache.maven.plugins:maven-javadoc-plugin:aggregate
xmvn -o -DtychoBootstrapVersion=%{version}-SNAPSHOT -Dmaven.test.skip=true \
-Dmaven.repo.local=$(pwd)/.m2 -Dfedora.p2.repos=$(pwd)/bootstrap \
clean install org.apache.maven.plugins:maven-javadoc-plugin:aggregate
%{?scl:EOF}
%install
%{?scl:scl enable %{scl} - << "EOF"}
cp %{SOURCE2} %{SOURCE4} .
install -dm 755 $RPM_BUILD_ROOT%{_javadir}/tycho
@ -318,16 +309,16 @@ install -dm 755 $RPM_BUILD_ROOT%{_mavenpomdir}
# fedoraproject-p2 parent
mod=fedoraproject-p2
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-$mod.pom
%add_maven_depmap JPP.%{pkg_name}-$mod.pom
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$mod.pom
%add_maven_depmap JPP.%{name}-$mod.pom
# fedoraproject-p2
for mod in fedoraproject-p2/{org.fedoraproject.p2,xmvn-p2-installer-plugin}; do
echo $mod
aid=`basename $mod`
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-$aid.pom
install -m 644 $mod/target/$aid-%{fp_p2_version}%{fp_p2_snap}.jar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/$aid.jar
%add_maven_depmap JPP.%{pkg_name}-$aid.pom %{pkg_name}/$aid.jar -a "org.eclipse.tycho:$aid"
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom
install -m 644 $mod/target/$aid-%{fp_p2_version}%{fp_p2_snap}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$aid.jar
%add_maven_depmap JPP.%{name}-$aid.pom %{name}/$aid.jar -a "org.eclipse.tycho:$aid"
done
# pom and jar installation
@ -340,9 +331,9 @@ for mod in target-platform-configuration tycho-compiler-{jdt,plugin} \
tycho-surefire/{tycho-surefire-plugin,org.eclipse.tycho.surefire.{osgibooter,junit,junit4{,7}}}; do
echo $mod
aid=`basename $mod`
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-$aid.pom
install -m 644 $mod/target/$aid-%{version}%{snap}.jar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/$aid.jar
%add_maven_depmap JPP.%{pkg_name}-$aid.pom %{pkg_name}/$aid.jar -a "org.eclipse.tycho:$aid"
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom
install -m 644 $mod/target/$aid-%{version}%{snap}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$aid.jar
%add_maven_depmap JPP.%{name}-$aid.pom %{name}/$aid.jar -a "org.eclipse.tycho:$aid"
done
# pom installation
@ -350,35 +341,35 @@ for pommod in tycho-p2 tycho-bundles tycho-surefire \
tycho-release sisu-equinox; do
aid=`basename $pommod`
install -pm 644 $pommod/pom.xml \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-$aid.pom
%add_maven_depmap JPP.%{pkg_name}-$aid.pom -a "org.eclipse.tycho:$aid"
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom
%add_maven_depmap JPP.%{name}-$aid.pom -a "org.eclipse.tycho:$aid"
done
# p2 runtime
dir=.m2/org/eclipse/tycho/tycho-bundles-external/%{version}%{snap}
%if ! %{eclipse_bootstrap}
./%{pkg_name}-debundle.sh tycho-bundles/tycho-bundles-external/ $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/tycho-bundles-external-manifest.txt
./%{name}-debundle.sh tycho-bundles/tycho-bundles-external/ $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external-manifest.txt
%endif
install -pm 644 $dir/tycho-bundles-external-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-tycho-bundles-external.pom
install -m 644 $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/tycho-bundles-external.zip
%add_maven_depmap JPP.%{pkg_name}-tycho-bundles-external.pom %{pkg_name}/tycho-bundles-external.zip -a "org.eclipse.tycho:tycho-bundles-external"
install -pm 644 $dir/tycho-bundles-external-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-bundles-external.pom
install -m 644 $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external.zip
%add_maven_depmap JPP.%{name}-tycho-bundles-external.pom %{name}/tycho-bundles-external.zip -a "org.eclipse.tycho:tycho-bundles-external"
%if ! %{eclipse_bootstrap}
%add_maven_depmap org.eclipse.tycho:tycho-bundles-external:txt:manifest:%{version}%{snap} %{pkg_name}/tycho-bundles-external-manifest.txt
%add_maven_depmap org.eclipse.tycho:tycho-bundles-external:txt:manifest:%{version}%{snap} %{name}/tycho-bundles-external-manifest.txt
%endif
# main
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-main.pom
%add_maven_depmap JPP.%{pkg_name}-main.pom
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-main.pom
%add_maven_depmap JPP.%{name}-main.pom
# standalone p2 director
%if ! %{eclipse_bootstrap}
./%{pkg_name}-debundle.sh tycho-bundles/tycho-standalone-p2-director/ .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}%{snap}/tycho-standalone-p2-director-%{version}*.zip
./%{name}-debundle.sh tycho-bundles/tycho-standalone-p2-director/ .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}%{snap}/tycho-standalone-p2-director-%{version}*.zip
%endif
pushd .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}%{snap}/
install -m 644 tycho-standalone-p2-director-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/tycho-standalone-p2-director.zip
install -pm 644 tycho-standalone-p2-director-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-tycho-standalone-p2-director.pom
install -m 644 tycho-standalone-p2-director-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-standalone-p2-director.zip
install -pm 644 tycho-standalone-p2-director-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-standalone-p2-director.pom
popd
%add_maven_depmap JPP.%{pkg_name}-tycho-standalone-p2-director.pom tycho/tycho-standalone-p2-director.zip -a "org.eclipse.tycho:tycho-standalone-p2-director"
%add_maven_depmap JPP.%{name}-tycho-standalone-p2-director.pom tycho/tycho-standalone-p2-director.zip -a "org.eclipse.tycho:tycho-standalone-p2-director"
# javadoc
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/tycho
@ -423,7 +414,6 @@ ln -s %{_javadir}/eclipse/osgi.jar %{buildroot}%{_datadir}/xmvn/lib/installer/
%endif
ln -s %{_javadir}/tycho/xmvn-p2-installer-plugin.jar %{buildroot}%{_datadir}/xmvn/lib/installer/
ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/lib/installer/
%{?scl:EOF}
%files -f .mfiles
%{_datadir}/xmvn/lib/installer/*
@ -434,6 +424,9 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/li
%{_javadocdir}/tycho
%changelog
* Mon Jul 25 2016 Mat Booth <mat.booth@redhat.com> - 0.25.0-7
- Remove incomplete SCL macros
* Thu Jun 30 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.25.0-6
- Add missing requires on maven-plugin-testing-harness