]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/package/AdaCurses.spec
ncurses 6.3 - patch 20221112
[ncurses.git] / Ada95 / package / AdaCurses.spec
1 Summary: Ada95 binding for ncurses
2 %define AppProgram AdaCurses
3 %define AppVersion MAJOR.MINOR
4 %define AppRelease YYYYMMDD
5 # $Id: AdaCurses.spec,v 1.29 2022/11/13 00:35:00 tom Exp $
6 Name: %{AppProgram}
7 Version: %{AppVersion}
8 Release: %{AppRelease}
9 License: MIT
10 Group: Applications/Development
11 URL: ftp://ftp.invisible-island.net/%{AppProgram}
12 Source0: %{AppProgram}-%{AppRelease}.tgz
13 Packager: Thomas Dickey <dickey@invisible-island.net>
14
15 %description
16 This is the Ada95 binding from the ncurses MAJOR.MINOR distribution, for
17 patch-date YYYYMMDD.
18
19 In addition to a library, this package installs sample programs in
20 "bin/%{AppProgram}" to avoid conflict with other packages.
21 %prep
22
23 %global is_mandriva %(test -f /etc/mandriva-release && echo 1 || echo 0)
24 %global is_redhat   %(test -f /etc/redhat-release && echo 1 || echo 0)
25 %global is_suse     %(if grep -E -i '(opensuse)' /etc/issue >/dev/null; then echo 1; else echo 0; fi)
26
27 %define debug_package %{nil}
28
29 %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)
30
31 %if %{need_filter} == 1
32 # http://fedoraproject.org/wiki/EPEL:Packaging_Autoprovides_and_Requires_Filtering
33 %filter_from_requires /lib%{AppProgram}.so.1/d
34 %filter_setup
35 %endif
36
37 %setup -q -n %{AppProgram}-%{AppRelease}
38
39 %build
40
41 %define ada_libdir %{_prefix}/lib/ada/adalib
42 %define ada_include %{_prefix}/share/ada/adainclude
43
44 %if %{is_mandriva}
45 # Mageia 8 lacks gprbuild, needed for building shared libraries.
46 %else
47 %if %{is_redhat}
48 # Fedora 36 LTO does not work with gprbuild system configuration.
49 unset CFLAGS
50 unset LDFLAGS
51 unset LT_SYS_LIBRARY_PATH
52 %endif
53 %endif
54
55 INSTALL_PROGRAM='${INSTALL}' \
56         ./configure \
57                 --target %{_target_platform} \
58                 --prefix=%{_prefix} \
59                 --bindir=%{_bindir} \
60                 --libdir=%{_libdir} \
61                 --with-ada-include=%{ada_include} \
62                 --with-ada-objects=%{ada_libdir} \
63                 --mandir=%{_mandir} \
64                 --datadir=%{_datadir} \
65                 --disable-rpath-link \
66                 --disable-echo \
67                 --verbose \
68                 --enable-warnings \
69                 --with-shared \
70                 --with-ada-sharedlib
71
72 make
73
74 %install
75 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
76
77 make install DESTDIR=$RPM_BUILD_ROOT
78
79 ( cd samples &&
80   make install.examples \
81     DESTDIR=$RPM_BUILD_ROOT \
82     BINDIR=$RPM_BUILD_ROOT%{_bindir}/%{AppProgram}
83 )
84
85 %clean
86 if rm -rf $RPM_BUILD_ROOT; then
87   echo OK
88 else
89   find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1
90 fi
91 exit 0
92
93 %files
94 %defattr(-,root,root)
95 %{_bindir}/adacurses*-config
96 %{_bindir}/%{AppProgram}/*
97 %{ada_libdir}/
98 %if %{need_filter} == 1
99 %{_libdir}/lib%{AppProgram}.*
100 %endif
101 %if %{is_suse}
102 %{_libdir}/lib%{AppProgram}.*
103 %endif
104 %{_mandir}/man1/adacurses*-config.1*
105 %{_datadir}/%{AppProgram}/*
106 %{ada_include}/
107
108 %changelog
109 # each patch should add its ChangeLog entries here
110
111 * Sat Nov 12 2022 Thomas Dickey
112 - unset environment variables to work around Fedora LTO bugs.
113 - build-fix for OpenSUSE with gprbuild.
114
115 * Sat Nov 16 2019 Thomas Dickey
116 - modify clean-rule to work around Fedora NFS bugs.
117
118 * Sat Sep 14 2019 Thomas Dickey
119 - build-fixes for Fedora29, OpenSUSE
120
121 * Sat Sep 07 2019 Thomas Dickey
122 - use AppProgram to replace "AdaCurses" globally
123 - amend install-paths to work with Fedora30
124
125 * Thu Mar 31 2011 Thomas Dickey
126 - use --with-shared option for consistency with --with-ada-sharelib
127 - ensure that MY_DATADIR is set when installing examples
128 - add ada_libdir symbol to handle special case where libdir is /usr/lib64
129 - use --disable-rpath-link to link sample programs without rpath
130
131 * Fri Mar 25 2011 Thomas Dickey
132 - initial version