%undefine _hardened_build Name: gprbuild Version: 2016 Release: 3%{?dist} Summary: Ada project builder Group: Development/Languages License: GPLv3+ URL: http://libre.adacore.com ## Direct download is not available Source0: %{name}-gpl-%{version}-src.tar.gz # target patterns for Fedora's architectures: Source2: fedora_arches.xml Patch2: %{name}-%{version}-gcc5.patch # This usrmove patch works for this package. Upstream a different solution # would be needed to handle other possible setups. Patch3: %{name}-%{version}-usrmove.patch Patch6: %{name}-%{version}-arm_compiler.patch Patch7: %{name}-%{version}-mingw.patch %global bootstrap_arch currently_not_bootstrapping # When bootstrapping GPRbuild for a new architecture, set bootstrap_arch to the # name of that architecture and add a tarball with binaries as Source100. # When not bootstrapping bootstrap_arch must have a nonempty value that isn't # an architecture name, as this spec would be syntactically invalid otherwise. # # Bootstrapping exception: https://fedorahosted.org/fpc/ticket/605 %ifarch %{bootstrap_arch} %global debug_package %{nil} %endif # Stripping out debugging information isn't important when bootstrapping, and # skipping this allows one to avoid unnecessary efforts to produce unstripped # binaries to bootstrap with. # Building GPRbuild requires a working GPRbuild. Therefore GPRbuild and its # associated programs are linked statically to libgnat and XMLada so that they # won't stop working in Koji when one of those libraries gets upgraded and the # previous version becomes unavailable. Thus building this package requires # libgnat-static and xmlada-static. # # Static linkage exception: https://fedorahosted.org/fesco/ticket/1551 %ifnarch %{bootstrap_arch} BuildRequires: xmlada-static gprbuild %endif # XMLada is built with GPRbuild, so it's unavailable when GPRbuild hasn't been # bootstrapped yet. BuildRequires: gcc-gnat > 5.1 BuildRequires: libgnat-static >= 6.1 BuildRequires: fedora-gnat-project-common >= 2 Requires: fedora-gnat-project-common >= 2 Requires: gnat-srpm-macros # Build only on architectures where GPRbuild is already available, plus the # architecture being bootstrapped, if any: ExclusiveArch: %{GPRbuild_arches} %{bootstrap_arch} %description GPRbuild is an advanced software tool designed to help automate the construction of multi-language systems. It removes complexity from multi-language development by allowing developers to quickly and easily compile and link software written in a combination of languages including Ada, Assembler, C, C++, and Fortran. Easily extendable by users to cover new toolchains and languages it is primarily aimed at projects of all sizes organized into subsystems and libraries and is particularly well-suited for compiled languages. %prep %setup -q -n gprbuild-gpl-%{version}-src %patch2 -p1 %patch3 -p1 %patch6 -p1 %patch7 -p1 # Update the various config.guess to upstream release for new arch support cp /usr/lib/rpm/config.* . %build # The build won't work when GPRbuild is unavailable or broken, so do nothing in # this stage when bootstrapping. %ifnarch %{bootstrap_arch} %configure --disable-rpath --datadir="%{buildroot}/%{_datadir}" --libdir="%{buildroot}/%{_libdir}" --bindir="%{buildroot}/%{_bindir}" --libexecdir="%{buildroot}/%{_libexecdir}" make copy_gnat_src # Build it, and link statically by setting XMLADA_BUILD to "static". XMLADA_BUILD=static make ADA_PROJECT_PATH=%_GNAT_project_dir BUILDER="gprbuild %{GPRbuild_optflags}" %endif %install %{?filter_setup: %filter_requires_in %{_libdir} %filter_requires_in %{_bindir} %filter_setup } rm -rf %{buildroot} %ifarch %{bootstrap_arch} # Bootstrapping. Just unpack the bootstrap tarball in the staging directory. mkdir -p %{buildroot} tar -C %{buildroot} -xf %{SOURCE100} %else # Not bootstrapping. Install normally into the staging directory. make install DESTDIR=%{buildroot} find %{buildroot}%{_datadir}/gprconfig -type f -name "*.xml" -exec chmod -x {} \; # Add target patterns for Fedora's architectures. cp %{SOURCE2} %{buildroot}%{_datadir}/gprconfig/ mkdir __doc mv %{buildroot}/%{_datadir}/doc/%{name}/* __doc mv %{buildroot}/%{_datadir}/examples __doc rm -rf %{buildroot}/%{_datadir}/doc/%{name} ##%%find __doc/examples -type f -exec chmod -x {} \; %endif %files %defattr(-,root,root,-) %doc README.md COPYING* CHANGE* %ifnarch %{bootstrap_arch} %doc __doc/* %endif %{_bindir}/gpr* %dir %{_libexecdir}/%{name} %{_libexecdir}/%{name}/gpr* %dir %{_datadir}/gprconfig %{_datadir}/gprconfig/* %_GNAT_project_dir/* %changelog * Wed Nov 02 2016 Maxim Reznik - 2016-3 - Fix mingw32 targets to match one from fedora packages - Fix mingw patch conflict * Sun Aug 07 2016 Björn Persson - 2016-1 - Upgraded to the 2016 release. - The license has changed to GPLv3+. * Sun Apr 17 2016 Björn Persson - 2015-13 - Added target patterns to make GPRconfig recognize the native GCC on Fedora's secondary architectures. - Re-bootstrapped on ppc64. - Bootstrapped on ppc64le. * Wed Feb 03 2016 Fedora Release Engineering - 2015-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Feb 01 2016 Björn Persson - 2015-8 - Re-bootstrapped on ARM. * Tue Jan 19 2016 Björn Persson - 2015-6 - GPRbuild no longer requires XMLada as it's statically linked in. * Tue Jan 19 2016 Björn Persson - 2015-5 - Build only on x86 and x86-64. * Wed Dec 23 2015 Björn Persson - 2015-4 - Changed to static linking. * Thu Jun 25 2015 Pavel Zhukov - 2015-3 - Remove disabling of autorequires * Thu Jun 25 2015 Pavel Zhukov - 2015-2 - Add xmlada to requires. Missed by disable autorequires * Thu Jun 25 2015 Pavel Zhukov - 2015-1 - New Release (#2015) * Wed Jun 17 2015 Fedora Release Engineering - 2014-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Jun 03 2015 Pavel Zhukov - 2014-8 - Modify usrmove patch * Sun May 24 2015 Pavel Zhukov - 2014-7 - Ship gnat 5.1 headers * Mon May 4 2015 Peter Robinson 2014-6 - Don't build ADA hardened * Sat May 02 2015 Björn Persson - 2014-5 - Fixed a bug that threw away GCC options that begin with "-m". * Sun Mar 29 2015 Pavel Zhukov - 2014-4 - New release (2014) - Fix library version * Sun Feb 15 2015 Pavel Zhukov - 2013-16 - Remove OpenVMS from supported OS * Sat Feb 14 2015 Pavel Zhukov - 2013-15 - Rebuild with new gcc 5.0 * Mon Nov 10 2014 Peter Robinson 2013-14 - Update config.sub and config.guess for new architectures * Sat Oct 11 2014 Pavel Zhukov - 2013-13 - Add gnat-srpm-macros as dependency * Sat Aug 16 2014 Fedora Release Engineering - 2013-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Mon Jun 09 2014 Pavel Zhukov - 2013-11 - Add arm to compillers list * Sat Jun 07 2014 Fedora Release Engineering - 2013-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue May 13 2014 Peter Robinson 2013-8 - Use GNAT_arches rather than an explicit list * Wed May 7 2014 Pavel Zhukov - 2013-7 - Rebuild with new libgnat * Mon Nov 18 2013 Pavel Zhukov - 2013-6 - Add fedora-gnat-project-common to the requires list * Wed Sep 04 2013 Pavel Zhukov - 2013-5 - changed http://fedoraproject.org/wiki/Changes/UnversionedDocdirs * Sat Aug 03 2013 Fedora Release Engineering - 2013-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Jul 16 2013 Pavel Zhukov - 2013-2 - rebuild with Fedora optflags (#984721) * Sat Jul 13 2013 Pavel Zhukov - 2013-1 - New release (2013) * Fri Jan 25 2013 Pavel Zhukov - 2012-4 - Rebuild with GCC 4.8 * Tue Dec 18 2012 Pavel Zhukov - 2012-3 - Rebuild for new xmlada * Mon Dec 17 2012 Pavel Zhukov - 2012-2 - Update to gprbuild 2012 * Thu Jul 19 2012 Fedora Release Engineering - 2011-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Jun 21 2012 Julian Leyh - 2011-4 - Remove rpath from default configuration - Make parsing of gcc version locale-independant * Sun Mar 04 2012 Pavel Zhukov - 2011-3 - Updated to 2011 (#722704) - Add unreference patch * Mon Feb 27 2012 Björn Persson - 2011-1 - Patched to resolve the link /bin → /usr/bin. - Removed a superfluous explicit dependency on xmlada. * Sun Jul 17 2011 Pavel Zhukov - 2010-10 - Rebuld for xmlada 2011 * Thu Mar 24 2011 Dan Horák - 2010-8 - updated the supported arch list