1 Summary: Curses library with POSIX thread support.
6 Group: Development/Libraries
7 Source: ncurses-%{version}-%{release}.tgz
8 # URL: https://invisible-island.net/ncurses/
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} with POSIX threads.
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 \\\
82 --enable-wgetch-events \\\
84 --enable-xmc-glitch \\\
85 --program-suffix=%{MY_ABI} \\\
87 --with-abi-version=%{MY_ABI} \\\
88 --with-config-suffix=dev \\\
90 --with-default-terminfo-dir=%{MYDATA} \\\
92 --with-extra-suffix=%{MY_ABI} \\\
93 --with-install-prefix=$RPM_BUILD_ROOT \\\
94 --with-pkg-config-libdir=%{MY_PKG} \\\
96 --with-terminfo-dirs=%{MYDATA}:/usr/share/terminfo \\\
100 --with-versioned-syms \\\
101 --with-xterm-kbs=DEL \\\
106 %configure %{CFG_OPTS} \
109 --program-suffix=t%{MY_ABI} \
114 rm -rf $RPM_BUILD_ROOT
116 make install.libs install.progs
118 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncursest%{MY_ABI} )
121 # check this first because Mageia has the /etc/redhat-release file...
124 %ldconfig_scriptlets libs
125 %ldconfig_scriptlets c++-libs
130 if rm -rf $RPM_BUILD_ROOT; then
133 find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1
138 %defattr(-,root,root,-)
145 * Tue Dec 24 2019 Thomas Dickey
146 - drop custom CC_NORMAL warning flags because setting CFLAGS interferes with
147 matching Fedora's PIE/PIC configuration. Also, generate debug/debug-source
150 * Sat Nov 16 2019 Thomas Dickey
151 - modify clean-rule to work around Fedora NFS bugs.
153 * Sat Aug 25 2018 Thomas E. Dickey
154 - split spec-file into ncurses6 and ncursest6 to work around toolset breakage
157 * Sat Jun 02 2018 Thomas E. Dickey
158 - build-fix for Mageia
160 * Sat May 26 2018 Thomas E. Dickey
161 - use predefined configure-macro
162 - separate ncurses6/ncursest6 packages
164 * Sat Feb 10 2018 Thomas E. Dickey
165 - add ncursest6 package
166 - add several development features
168 * Mon Jan 01 2018 Thomas E. Dickey
169 - drop redundant files pattern for "*.pc"
171 * Tue Dec 26 2017 Thomas E. Dickey
172 - add --with-config-suffix option
174 * Sun Apr 26 2015 Thomas E. Dickey
175 - move package to /usr
177 * Sun Apr 12 2015 Thomas E. Dickey
180 * Sat Mar 09 2013 Thomas E. Dickey
181 - add --with-cxx-shared option to demonstrate c++ binding as shared library
183 * Sat Oct 27 2012 Thomas E. Dickey
184 - add ncurses program as "ncurses6" to provide demonstration.
186 * Fri Jun 08 2012 Thomas E. Dickey