1 Summary: shared libraries for terminal handling
6 Group: Development/Libraries
7 URL: https://invisible-island.net/ncurses/
8 Source: https://invisible-island.net/archives/ncurses/ncurses-%{version}-%{release}.tgz
12 # save value before redefining
13 %global sys_libdir %{_libdir}
16 #global _prefix /usr/local/ncurses#{MY_ABI}
18 %global MY_PKG %{sys_libdir}/pkgconfig
19 %define MYDATA /usr/local/ncurses/share/terminfo
22 The ncurses library routines are a terminal-independent method of
23 updating character screens with reasonable optimization.
25 This package is used for testing ABI %{MY_ABI}.
29 %global is_mandriva %(test -f /etc/mandriva-release && echo 1 || echo 0)
30 %global is_fedora %(test -f /usr/bin/dnf && echo 1 || echo 0)
31 %global is_centos %(test -f /etc/centos-release && echo 1 || echo 0)
32 %global is_redhat %(test -f /etc/redhat-release && echo 1 || echo 0)
33 %global is_scilinux %(test -f /etc/sl-release && echo 1 || echo 0)
34 %global is_suse %(test -f /etc/SuSE-release && echo 1 || echo 0)
37 # generate debug/debug-source packages.
39 %define debug_package %{nil}
43 %define _disable_ld_as_needed 1
44 %define _disable_ld_no_undefined 1
45 # libtool is not used here...
46 %define _disable_libtoolize 1
47 %define _disable_ld_build_id 1
50 %if %{is_fedora} || %{is_scilinux} || %{is_centos}
51 # workaround for toolset breakage in Fedora 28
52 %define _test_relink --enable-relink
54 %define _test_relink --disable-relink
57 %setup -q -n ncurses-%{version}-%{release}
61 --target %{_target_platform} \\\
62 --prefix=%{_prefix} \\\
63 --bindir=%{_bindir} \\\
64 --includedir=%{_includedir} \\\
65 --libdir=%{_libdir} \\\
66 --includedir='${prefix}/include' \\\
71 --disable-overwrite \\\
74 --enable-hard-tabs \\\
75 --enable-opaque-curses \\\
76 --enable-opaque-form \\\
77 --enable-opaque-menu \\\
78 --enable-opaque-panel \\\
81 --enable-stdnoreturn \\\
83 --enable-wgetch-events \\\
85 --enable-xmc-glitch \\\
86 --program-suffix=%{MY_ABI} \\\
88 --with-abi-version=%{MY_ABI} \\\
89 --with-config-suffix=dev \\\
91 --with-default-terminfo-dir=%{MYDATA} \\\
93 --with-extra-suffix=%{MY_ABI} \\\
94 --with-install-prefix=$RPM_BUILD_ROOT \\\
95 --with-pkg-config-libdir=%{MY_PKG} \\\
97 --with-terminfo-dirs=%{MYDATA}:/usr/share/terminfo \\\
101 --with-versioned-syms \\\
102 --with-xterm-kbs=DEL \\\
107 %configure %{CFG_OPTS}
112 rm -rf $RPM_BUILD_ROOT
114 make install.libs install.progs
116 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncurses%{MY_ABI} )
119 # check this first because Mageia has the /etc/redhat-release file...
122 %ldconfig_scriptlets libs
123 %ldconfig_scriptlets c++-libs
128 %defattr(-,root,root,-)
135 * Sat Feb 25 2023 Thomas Dickey
136 - amend URLs per rpmlint
138 * Sat Oct 16 2021 Thomas Dickey
139 - disable rpath to address QA_RPATHS=1 warning.
141 * Tue Dec 24 2019 Thomas Dickey
142 - drop custom CC_NORMAL warning flags because setting CFLAGS interferes with
143 matching Fedora's PIE/PIC configuration. Also, generate debug/debug-source
146 * Sat Nov 16 2019 Thomas Dickey
147 - modify clean-rule to work around Fedora NFS bugs.
149 * Sat Aug 25 2018 Thomas E. Dickey
150 - split spec-file into ncurses6 and ncursest6 to work around toolset breakage
153 * Sat Jun 02 2018 Thomas E. Dickey
154 - build-fix for Mageia
156 * Sat May 26 2018 Thomas E. Dickey
157 - use predefined configure-macro
158 - separate ncurses6/ncursest6 packages
160 * Sat Feb 10 2018 Thomas E. Dickey
161 - add ncursest6 package
162 - add several development features
164 * Mon Jan 01 2018 Thomas E. Dickey
165 - drop redundant files pattern for "*.pc"
167 * Tue Dec 26 2017 Thomas E. Dickey
168 - add --with-config-suffix option
170 * Sun Apr 26 2015 Thomas E. Dickey
171 - move package to /usr
173 * Sun Apr 12 2015 Thomas E. Dickey
176 * Sat Mar 09 2013 Thomas E. Dickey
177 - add --with-cxx-shared option to demonstrate c++ binding as shared library
179 * Sat Oct 27 2012 Thomas E. Dickey
180 - add ncurses program as "ncurses6" to provide demonstration.
182 * Fri Jun 08 2012 Thomas E. Dickey