%define AppProgram AdaCurses
%define AppVersion MAJOR.MINOR
%define AppRelease YYYYMMDD
-# $Id: AdaCurses.spec,v 1.29 2022/11/13 00:35:00 tom Exp $
+# $Id: AdaCurses.spec,v 1.31 2022/12/18 00:08:17 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: %{AppRelease}
%define debug_package %{nil}
-%define need_filter %(if grep -E -i '(mageia|red hat|fedora)' /etc/issue >/dev/null; then echo 1; elif test -f /etc/fedora-release; then echo 1; else echo 0; fi)
+%define need_filter %(if grep -E -i '(red hat|fedora)' /etc/issue >/dev/null; then echo 1; elif test -f /etc/fedora-release; then echo 1; else echo 0; fi)
%if %{need_filter} == 1
# http://fedoraproject.org/wiki/EPEL:Packaging_Autoprovides_and_Requires_Filtering
%build
-%define ada_libdir %{_prefix}/lib/ada/adalib
+%define ada_libdir %{_libdir}/ada/adalib
%define ada_include %{_prefix}/share/ada/adainclude
%if %{is_mandriva}
# Mageia 8 lacks gprbuild, needed for building shared libraries.
+%define ada_model --without-shared --without-ada-sharedlib --with-ada-objects=%{_libdir}/adalib
%else
+# OpenSUSE actually lacks gprbuild, but there is a workable "community" package.
+%define ada_model --with-shared --with-ada-sharedlib
%if %{is_redhat}
# Fedora 36 LTO does not work with gprbuild system configuration.
unset CFLAGS
%endif
INSTALL_PROGRAM='${INSTALL}' \
- ./configure \
+ ./configure %{ada_model} \
--target %{_target_platform} \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--libdir=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
--with-ada-include=%{ada_include} \
--with-ada-objects=%{ada_libdir} \
--mandir=%{_mandir} \
--disable-rpath-link \
--disable-echo \
--verbose \
- --enable-warnings \
- --with-shared \
- --with-ada-sharedlib
+ --enable-warnings
make
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
-
-( cd samples &&
- make install.examples \
- DESTDIR=$RPM_BUILD_ROOT \
- BINDIR=$RPM_BUILD_ROOT%{_bindir}/%{AppProgram}
-)
+make install.examples DESTDIR=$RPM_BUILD_ROOT
%clean
if rm -rf $RPM_BUILD_ROOT; then
%files
%defattr(-,root,root)
+%{_bindir}/%{AppProgram}
%{_bindir}/adacurses*-config
-%{_bindir}/%{AppProgram}/*
+%{_libexecdir}/%{AppProgram}/*
%{ada_libdir}/
%if %{need_filter} == 1
%{_libdir}/lib%{AppProgram}.*
%changelog
# each patch should add its ChangeLog entries here
+* Sat Dec 17 2022 Thomas Dickey
+- install sample programs in libexec
+
+* Sat Nov 19 2022 Thomas Dickey
+- use static libraries for Mageia.
+
* Sat Nov 12 2022 Thomas Dickey
- unset environment variables to work around Fedora LTO bugs.
- build-fix for OpenSUSE with gprbuild.