Blob Blame History Raw
%undefine _hardened_build

Name:       aunit
Version:    2015
Release:    3%{?dist}
Summary:    Unit test framework for Ada
Group:      Development/Languages
License:    GPLv2+
URL:        http://libre.adacore.com/libre/tools/aunit
## No direct download link
Source0:    aunit-gpl-%{version}-src.tar.gz
Patch0:     %{name}-%{version}-project-subdir.patch
Patch1:     %{name}-%{version}-disable_static.patch


BuildRequires: fedora-gnat-project-common >= 2     
BuildRequires:  chrpath gprbuild gcc-gnat

Requires:    fedora-gnat-project-common >= 2

# gprbuild only available on these:
ExclusiveArch:  %GNAT_arches

%description
%{summary}

%package devel
Summary:    Devel package for aunit
Group:      Development/Languages
License:    GPLv2+
Requires: fedora-gnat-project-common >= 2
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel 
%{summary}

%prep
%setup -q -n aunit-3.8.0w-src
%patch0 -p1
%patch1 -p1

%build
## Doen't compile without this options
make %{?_smp_mflags} GPROPTS="%GPRbuild_optflags"


%install
rm -rf %{buildroot}
export ADA_PROJECT_PATH=%{_GNAT_project_dir}
export GPRINSTALL_OPTS="--build-name=relocatable --lib-subdir=%{buildroot}/%{_libdir}/%{name} --link-lib-subdir=%{buildroot}/%{_libdir} --prefix=%{buildroot} \
--sources-subdir=%{buildroot}/%{_includedir}/%{name} --project-subdir=%{buildroot}%{_GNAT_project_dir}"
make install DESTDIR="%{buildroot}" GPROPTS="${GPRINSTALL_OPTS}" INSTALL="%{buildroot}"
## There is no gps in fedora
rm -rf %{buildroot}/%{_datadir}/gps/
chrpath --delete %{buildroot}/%{_libdir}/%{name}/libaunit.so.%{version}
ln -s %{_libdir}/%{name}/lib%{name}.so.%{version} %{buildroot}/%{_libdir}/lib%{name}.so.%{version}

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc COPYING* README
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/lib%{name}.so.%{version}
%{_libdir}/lib%{name}.so.%{version}

%files devel
%defattr(-,root,root,-)
%{_docdir}/%{name}
%{_libdir}/%{name}/lib%{name}.so
%{_libdir}/lib%{name}.so
%{_libdir}/%{name}/%{name}*
%{_libdir}/%{name}/ada_containers*
%{_includedir}/%{name}
%{_GNAT_project_dir}/*.gpr
%{_GNAT_project_dir}/manifests/%{name}



%changelog
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2015-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 25 2015  Pavel Zhukov <landgraf@fedoraproject.org> - 2015-2
- Build on arm

* Thu Jun 25 2015  Pavel Zhukov <landgraf@fedoraproject.org> - 2015-1
- New release (#2015)

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Mar 29 2015 Pavel Zhukov <landgraf@fedoraproject.org> - 2013-8
- Rebuild with new gnat 

* Sat Oct 11 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 2013-7
- Exclude arm

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue May 13 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2013-4
- Use GNAT_arches rather than an explicit list

* Wed May  7 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 2013-3
- Rebuild with new libgnat

* Sun Feb 16 2014  Pavel Zhukov <landgraf@fedoraproject.org> - 2013-2
- New release (2014)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2012-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Jan 25 2013 Kevin Fenzi <kevin@scrye.com> 2012-3
- Rebuild for new libgnat

* Tue Dec 18 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2012-1
- New release 2012
- Add gcc-gnat to BR

* Sun Mar 04 2012 Pavel Zhukov <landgraf@fedoraproject.org> - 2011-1
- Update to 2011

* Fri Jun 03 2011 Dan HorĂ¡k <dan[at]danny.cz> - 2010-3
- updated the supported arch list

* Sat Apr 30 2011 Pavel Zhukov <landgraf@fedoraproject.org> - 2010-2
- Remove vendor optflags

* Mon Mar 28 2011 Pavel Zhukov <landgraf@fedoraproject.org> - 2010-1
%{GNAT_arches}- Initial build