ncurses 6.2 - patch 20200711
[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.25 2019/11/23 21:15:31 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 %define debug_package %{nil}
24
25 %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)
26
27 %if %{need_filter} == 1
28 # http://fedoraproject.org/wiki/EPEL:Packaging_Autoprovides_and_Requires_Filtering
29 %filter_from_requires /lib%{AppProgram}.so.1/d
30 %filter_setup
31 %endif
32
33 %setup -q -n %{AppProgram}-%{AppRelease}
34
35 %build
36
37 %define ada_libdir %{_prefix}/lib/ada/adalib
38 %define ada_include %{_prefix}/share/ada/adainclude
39
40 INSTALL_PROGRAM='${INSTALL}' \
41         ./configure \
42                 --target %{_target_platform} \
43                 --prefix=%{_prefix} \
44                 --bindir=%{_bindir} \
45                 --libdir=%{_libdir} \
46                 --with-ada-include=%{ada_include} \
47                 --with-ada-objects=%{ada_libdir} \
48                 --mandir=%{_mandir} \
49                 --datadir=%{_datadir} \
50                 --disable-rpath-link \
51                 --with-shared \
52                 --with-ada-sharedlib
53
54 make
55
56 %install
57 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
58
59 make install DESTDIR=$RPM_BUILD_ROOT
60
61 ( cd samples &&
62   make install.examples \
63     DESTDIR=$RPM_BUILD_ROOT \
64     BINDIR=$RPM_BUILD_ROOT%{_bindir}/%{AppProgram}
65 )
66
67 %clean
68 if rm -rf $RPM_BUILD_ROOT; then
69   echo OK
70 else
71   find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1
72 fi
73 exit 0
74
75 %files
76 %defattr(-,root,root)
77 %{_bindir}/adacurses*-config
78 %{_bindir}/%{AppProgram}/*
79 %{ada_libdir}/
80 %if %{need_filter} == 1
81 %{_libdir}/lib%{AppProgram}.*
82 %endif
83 %{_mandir}/man1/adacurses*-config.1*
84 %{_datadir}/%{AppProgram}/*
85 %{ada_include}/
86
87 %changelog
88 # each patch should add its ChangeLog entries here
89
90 * Sat Nov 16 2019 Thomas Dickey
91 - modify clean-rule to work around Fedora NFS bugs.
92
93 * Sat Sep 14 2019 Thomas Dickey
94 - build-fixes for Fedora29, OpenSUSE
95
96 * Sat Sep 07 2019 Thomas Dickey
97 - use AppProgram to replace "AdaCurses" globally
98 - amend install-paths to work with Fedora30
99
100 * Thu Mar 31 2011 Thomas Dickey
101 - use --with-shared option for consistency with --with-ada-sharelib
102 - ensure that MY_DATADIR is set when installing examples
103 - add ada_libdir symbol to handle special case where libdir is /usr/lib64
104 - use --disable-rpath-link to link sample programs without rpath
105
106 * Fri Mar 25 2011 Thomas Dickey
107 - initial version