# Limit build to 1 CPU (-j1). Linking fails when building with parrallel make # (-j4) and at the same time using Zlib-Ada version 1.4^20210830gitca39312. No # idea what might be the cause. Errors are somewhat incomprehensible: Lots of # undefined references in the files generated by the binder. %constrain_build # Disabling LTO for now. LTO triggers an internal compiler error when # SSL (GnuTLS) is enabled (error message : "lto1: internal compiler # error: resolution sub id 0x7eb8fd216cff1b34 not in object file"). %global _lto_cflags %nil # To harden the AWS executables, we need to perform a staged build during which # we first build the library and then the executables. Unfortunately, this is # harder than it seems due to the complicated Makefile. Hence, for now, we skip # hardening for this package. %undefine _hardened_build # The test suite is normally run. # It can be disabled with "--without=check". %bcond_without check # Support for GnuTLS is normally enabled. # It can be disabled with "--without=gnutls". %bcond_without gnutls # Support for LDAP normally enabled. # It can be disabled with "--without=ldap". %bcond_without ldap # The GNATstudio plug-in is normally excluded because GNATstudio isn't packaged. # It can be included with "--with=gps". %bcond_with gps # Upstream source information. %global upstream_owner AdaCore %global upstream_name aws %global upstream_version 24.0.0 %global upstream_gittag v%{upstream_version} Name: aws Epoch: 2 Version: %{upstream_version} Release: 1%{?dist} Summary: The Ada web server License: GPL-3.0-or-later WITH GCC-exception-3.1 AND GPL-3.0-or-later WITH GNAT-exception-3.1 AND GPL-2.0-or-later WITH GNAT-exception # The license is GPLv3+ with both the GCC and the GNAT runtime exception, # except for: # - include/memory_streams.ads : GPLv2+ with GNAT runtime exception # - include/memory_streams.adb : GPLv2+ with GNAT runtime exception # - config/ssl/gnutls/wrappers.c : GPLv2+ with GNAT runtime exception # - config/ssl/openssl/wrappers.c : GPLv2+ with GNAT runtime exception # # OPEN ISSUE: What are the licenses of the manpages? URL: https://github.com/%{upstream_owner}/%{upstream_name} Source0: %{url}/archive/%{upstream_gittag}/%{upstream_name}-%{upstream_version}.tar.gz # Man pages. Source1: aws-manpages.tar.gz # [Backport] https://github.com/AdaCore/aws/commit/082a3930be6078a5f7e62b357933fa6d2d64f9fd Patch: %{name}-fix-wrong-install-native-makefile-rule.patch # [Fedora-specific] No silent Makefile. Patch: %{name}-no-silent-makefile.patch # [Fedora-specific] Use external template parser. Patch: %{name}-use-external-template-parser.patch # [Fedora-specific] Use external zlib library. Patch: %{name}-use-external-zlib-library.patch # [Fedora-specific] Use external xmlada library. Patch: %{name}-use-external-xmlada-library.patch # [Fedora-specific] Set soname of the AWS library. Patch: %{name}-set-soname-of-aws-library.patch # [Fedora-specific] Set soname of the AWS SSL library. Patch: %{name}-set-soname-of-aws-ssl-library.patch # [Fedora-specific] Link components dynamically. Patch: %{name}-link-components-dynamically.patch # [Fedora-specific] No build and install names. Patch: %{name}-no-build-and-install-names.patch # [Fedora-specific] Use the installed libraries/binaries when testing. Patch: %{name}-dont-use-build-dir-for-testing.patch # [Fedora-specific] Show test errors and abort if too many error. Patch: %{name}-change-test-runner-options.patch BuildRequires: gcc-gnat gprbuild make sed tar # A fedora-gnat-project-common that contains the new GPRinstall macro. BuildRequires: fedora-gnat-project-common >= 3.21 # Keep the templates_parser and AWS on the same version number. BuildRequires: templates_parser-devel = %{epoch}:%{version} BuildRequires: xmlada-devel BuildRequires: gnatcoll-devel # A zlib-ada that contains the 'End_Of_Stream' function is needed. BuildRequires: zlib-ada-devel >= 1.4-0.37.20210811gitca39312 %if %{with ldap} BuildRequires: openldap-devel %endif %if %{with gnutls} BuildRequires: gnutls-devel BuildRequires: libgcrypt-devel %endif # python3-rpm-macros is used in adjusting the shebang in awsascb. BuildRequires: python3-rpm-macros %if %{with check} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-e3-testsuite BuildRequires: python3-websocket-client %endif BuildRequires: python3-sphinx BuildRequires: python3-sphinx_rtd_theme BuildRequires: python3-sphinx-latex BuildRequires: latexmk # Build only on architectures where GPRbuild is available. ExclusiveArch: %{GPRbuild_arches} %global common_description_en \ AWS is a complete framework to develop Web based applications. The main part \ of the framework is the embedded Web server. This small yet powerful Web \ server can be embedded into your application so your application will be able \ to talk with a standard Web browser. %description %{common_description_en} ################# ## Subpackages ## ################# %package tools Summary: Tools for the Ada web server License: GPL-3.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: gnutls-devel Requires: libgcrypt-devel %description tools %{common_description_en} This package contains contains supporting tools for the Ada web server. %package doc Summary: Documentation for the Ada web server BuildArch: noarch License: AdaCore-doc AND MIT AND BSD-2-Clause AND GPL-3.0-or-later # License for the documentation is AdaCore-doc. The Javascript and CSS files # that Sphinx includes with the documentation are BSD 2-Clause and # MIT-licensed. The example code is licensed under GPLv3+. Various icons in # 'web_elements/icons' are either in the public domain or licensed under GPL (no # version mentioned). The file 'web_elements/javascripts/prototype.js' contains # code parts, one of which is licensed under an "MIT-style" license, and another # under the "MIT, BSD, and GPL Licenses". %description doc %{common_description_en} This package contains the documentation in HTML and PDF, and some examples. %package devel Summary: Development files for the Ada web server Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: fedora-gnat-project-common Requires: templates_parser-devel = %{epoch}:%{version} Requires: xmlada-devel Requires: gnatcoll-devel Requires: zlib-ada-devel %if %{with gnutls} Requires: gnutls-devel Requires: libgcrypt-devel %endif %if %{with ldap} Requires: openldap-devel %endif Recommends: %{name}-tools Recommends: %{name}-doc %description devel %{common_description_en} This package contains source code and linking information for developing applications that use the Ada web server. ############# ## Prepare ## ############# %prep %autosetup -p1 # Update some release specific information in the source code. The substitution # is scoped to a specific line to increase the chance of detecting code changes # at this point. Sed should exit with exit code 0 if the substitution succeeded # (using `t`, jump to end of script) or exit with a non-zero exit code if the # substitution failed (using `q1`, quit with exit code 1). sed --in-place \ --expression="34 { s,20.0,%{upstream_version}, ; t; q1 }" \ src/core/aws.ads # Unpack the man pages. tar -xvf %SOURCE1 # Ignore the template_parser Git submodule. rm -rf templates_parser # Don't include the embedded zlib library. rm -rf include/zlib* # Convert readme.txt to UTF8. mv readme.txt readme.txt.old iconv --from=ISO-8859-1 --to=UTF-8 readme.txt.old > readme.txt rm readme.txt.old ########### ## Build ## ########### %build %if %{with ldap} LDAP=true %else LDAP=false %endif # SSL dynamic binding option (SSL_DYNAMIC) is disabled as it requires # libadalang; a library not (yet) available on Fedora (see also: # config/ssl/dynamo.gpr). %if %{with gnutls} SOCKET=gnutls SSL_DYNAMIC=false %else SOCKET=std SSL_DYNAMIC=false %endif make setup GPRBUILD='gprbuild %{GPRbuild_flags} -XVERSION=%{version}' \ PYTHON='%python3' ENABLE_SHARED=true DEBUG=false \ XMLADA=true LAL=false ZLIB=true \ LDAP=$LDAP SOCKET=$SOCKET SSL_DYNAMIC=$SSL_DYNAMIC %{make_build} GPRBUILD='gprbuild %{GPRbuild_flags} -XVERSION=%{version}' \ LIBRARY_TYPE=relocatable # Make the documentation make -C docs html latexpdf ############# ## Install ## ############# %install # Note: Cannot use the make_install macro: the INSTALL variable, which is part # of the macro definition, is rejected by Makefile.checks. make install \ GPRINSTALL='%{GPRinstall} -XVERSION=%{version}' \ prefix=%{buildroot}%{_prefix} # Move the examples to the _pkgdocdir and remove the remaining empty directory. mv --no-target-directory \ %{buildroot}%{_datadir}/examples/%{name} \ %{buildroot}%{_pkgdocdir}/examples rmdir %{buildroot}%{_datadir}/examples # Add the missing libaws_ssl.so that the tools are linked to. cp --preserve=timestamps \ %{_builddir}/%{name}-%{version}/.build/*/release/relocatable/lib/ssl/lib%{name}_ssl.so* \ %{buildroot}%{_libdir}/ # Fix up the symbolic linkgs to the shared libraries. ln --symbolic --force lib%{name}.so.%{version} %{buildroot}%{_libdir}/lib%{name}.so ln --symbolic --force lib%{name}_ssl.so.%{version} %{buildroot}%{_libdir}/lib%{name}_ssl.so # Install the man pages. mkdir --parents %{buildroot}%{_mandir}/man1/ for manpage in $(ls *.1); do gzip --to-stdout $manpage >> %{buildroot}%{_mandir}/man1/$manpage.gz done # Adjust the shebang in awsascb to run Python the Fedora way. %{py3_shebang_fix} %{buildroot}/%{_bindir}/awsascb # Before making the project files architecture-independent, copy the buildroot # into a separate directory for later testing. The testsuite fails if applied to # the buildroot after making the project files architecture-independent because # of the hardcoded paths in `directories.gpr`. %if %{with check} %global checkroot %{_builddir}/%{name}-%{version}/checkroot mkdir %{checkroot} cp --recursive %{buildroot}/* %{checkroot}/ %endif # Make the generated usage project file architecture-independent. 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 \& "/'%{name}'");|i' \ '--expression=s|^( *for +Library_Dir +use +).*;$|\1Directories.Libdir;|i' \ '--expression=s|^( *for +Library_ALI_Dir +use +).*;$|\1Directories.Libdir \& "/'%{name}'";|i' \ %{buildroot}%{_GNAT_project_dir}/%{name}.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. ########### ## Check ## ########### %if %{with check} %check # Disable test that cannot be run on Fedora. cat << EOF > regtests/0043_check_mem/test.opt ALL XFAIL Fedora-specific: GNATmem not available on Fedora. EOF # Make the files of this packages visible to the test runner. export PATH=%{checkroot}%{_bindir}:$PATH export LD_LIBRARY_PATH=%{checkroot}%{_libdir}:$LD_LIBRARY_PATH export GPR_PROJECT_PATH=%{checkroot}%{_GNAT_project_dir}:$GPR_PROJECT_PATH export AWS_TEMPLATE_FILES=%{checkroot}%{_pkgdocdir}/examples/wsdl2aws-templates # Run the actual tests. make run_regtests PYTHON='%python3' %endif ########### ## Files ## ########### %files %doc readme* AUTHORS %license COPYING3 COPYING.RUNTIME %dir %{_libdir}/%{name} %{_libdir}/lib%{name}.so.%{version} %{_libdir}/lib%{name}_ssl.so.%{version} %files devel %doc INSTALL %{_GNAT_project_dir}/*.gpr %{_includedir}/%{name} %dir %{_libdir}/%{name} %attr(444,-,-) %{_libdir}/%{name}/*.ali %{_libdir}/lib%{name}*.so # Optional GNATstudio plugin. %if %{with gps} %{_datadir}/gps %else %exclude %{_datadir}/gps %endif %files tools # Set the file permissions to make awsascb executable. %attr(755,-,-) %{_bindir}/* %attr(644,-,-) %{_mandir}/man1/*.1.gz %files doc %{_pkgdocdir}/html %{_pkgdocdir}/pdf %{_pkgdocdir}/examples # Exclude Sphinx-generated files that aren't needed in the package. %exclude %{_pkgdocdir}/html/.buildinfo %exclude %{_pkgdocdir}/html/objects.inv ############### ## Changelog ## ############### %changelog * Sat May 18 2024 Dennis van Raaij - 2:24.0.0-1 - Updated to v24.0.0. - Generated HTML-documentation now uses the 'Read the Docs' Sphinx theme. - Changed build from 'debug' to 'release'. - Add missing build dependency 'tar'. - Use the new GPRinstall macro. * Sat May 18 2024 Dennis van Raaij - 2:23.0.0-1 - Updated to v23.0.0. * Sat May 18 2024 Dennis van Raaij - 2:22.0.0-1 - Updated to v22.0.0. - Changed the epoch to mark the new upstream version scheme. - Changed the epoch to 2 instead of 1 for consistency with the GNATcoll packages. - Removed year/version from the patch filenames; version control should suffice. - Added Sphinx and LaTeX as build dependencies for the documentation. - License fields now contain SPDX license expressions. - Updated the license of the doc package. - Removed the build dependency on chrpath; the tool isn't used. - Pinned the version of templates_parser dependency. - Fix up the symbolic links for the shared libraries. - Made the generated project files architecture-independent. - Made the GNATstudio plugin depend on a bcond_with. - Support for GnuTLS now depends on a bcond_without. - Support for LDAP now depends on a bcond_without. - Updated all summaries and descriptions. - Improved spec file readability. - Removed all runtime dependencies from the doc package. - Added the tools package as a recommendation to the devel package. - Added the doc package as a suggestion to the devel package. * Sun Feb 11 2024 Björn Persson - 2020-16 - Rebuilt with XMLada 24. * Tue Jan 23 2024 Fedora Release Engineering - 2020-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 2020-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Jan 16 2024 Björn Persson - 2020-13 - Rebuilt with GCC 14 prerelease. * Wed Jul 19 2023 Fedora Release Engineering - 2020-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Mar 15 2023 Björn Persson - 2020-11 - Rebuilt with XMLada 23. * Wed Jan 18 2023 Fedora Release Engineering - 2020-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Jan 17 2023 Björn Persson - 2020-9 - Rebuilt with GCC 13. * Wed Jul 20 2022 Fedora Release Engineering - 2020-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue May 03 2022 Mamoru TASAKA - 2020-7 - Rebuild for new gnat * Wed Jan 19 2022 Fedora Release Engineering - 2020-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Jul 21 2021 Fedora Release Engineering - 2020-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Apr 02 2021 Björn Persson - 2020-4 - rebuilt with gcc-11.0.1-0.3 * Tue Jan 26 2021 Fedora Release Engineering - 2020-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Dec 9 2020 Pavel Zhukov - 2020-2 - Update to new version 2020 * Mon Jul 27 2020 Fedora Release Engineering - 2019-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sun Feb 9 2020 Pavel Zhukov - 2019-2 - New release (2019) build with gcc10 (#1800306) * Sun Feb 09 2020 Björn Persson - 2018-6 - Adapted to compiler and API changes in GCC 10. * Tue Jan 28 2020 Fedora Release Engineering - 2018-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Jul 24 2019 Fedora Release Engineering - 2018-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Mar 12 2019 Pavel Zhukov - 2018-4 - Revert changes which were lost on rebase * Tue Feb 12 2019 Pavel Zhukov -2018-2 - New release 2018 * Thu Jan 31 2019 Fedora Release Engineering - 2017-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sun Sep 16 2018 Björn Persson - 2017-11 - Migrated to Python 3. * Thu Jul 12 2018 Fedora Release Engineering - 2017-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Igor Gnatenko - 2017-9 - Escape macros in changelog * Tue Feb 06 2018 Pavel Zhukov - 2017-8 - Add ssl library to the list of installed files * Tue Feb 06 2018 Pavel Zhukov - 2017-7 - rebuilt * Wed Aug 02 2017 Fedora Release Engineering - 2017-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 2017-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Jul 15 2017 Pavel Zhukov - 2017-4 - aws needs gprbuild. Limit to gprbuild_arches * Mon Jul 10 2017 Pavel Zhukov - 2017-3 - Add python version * Mon Jul 10 2017 Pavel Zhukov - 2017-2 - Fix so version * Mon Jul 10 2017 Pavel Zhukov - 2017-1 - New release v2017 * Fri Feb 10 2017 Fedora Release Engineering - 2016-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sun Nov 20 2016 Björn Persson - 2016-2 - Removed an ln command as GPRinstall apparently creates that link now. * Tue Aug 09 2016 Björn Persson - 2016-1 - Upgraded to the 2016 release. - Tagged the license file as such. * Tue Feb 02 2016 Björn Persson - 2015-5 - Rebuilt with GCC 6 prerelease. * Fri Nov 27 2015 Pavel Zhukov - 2015-4 - Added openldap requirement (#1285661) * Thu Sep 24 2015 Björn Persson - 2015-3 - Added the missing libaws_ssl.so. - Disabled PDF generation as it doesn't currently work. * Fri Jun 26 2015 Pavel Zhukov - 2015-2 - Remove references to gnutls rsa_params as deprecated * Thu Jun 25 2015 Pavel Zhukov - 2015-1 - New release (#2015) * Wed Jun 17 2015 Fedora Release Engineering - 3.2.0-2.git20150523 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Apr 30 2015 Björn Persson - 3.1.0-13 - Patched to build with GCC 5. * Sat Oct 11 2014 Pavel Zhukov - 3.1.0-12 - Fixed typos * Thu Oct 02 2014 Pavel Zhukov - 3.1.0-11 - Exclude %%{arm} * Fri Aug 15 2014 Fedora Release Engineering - 3.1.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Thu Jul 17 2014 Ralf Corsépius - 3.1.0-9 - Fix typo: R: libgcrypt-devel, not libgrypt-devel. - Add missing %%changelog entry. * Tue Jun 24 2014 Pavel Zhukov - 3.1.0-8 - Add missed requirements. * Sat Jun 07 2014 Fedora Release Engineering - 3.1.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Apr 21 2014 Pavel Zhukov - 3.1.0-5 - Rebuild with new GCC * Wed Dec 18 2013 Pavel Zhukov - 3.1.0-4 - Add demos - Fix libdir in subpackages * Tue Dec 17 2013 Pavel Zhukov - 3.1.0-1 - New release 3.1.0 * Sat Aug 03 2013 Fedora Release Engineering - 2.11.0-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Mar 13 2013 Pavel Zhukov - 2.11.0-16 - Disable gnutls support (rhbz#918554) * Sun Mar 10 2013 Pavel Zhukov - 2.11.0-15 - Rebuild with new xmlada * Wed Mar 6 2013 Tomáš Mráz 2.11.0-14 - Rebuild with new gnutls * Fri Jan 25 2013 Kevin Fenzi 2.11.0-13 - Rebuild for new libgnat * Tue Dec 18 2012 Pavel Zhukov - 2.11.0-12 - New xmlada * Fri Nov 2 2012 Pavel Zhukov - 2.11.0-11 - Add gcc-gnat and zlib-ada-devel dependencies * Sun Oct 28 2012 Pavel Zhukov - 2.11.0-10 - Remove "-lz" flag - Remove dependencies -doc from base package - Fix tools license - Add man pages * Sat Oct 13 2012 Pavel Zhukov - 2.11.0-8 - Remove zlib-ada sources - Fix license tag - Multiple fixes https://bugzilla.redhat.com/show_bug.cgi?id=810676#c28 - Fix gpr * Mon Aug 20 2012 Pavel Zhukov - 2.11.0-6 - Fix templates_parser import - Add gnutls patch - Fix license - Add LDAP support * Fri Aug 17 2012 Pavel Zhukov - 2.11.0-4 - Change group - Remove template_parsers.gpr - Add doc subpackages * Thu Aug 16 2012 Pavel Zhukov - 2.11.0-2 - Fix ipv6 issue - Add tools package * Thu Aug 16 2012 Pavel Zhukov - 2.11.0-1 - Update to AWS-2012 * Sun May 20 2012 Pavel Zhukov - 2.10.0-7 - Change cp with cp -a - Remove chrpath dependency * Fri Apr 13 2012 Pavel Zhukov - 2.10.0-6 - Fix copyright in aws.gpr file * Mon Apr 09 2012 Pavel Zhukov - 2.10.0-5 - Fix -devel requires - Fix -devel license - Fix version in ChangeLog * Sun Apr 08 2012 Pavel Zhukov - 2.10.0-4 - Fix smp optflag * Sun Mar 25 2012 Pavel Zhukov - 2.10.0-3 - Fix gpr file with "xmlada"; added * Sat Mar 24 2012 Pavel Zhukov - 2.10.0-2 - Initial build - add "directories"