[aunit/f15] Initial import (#701001)
Pavel Zhukov
landgraf at fedoraproject.org
Tue May 24 06:12:17 UTC 2011
commit aa2243d8563c65a5623fb58a73ea938c740c4d1b
Author: Pavel Zhukov <pavel at zhukoff.net>
Date: Tue May 24 10:11:49 2011 +0400
Initial import (#701001)
.gitignore | 1 +
aunit-2010-libdir.patch | 19 +++++++++
aunit-2010-makefile.patch | 74 +++++++++++++++++++++++++++++++++
aunit-directories.patch | 37 +++++++++++++++++
aunit-optflags.patch | 13 ++++++
aunit.spec | 99 +++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
7 files changed, 244 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b30e41d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/aunit-gpl-2010-src.tgz
diff --git a/aunit-2010-libdir.patch b/aunit-2010-libdir.patch
new file mode 100644
index 0000000..81b366a
--- /dev/null
+++ b/aunit-2010-libdir.patch
@@ -0,0 +1,19 @@
+--- a/aunit/aunit_build.gpr 2011-03-25 21:57:14.933000338 +0300
++++ b/aunit/aunit_build.gpr 2011-03-25 21:57:27.388000728 +0300
+@@ -3,12 +3,15 @@
+ project AUnit_Build is
+
+ for Languages use ("Ada");
++ Version := "2010";
+ for Object_Dir use
+ "obj/" & AUnit_Shared.Target & "-" & AUnit_Shared.Runtime;
+ for Library_Dir use
+ "lib/" & AUnit_Shared.Target & "-" & AUnit_Shared.Runtime;
+ for Library_Name use "aunit";
+- for Library_Kind use "static";
++ for Library_Kind use "relocatable";
++ for Library_Version use
++ "lib" & Project'Library_Name & ".so." & Version;
+
+ for Source_Dirs use
+ ("framework", "containers", "reporters",
diff --git a/aunit-2010-makefile.patch b/aunit-2010-makefile.patch
new file mode 100644
index 0000000..d784077
--- /dev/null
+++ b/aunit-2010-makefile.patch
@@ -0,0 +1,74 @@
+--- a/Makefile 2011-03-25 21:14:36.423000860 +0300
++++ b/Makefile 2011-03-25 21:19:25.388001015 +0300
+@@ -2,8 +2,10 @@
+ TARGET =
+ GPRBUILD = gprbuild
+ GPRCLEAN = gprclean
+-
++DESTDIR ?=
++GNATFLAGS ?= -XRUNTIME=$(RTS) -XPLATFORM=$(TARGET) $(CONF_ARGS)
+ INSTALL = $(shell which $(GPRBUILD) 2> /dev/null | sed -e 's/\/bin\/gprbuild.*//')
++ADA_PROJECT_PATH ?= /usr/lib/gnat
+
+ ifeq ($(RTS),)
+ RTS=full
+@@ -23,17 +25,17 @@
+
+ # Install directories
+
+-I_INC = $(INSTALL)/include/aunit
+-I_LIB = $(INSTALL)/lib/aunit
+-I_GPR = $(INSTALL)/lib/gnat
+-I_TPL = $(INSTALL)/share/examples/aunit
+-I_DOC = $(INSTALL)/share/doc/aunit
+-I_PLG = $(INSTALL)/share/gps/plug-ins
++I_INC = ${DESTDIR}/$(INSTALL)/include/aunit
++I_LIB ?= ${DESTDIR}/$(INSTALL)/lib/aunit
++I_GPR = ${DESTDIR}/${ADA_PROJECT_PATH}
++I_TPL = ${DESTDIR}/$(INSTALL)/share/aunit/examples
++I_DOC = ${DESTDIR}/$(INSTALL)/share/doc/aunit
++I_PLG = ${DESTDIR}/$(INSTALL)/share/gps/plug-ins
+
+ .PHONY: all clean targets installed-targets install_clean install
+
+ all: support/aunit_shared.gpr
+- $(GPRBUILD) -Paunit/aunit_build -p -XRUNTIME=$(RTS) -XPLATFORM=$(TARGET) $(CONF_ARGS)
++ $(GPRBUILD) -Paunit/aunit_build -p ${GNATFLAGS}
+
+ installed-targets:
+ @printf "$(TARGET)\n" >> installed-targets
+@@ -83,20 +85,20 @@
+
+ install: install_clean support/aunit_shared.gpr
+ ifneq ($(INSTALL),)
+- $(MKDIR) $(I_DOC)
+- $(MKDIR) $(I_TPL)
+- $(MKDIR) $(I_PLG)
+- $(MKDIR) $(I_GPR)
+- $(MKDIR) $(I_LIB)
+- $(MKDIR) $(I_INC)
+- -$(CP) docs/*.html docs/*.info docs/*.pdf docs/*.txt $(I_DOC)
+- -$(CP) support/aunit.xml $(I_PLG)
+- $(CP) support/*.gpr $(I_GPR)
+- $(CP) -r examples/* $(I_TPL)
+- -$(CP) -r aunit/lib/* $(I_LIB)
+- $(CP) -r aunit/framework $(I_INC)
+- $(CP) -r aunit/containers $(I_INC)
+- $(CP) -r aunit/reporters $(I_INC)
++ $(MKDIR) /$(I_DOC)
++ $(MKDIR) /$(I_TPL)
++ $(MKDIR) /$(I_PLG)
++ $(MKDIR) /$(I_GPR)
++ $(MKDIR) /$(I_LIB)
++ $(MKDIR) /$(I_INC)
++ -$(CP) docs/*.html docs/*.info docs/*.pdf docs/*.txt /$(I_DOC)
++ -$(CP) support/aunit.xml /$(I_PLG)
++ $(CP) support/*.gpr /$(I_GPR)
++ $(CP) -r examples/* /$(I_TPL)
++ -$(CP) -r aunit/lib/* /$(I_LIB)
++ $(CP) -r aunit/framework /$(I_INC)
++ $(CP) -r aunit/containers /$(I_INC)
++ $(CP) -r aunit/reporters /$(I_INC)
+ @echo $(SRC_LIST)
+ @echo '------------------------------------------------------------------'
+ @echo '-- AUnit has now been installed.'
diff --git a/aunit-directories.patch b/aunit-directories.patch
new file mode 100644
index 0000000..e63e0f6
--- /dev/null
+++ b/aunit-directories.patch
@@ -0,0 +1,37 @@
+--- a/support/aunit.gpr 2010-06-04 14:21:25.000000000 +0400
++++ b/support/aunit.gpr 2011-03-25 22:26:20.841001221 +0300
+@@ -1,20 +1,23 @@
++with "directories";
+ with "aunit_shared";
+
+ project AUnit is
+
+- for Library_Dir use
+- "../../lib/aunit/" & AUnit_Shared.Target & "-" & AUnit_Shared.Runtime;
++for Library_Dir use
++ Directories.Libdir & "/aunit/" & AUnit_Shared.Target & "-" & AUnit_Shared.Runtime;
+
+- for Library_Name use "aunit";
+- for Library_Kind use "static";
+- for Externally_Built use "true";
++ for Library_Name use "aunit";
++ for Library_Kind use "relocatable";
++ for Library_Version use
++ "lib" & Project'Library_Name & ".so." & Version;
++ for Externally_Built use "true";
+
+ for Source_Dirs use
+- ("../../include/aunit/framework",
+- "../../include/aunit/containers",
+- "../../include/aunit/reporters",
+- "../../include/aunit/framework/" & AUnit_Shared.Except,
+- "../../include/aunit/framework/" & AUnit_Shared.Calend,
+- "../../include/aunit/framework/" & AUnit_Shared.Memory);
++ (Directories.Includedir & "/aunit/framework",
++ Directories.Includedir & "/aunit/containers",
++ Directories.Includedir & "/aunit/reporters",
++ Directories.Includedir & "/aunit/framework/" & AUnit_Shared.Except,
++ Directories.Includedir & "/aunit/framework/" & AUnit_Shared.Calend,
++ Directories.Includedir & "/aunit/framework/" & AUnit_Shared.Memory);
+
+ end AUnit;
diff --git a/aunit-optflags.patch b/aunit-optflags.patch
new file mode 100644
index 0000000..e94cfb8
--- /dev/null
+++ b/aunit-optflags.patch
@@ -0,0 +1,13 @@
+--- a/aunit/aunit_build.gpr 2011-04-30 14:17:15.269835999 +0400
++++ b/aunit/aunit_build.gpr 2011-04-30 14:17:25.812836007 +0400
+@@ -19,10 +19,6 @@
+ "framework/" & AUnit_Shared.Calend,
+ "framework/" & AUnit_Shared.Memory);
+
+- package Compiler is
+- for Default_Switches ("ada") use
+- ("-g", "-gnatQ", "-O1", "-gnatf", "-gnato", "-gnatwa.Xe", "-gnaty");
+- end Compiler;
+
+ package IDE is
+ for VCS_Kind use "Subversion";
diff --git a/aunit.spec b/aunit.spec
new file mode 100644
index 0000000..e6acd95
--- /dev/null
+++ b/aunit.spec
@@ -0,0 +1,99 @@
+## rpmbuild cannot create debuginfo
+## for ada packages
+%define debug_package %{nil}
+
+Name: aunit
+Version: 2010
+Release: 2%{?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-2010-src.tgz
+# Add DESTDIR to make install
+Patch0: aunit-2010-makefile.patch
+# Use shared linraries
+Patch1: aunit-2010-libdir.patch
+# Fedora specific
+Patch2: aunit-directories.patch
+# Remove vendor optflags
+Patch3: aunit-optflags.patch
+
+
+BuildRequires: fedora-gnat-project-common >= 2
+BuildRequires: chrpath gprbuild
+
+Requires: fedora-gnat-project-common >= 2
+
+%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-gpl-2010-src
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%build
+## Doen't compile without this options
+export GNATFLAGS="%{GNAT_optflags} -cargs -fno-strict-aliasing "
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+export ADA_PROJECT_DIR=%{_GNAT_project_dir}
+make install DESTDIR=$RPM_BUILD_ROOT I_LIB="%{buildroot}/%{_libdir}/%{name}/"
+## There is no gps in fedora
+rm -rf %{buildroot}/%{_datadir}/gps/
+chrpath --delete %{buildroot}/%{_libdir}/%{name}/native-full/libaunit.so.%{version}
+ln -s %{_libdir}/%{name}/native-full/lib%{name}.so.2010 %{buildroot}/%{_libdir}/lib%{name}.so.%{version}
+ln -s %{_libdir}/%{name}/native-full/lib%{name}.so %{buildroot}/%{_libdir}/lib%{name}.so
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING README
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/native-full
+%{_libdir}/%{name}/native-full/lib%{name}.so.2010
+%{_libdir}/lib%{name}.so.2010
+
+%files devel
+%defattr(-,root,root,-)
+%{_docdir}/%{name}
+%{_libdir}/%{name}/native-full/lib%{name}.so
+%{_libdir}/lib%{name}.so
+%{_libdir}/%{name}/native-full/%{name}*
+%{_libdir}/%{name}/native-full/ada_containers*
+%{_includedir}/%{name}
+%{_datadir}/%{name}
+%{_GNAT_project_dir}/%{name}.gpr
+%{_GNAT_project_dir}/%{name}_shared.gpr
+
+
+
+%changelog
+* Sat Apr 30 2011 Pavel Zhukov <landgraf at fedoraproject.org> - 2010-2
+- Remove vendor optflags
+
+* Mon Mar 28 2011 Pavel Zhukov <landgraf at fedoraproject.org> - 2010-1
+- Initial build
diff --git a/sources b/sources
index e69de29..45e3192 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7281d6b98a35ef474d46afb0c40da66d aunit-gpl-2010-src.tgz
More information about the scm-commits
mailing list