The package rpms/gnatcoll-db.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/gnatcoll-db.git/commit/?id=9a1b47....
Change:
+ExclusiveArch: %{GPRbuild_arches}
Thanks.
Full change:
============
commit 9a1b476c9a70aba1bddcfd0671c899bf73f1e35d
Author: Bjrn Persson <Bjorn(a)Rombobjrn.se>
Date: Wed May 29 16:08:49 2019 +0200
Imported.
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c1c97e2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/gnatcoll-db-gpl-2018-src.tar.gz
diff --git a/gnatcoll-db-2018-dborm_python3.patch b/gnatcoll-db-2018-dborm_python3.patch
new file mode 100644
index 0000000..ef87230
--- /dev/null
+++ b/gnatcoll-db-2018-dborm_python3.patch
@@ -0,0 +1,28 @@
+--- gnatcoll_db2ada/gnatcoll-db2ada-main.adb 2018-05-29 07:48:56.000000000 +0200
++++ gnatcoll_db2ada/gnatcoll-db2ada-main.adb 2019-03-23 21:54:21.830938736 +0100
+@@ -181,7 +181,7 @@
+
+ procedure Spawn_Dborm (Command : String; Extra_Args : Argument_List) is
+ DbOrm1 : constant String := -- official setup
+- Executable_Location & "share/gnatcoll/dborm.py";
++ "/usr/libexec/gnatcoll/dborm.py";
+ DbOrm2 : constant String := -- development setup
+ Executable_Location & "../dborm.py";
+ Status : aliased Integer;
+@@ -209,7 +209,7 @@
+
+ declare
+ Output : constant String := Get_Command_Output
+- (Command => "python",
++ (Command => "python3",
+ Arguments => Args,
+ Input => "",
+ Status => Status'Access,
+--- gnatcoll_db2ada/dborm.py 2018-03-05 14:06:38.000000000 +0100
++++ gnatcoll_db2ada/dborm.py 2019-03-23 21:57:54.004915244 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # This script should be compatible with both python 2 and python 3
+
+ import re
diff --git a/gnatcoll-db.spec b/gnatcoll-db.spec
new file mode 100644
index 0000000..3b061cd
--- /dev/null
+++ b/gnatcoll-db.spec
@@ -0,0 +1,268 @@
+Name: gnatcoll-db
+Version: 2018
+Release: 3%{?dist}
+Summary: The GNAT Components Collection database packages
+Summary(sv): GNAT Components Collection databaspaket
+
+License: GPLv3+
+# The source files are GPLv3+ and GPLv2+. These combine into GPLv3+ on the
+# binary code.
+URL:
https://github.com/AdaCore/gnatcoll-db
+Source:
http://mirrors.cdn.adacore.com/art/5b0ce9cbc7a4475263382be6#/gnatcoll-db-...
+# The long hexadecimal number is what identifies the file on the server.
+# Don't forget to update it!
+# The latest known address of the download page is:
+#
https://www.adacore.com/download/more
+
+# This patch makes gnatcoll_db2ada run dborm.py in python3, and also corrects
+# the location of dborm.py:
+Patch: gnatcoll-db-2018-dborm_python3.patch
+
+BuildRequires: gcc-gnat gprbuild fedora-gnat-project-common sed
+BuildRequires: gnatcoll-core-devel = %{version}
+BuildRequires: gnatcoll-bindings-devel = %{version}
+# Although upstream doesn't explicitly say so, I guess it's best to keep all
+# the parts of Gnatcoll on the same version number.
+BuildRequires: sqlite-devel libpq-devel
+# Build only on architectures where GPRbuild is available:
+ExclusiveArch: %{GPRbuild_arches}
+
+%global common_description_en \
+This is the database module of the GNAT Components Collection.
+
+%global common_description_sv \
+Detta r databasmodulen i GNAT Components Collection.
+
+%description %{common_description_en}
+
+%description -l sv %{common_description_sv}
+
+
+%package -n gnatcoll-sql
+Summary: The GNAT Components Collection SQL component
+Summary(sv): GNAT Components Collection SQL-komponenten
+
+%description -n gnatcoll-sql
+This is the SQL component of the GNAT Components Collection. It provides an
+object-oriented, high-level interface to SQL queries.
+
+%description -n gnatcoll-sql -l sv
+Detta r SQL-komponenten i GNAT Components Collection. Den tillhandahller ett
+objektorienterat hgnivgrnssnitt mot SQL-frgor.
+
+
+%package -n gnatcoll-sqlite
+Summary: The GNAT Components Collection SQLite support
+Summary(sv): GNAT Components Collection std fr SQLite
+
+%description -n gnatcoll-sqlite
+This component provides support for SQLite to the SQL component of the GNAT
+Components Collection.
+
+%description -n gnatcoll-sqlite -l sv
+Den hr komponenten tillhandahller std fr SQLite till SQL-komponenten i
+GNAT Components Collection.
+
+
+%package -n gnatcoll-postgres
+Summary: The GNAT Components Collection PostgreSQL support
+Summary(sv): GNAT Components Collection std fr PostgreSQL
+
+%description -n gnatcoll-postgres
+This component provides support for PostgreSQL to the SQL component of the GNAT
+Components Collection.
+
+%description -n gnatcoll-postgres -l sv
+Den hr komponenten tillhandahller std fr PostgreSQL till SQL-komponenten i
+GNAT Components Collection.
+
+
+%package -n gnatcoll-xref
+Summary: The GNAT Components Collection cross-referencing
+Summary(sv): GNAT Components Collection korshnvisning
+Provides: gnatinspect = %{version}-%{release}
+
+%description -n gnatcoll-xref
+This is the Xref component of the GNAT Components Collection. It provides
+support for parsing the .ali and .gli files that are generated by GNAT and GCC.
+In particular, those files contain information that can be used to do cross-
+references for entities (going from references to their declaration for
+instance).
+
+This package also contains Gnatinspect, a command-line tool for building and
+querying a database of cross-reference information.
+
+%description -n gnatcoll-xref -l sv
+Detta r komponenten Xref i GNAT Components Collection. Den analyserar .ali-
+och .gli-filerna som GNAT och GCC producerar. I de filerna finns uppgifter som
+kan anvndas till korshnvisning (till exempel att hitta en deklaration utifrn
+en referens).
+
+Det hr paketet innehller ocks Gnatinspect, ett kommandoradsverktyg fr att
+bygga och ska i en databas ver korshnvisningar.
+
+
+%package devel
+Summary: Development files for the GNAT Components Collection database packages
+Summary(sv): Filer fr programmering med GNAT Components Collection databaspaket
+Provides: gnatcoll_db2ada = %{version}-%{release}
+Provides: gnatcoll_all2ada = %{version}-%{release}
+Requires: gnatcoll-sql%{?_isa} = %{version}-%{release}
+Requires: gnatcoll-sqlite%{?_isa} = %{version}-%{release}
+Requires: gnatcoll-postgres%{?_isa} = %{version}-%{release}
+Requires: gnatcoll-xref%{?_isa} = %{version}-%{release}
+Requires: fedora-gnat-project-common gnatcoll-core-devel
+
+%description devel %{common_description_en}
+
+The gnatcoll-db-devel package contains source code and linking information for
+developing applications that use the GNAT Components Collection database
+packages.
+
+This package also contains the tool gnatcoll_db2ada, which generates an Ada
+package from a description of a database schema.
+
+%description devel -l sv %{common_description_sv}
+
+Paketet gnatcoll-db-devel innehller kllkod och lnkningsinformation som
+behvs fr att utveckla program som anvnder GNAT Components Collections
+databaspaket.
+
+Det hr paketet innehller ocks verktyget gnatcoll_db2ada som genererar ett
+adapaket frn en beskrivning av en databasstruktur.
+
+
+%prep
+%autosetup -n gnatcoll-db-gpl-%{version}-src -p0
+
+
+%build
+export GNATCOLL_VERSION=%{version}
+export BUILD=PROD
+export LIBRARY_TYPE=relocatable
+export GNATCOLL_SQLITE=external
+
+# Most of these components depend on each other and need to be built in
+# dependency order. Install the built libraries to a staging directory where
+# the later build jobs can find them.
+mkdir stage # without --parents to avoid clobbering any existing directory
+%global GPRbuild_args %{GPRbuild_optflags} -aP stage%{_GNAT_project_dir}
+for subdir in sql sqlite postgres xref ; do
+ component=gnatcoll_${subdir}
+ gprbuild -P ${subdir}/${component}.gpr %{GPRbuild_args}
+ gprinstall -P ${subdir}/${component}.gpr \
+ -aP stage%{_GNAT_project_dir} \
+ --prefix=${PWD}/stage%{_prefix} \
+ --lib-subdir=${PWD}/stage%{_libdir} \
+ --ali-subdir=${PWD}/stage%{_libdir}/${component} \
+ --no-lib-link -m --create-missing-dirs
+ ln --symbolic --force lib${component}.so.%{version} \
+ stage%{_libdir}/lib${component}.so
+done
+# There are four variants of gnatcoll_db2ada that differ in their database
+# support. Build the one that supports the most databases.
+for GPR in gnatinspect/gnatinspect.gpr gnatcoll_db2ada/gnatcoll_all2ada.gpr ; do
+ gprbuild -P ${GPR} %{GPRbuild_args} -cargs -fPIE
+ # -fPIE is added for the hardening.
+done
+
+
+%install
+# The libraries have already been staged, so just move them to the "buildroot"
+# staging directory.
+mv stage/* --target-directory=%{buildroot}
+
+# Stage the executable files.
+mkdir --parents %{buildroot}%{_bindir} %{buildroot}%{_libexecdir}/gnatcoll
+cp gnatinspect/obj/gnatinspect gnatcoll_db2ada/obj/gnatcoll_all2ada \
+ --target-directory=%{buildroot}%{_bindir}
+cp --preserve=timestamps gnatcoll_db2ada/dborm.py \
+ --target-directory=%{buildroot}%{_libexecdir}/gnatcoll
+
+# Preserving the command name "gnatcoll_db2ada" seems like a good idea.
+ln --symbolic gnatcoll_all2ada %{buildroot}%{_bindir}/gnatcoll_db2ada
+
+# Make the generated usage project files architecture-independent.
+for GPR in %{buildroot}%{_GNAT_project_dir}/*.gpr ; do
+ component=`basename --suffix=.gpr ${GPR}`
+ sed --regexp-extended --in-place \
+ '--expression=1i with "directories";' \
+ '--expression=/^-- This project has been generated/d' \
+ '--expression=/package Linker is/,/end Linker/d' \
+ '--expression=s|^( *for +Source_Dirs +use +).*;$|\1(Directories.Includedir
\& "/'${component}'");|i' \
+ '--expression=s|^( *for +Library_Dir +use +).*;$|\1Directories.Libdir;|i'
\
+ '--expression=s|^( *for +Library_ALI_Dir +use +).*;$|\1Directories.Libdir
\& "/'${component}'";|i' \
+ ${GPR}
+ # The Sed commands are:
+ # 1: Insert a with clause before the first line to import the directories
+ # project.
+ # 2: Delete a comment that mentions the architecture.
+ # 3: Delete the package Linker, which contains linker parameters that a
+ # shared library normally doesn't need, and can contain architecture-
+ # specific pathnames.
+ # 4: Replace the value of Source_Dirs with a pathname based on
+ # Directories.Includedir.
+ # 5: Replace the value of Library_Dir with Directories.Libdir.
+ # 6: Replace the value of Library_ALI_Dir with a pathname based on
+ # Directories.Libdir.
+done
+
+# GPRinstall's manifest files are architecture-specific because they contain
+# what seems to be checksums of architecture-specific files, so they must not
+# be under _datadir. Their function is poorly documented, but they seem to be
+# used when GPRinstall uninstalls packages. The manifest files are therefore
+# irrelevant in this RPM package, so delete them.
+rm --recursive --force %{buildroot}%{_GNAT_project_dir}/manifests
+
+# This readme file may be of some value to developers:
+mkdir --parents %{buildroot}%{_docdir}/gnatcoll/xref
+cp --preserve=timestamps xref/README.md \
+ --target-directory=%{buildroot}%{_docdir}/gnatcoll/xref
+
+# Install the license in a directory named after the source package.
+mkdir --parents %{buildroot}%{_licensedir}/%{name}
+cp --preserve=timestamps COPYING3 \
+ --target-directory=%{buildroot}%{_licensedir}/%{name}
+
+
+%check
+%{_rpmconfigdir}/check-rpaths
+
+
+%files -n gnatcoll-sql
+%{_libdir}/libgnatcoll_sql.so.*
+%license %{_licensedir}/%{name}
+# All the other subpackages depend on gnatcoll-sql, so only this one needs to
+# contain the license file.
+
+%files -n gnatcoll-sqlite
+%{_libdir}/libgnatcoll_sqlite.so.*
+
+%files -n gnatcoll-postgres
+%{_libdir}/libgnatcoll_postgres.so.*
+
+%files -n gnatcoll-xref
+%{_libdir}/libgnatcoll_xref.so.*
+%{_bindir}/gnatinspect
+
+%files devel
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/gnatcoll*
+%{_GNAT_project_dir}/*
+%{_bindir}/gnatcoll_*2ada
+%{_libexecdir}/gnatcoll
+%{_docdir}/gnatcoll
+
+
+%changelog
+* Sun May 26 2019 Bjrn Persson <Bjorn(a)Rombobjrn.se> - 2018-3
+- Added versions to Provides tags.
+- Tagged the license file as such.
+
+* Wed Apr 03 2019 Bjrn Persson <Bjorn(a)Rombobjrn.se> - 2018-2
+- Added more macro usage and more comments.
+- Removed unnecessary duplicates of the license file.
+
+* Sun Mar 24 2019 Bjrn Persson <Bjorn(a)Rombobjrn.se> - 2018-1
+- new package
diff --git a/sources b/sources
new file mode 100644
index 0000000..e7742c3
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (gnatcoll-db-gpl-2018-src.tar.gz) =
02c967b5951ef0e17e58874e03c9a6252f9c4b28100c9530fb88212e91bc692545f3acc8623477942db220bd54d56b494150b088d05c40f6a24aad8cf6a8f8de