diff --git a/eclipse-cdt.spec b/eclipse-cdt.spec index 7611375..7cf8666 100644 --- a/eclipse-cdt.spec +++ b/eclipse-cdt.spec @@ -1,6 +1,3 @@ -%{?scl:%scl_package eclipse-cdt} -%{!?scl:%global pkg_name %{name}} - %global debug_package %{nil} %global _enable_debug_packages 0 %global __jar_repack %{nil} @@ -18,28 +15,28 @@ Epoch: 1 -%define major 8 -%define minor 8 -%define majmin %{major}.%{minor} -%define micro 1 -%define eclipse_base %{_libdir}/eclipse -%define cdt_snapshot org.eclipse.cdt-CDT_8_8_1 +%global major 8 +%global minor 8 +%global majmin %{major}.%{minor} +%global micro 1 +%global eclipse_base %{_libdir}/eclipse +%global cdt_snapshot org.eclipse.cdt-CDT_8_8_1 # All arches line up except i386 -> x86 %ifarch %{ix86} -%define eclipse_arch x86 +%global eclipse_arch x86 %else %ifarch %{arm} -%define eclipse_arch arm +%global eclipse_arch arm %else -%define eclipse_arch %{_arch} +%global eclipse_arch %{_arch} %endif %endif Summary: Eclipse C/C++ Development Tools (CDT) plugin -Name: %{?scl_prefix}eclipse-cdt +Name: eclipse-cdt Version: %{majmin}.%{micro} -Release: 7%{?dist} +Release: 8%{?dist} License: EPL and CPL URL: http://www.eclipse.org/cdt @@ -57,13 +54,13 @@ Source5: %{name}-runtests.sh Patch0: %{name}-autotools-test.patch # Following fixes cdtdebug.sh script to get proper platform filesystem plugin -Patch1: %{pkg_name}-cdtdebug.patch +Patch1: %{name}-cdtdebug.patch # Following fixes Standalone Debugger config.ini file to use bundle symbolic names -Patch2: %{pkg_name}-config-ini.patch +Patch2: %{name}-config-ini.patch # Following fixes Standalone Debugger README file to refer to /usr/bin/cdtdebug -Patch3: %{pkg_name}-cdtdebug-readme.patch +Patch3: %{name}-cdtdebug-readme.patch # Following removes docker launcher plugins from repo Patch4: remove-docker.patch @@ -75,11 +72,11 @@ BuildRequires: tycho BuildRequires: tycho-extras BuildRequires: eclipse-license BuildRequires: desktop-file-utils -BuildRequires: %{?scl_prefix}lpg-java-compat +BuildRequires: lpg-java-compat BuildRequires: google-gson -BuildRequires: %{?scl_prefix}eclipse-platform >= 1:4.3.0 -BuildRequires: %{?scl_prefix}eclipse-tests >= 1:4.3.0 -BuildRequires: %{?scl_prefix}eclipse-swtbot +BuildRequires: eclipse-platform +BuildRequires: eclipse-contributor-tools +BuildRequires: eclipse-swtbot BuildRequires: eclipse-launchbar BuildRequires: exec-maven-plugin %if %{_enable_container_and_remote_support} @@ -131,9 +128,9 @@ Extensions to support Arduino C++ projects in Eclipse. %if 0%{?fedora} >= 23 %package docker -Summary: C/C++ Docker Launcher -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: eclipse-linuxtools-docker +Summary: C/C++ Docker Launcher +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: eclipse-linuxtools-docker %description docker Special launcher for CDT to allow launching and debugging C/C++ applications @@ -150,17 +147,17 @@ Requires: %{name} = %{epoch}:%{version}-%{release} Requires: qt5-qtbase-devel #for new qt project to work out of the box Requires: pkgconfig(Qt5Qml) -Requires: pkgconfig(Qt5Quick) +Requires: pkgconfig(Qt5Quick) %description qt Extensions to support Qt projects and objects in the indexer. %package tests -Summary: Eclipse C/C++ Development Tools (CDT) Tests +Summary: Eclipse C/C++ Development Tools (CDT) Tests Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name}-llvm = %{epoch}:%{version}-%{release} Requires: %{name}-parsers = %{epoch}:%{version}-%{release} -Requires: %{?scl_prefix}eclipse-tests +Requires: eclipse-tests %description tests Test plugins for the CDT. @@ -192,7 +189,7 @@ cp %{SOURCE4} man %patch5 -p0 %else # Docker not available on F22 or earlier -%if 0%{?fedora} < 23 +%if 0%{?fedora} == 22 %patch4 -p0 %endif %endif @@ -232,6 +229,9 @@ popd %pom_disable_module releng/org.eclipse.cdt.target %pom_xpath_remove "pom:configuration/pom:target" +# Don't need to build the repo +%pom_disable_module releng/org.eclipse.cdt.repo + # Disable the jgit provider and force default packaging %pom_remove_plugin org.eclipse.tycho:tycho-packaging-plugin %pom_remove_plugin org.jacoco:jacoco-maven-plugin @@ -258,7 +258,7 @@ popd %pom_disable_module toolchains/arduino/org.eclipse.cdt.arduino-feature %else # Docker not available on F22 or earlier -%if 0%{?fedora} < 23 +%if 0%{?fedora} == 22 %pom_disable_module launch/org.eclipse.cdt.docker.launcher %pom_disable_module launch/org.eclipse.cdt.docker.launcher-feature %pom_disable_module launch/org.eclipse.cdt.docker.launcher.source-feature @@ -276,11 +276,20 @@ for b in aix macosx solaris win32 ; do %pom_xpath_remove "plugin[@id='org.eclipse.cdt.core.$b.source']" releng/org.eclipse.cdt.native.source-feature/feature.xml done +# Add explicit dep on hamcrest for tests sed -i -e "s|org.junit|org.hamcrest.core, org.junit|g" dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/META-INF/MANIFEST.MF +# Drop unnecessary dep on log4j +sed -i -e '/log4j/d' build/org.eclipse.cdt.autotools.ui.tests/META-INF/MANIFEST.MF + +%mvn_package "::pom::" __noinstall %mvn_package ::jar:sources: sdk -%mvn_package :*.source sdk -%mvn_package ":*test{,s}*" tests +%mvn_package ":*.source{,.feature}" sdk +%mvn_package :*.sdk sdk +%mvn_package :*.doc.isv sdk +%mvn_package ":*.testsrunner.test" tests +%mvn_package ":*.testsrunner*" +%mvn_package ":*.test{,s}*" tests %mvn_package :*parser* parsers %mvn_package ":org.eclipse.cdt.*{xlc,xlupc,bupc}*" parsers %mvn_package :org.eclipse.cdt.arduino* arduino @@ -299,7 +308,7 @@ export MAVEN_OPTS="-XX:CompileCommand=exclude,org/eclipse/tycho/core/osgitools/E %endif pushd core/org.eclipse.cdt.core.linux/library -make JAVA_HOME="%{java_home}" ARCH=%{eclipse_arch} CC='gcc -D_GNU_SOURCE' +make JAVA_HOME="$JAVA_HOME" ARCH=%{eclipse_arch} CC='gcc -D_GNU_SOURCE' popd %mvn_build -j -f -- -Dtycho.local.keepTarget -Dskip-ppc64le @@ -307,20 +316,19 @@ popd %install %mvn_install -installDir=${RPM_BUILD_ROOT}/%{eclipse_base}/%{droplets}/cdt binInstallDir=${RPM_BUILD_ROOT}/%{_bindir} manInstallDir=${RPM_BUILD_ROOT}/%{_mandir}/man1 install -d -m755 $binInstallDir install -d -m755 $manInstallDir -cat << EOF > eclipse-runCDTTestBundles +cat << EOFSCRIPT > eclipse-runCDTTestBundles #! /bin/bash eclipse-runTestBundles %{_javadir}/cdt-tests -EOF +EOFSCRIPT install -D -m 755 eclipse-runCDTTestBundles %{buildroot}%{_bindir}/eclipse-runCDTTestBundles -pushd ${installDir}/eclipse/plugins +pushd %{buildroot}%{eclipse_base}/%{droplets}/cdt/eclipse/plugins DEBUGAPPLICATIONVERSION=$(ls . | grep org.eclipse.cdt.debug.application_ | sed 's/org.eclipse.cdt.debug.application_//' |sed 's/.jar//') pushd org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION # Create the jar file inside the folder to work around issue where standalone application cannot be found without a jar file @@ -372,8 +380,8 @@ popd echo %{eclipse_base}/%{droplets}/cdt/eclipse/plugins/org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION.jar >> .mfiles -install -D desktop/eclipse-cdt.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/%{?scl_prefix}eclipse-cdt.desktop -desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/%{?scl_prefix}eclipse-cdt.desktop +install -D desktop/eclipse-cdt.desktop $RPM_BUILD_ROOT/usr/share/applications/%{name}.desktop +desktop-file-validate $RPM_BUILD_ROOT/usr/share/applications/%{name}.desktop # man page cp man/cdtdebug.man $manInstallDir/cdtdebug.1 @@ -381,7 +389,7 @@ cp man/cdtdebug.man $manInstallDir/cdtdebug.1 %files -f .mfiles %{_bindir}/cdtdebug -%{_datadir}/applications/* +/usr/share/applications/* %{_mandir}/man1/cdtdebug.1* %doc releng/org.eclipse.cdt.releng/epl-v10.html %doc releng/org.eclipse.cdt.releng/notice.html @@ -421,6 +429,12 @@ cp man/cdtdebug.man $manInstallDir/cdtdebug.1 %endif %changelog +* Thu Mar 10 2016 Mat Booth - 1:8.8.1-8 +- Use global instead of define +- Move more bundles into SDK that should be there +- Remove forbidden SCL macros +- Minor other changes to make it easier to auto-SCLise + * Mon Feb 29 2016 Alexander Kurtakov 1:8.8.1-7 - Update to upstream 8.8.1 release.