1Summary: Curses library with POSIX thread support. 2Name: ncursest6 3Version: 6.5 4Release: 20240427 5License: X11 6Group: Development/Libraries 7Source: ncurses-%{version}-%{release}.tgz 8# URL: https://invisible-island.net/ncurses/ 9 10%global MY_ABI 6 11 12# save value before redefining 13%global sys_libdir %{_libdir} 14 15# was redefined... 16#global _prefix /usr/local/ncurses#{MY_ABI} 17 18%global MY_PKG %{sys_libdir}/pkgconfig 19%define MYDATA /usr/local/ncurses/share/terminfo 20 21%description 22The ncurses library routines are a terminal-independent method of 23updating character screens with reasonable optimization. 24 25This package is used for testing ABI %{MY_ABI} with POSIX threads. 26 27%prep 28 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) 35 36%if %{is_redhat} 37# generate debug/debug-source packages. 38%else 39%define debug_package %{nil} 40%endif 41 42%if %{is_mandriva} 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 48%endif 49 50%if %{is_fedora} || %{is_scilinux} || %{is_centos} 51# workaround for toolset breakage in Fedora 28 52%define _test_relink --enable-relink 53%else 54%define _test_relink --disable-relink 55%endif 56 57%setup -q -n ncurses-%{version}-%{release} 58 59%build 60%define CFG_OPTS \\\ 61 --target %{_target_platform} \\\ 62 --prefix=%{_prefix} \\\ 63 --bindir=%{_bindir} \\\ 64 --includedir=%{_includedir} \\\ 65 --libdir=%{_libdir} \\\ 66 --includedir='${prefix}/include' \\\ 67 --disable-echo \\\ 68 --disable-getcap \\\ 69 --disable-leaks \\\ 70 --disable-macros \\\ 71 --disable-overwrite \\\ 72 %{_test_relink} \\\ 73 --disable-termcap \\\ 74 --enable-hard-tabs \\\ 75 --enable-opaque-curses \\\ 76 --enable-opaque-form \\\ 77 --enable-opaque-menu \\\ 78 --enable-opaque-panel \\\ 79 --enable-pc-files \\\ 80 --enable-rpath \\\ 81 --enable-warnings \\\ 82 --enable-wgetch-events \\\ 83 --enable-widec \\\ 84 --enable-xmc-glitch \\\ 85 --program-suffix=%{MY_ABI} \\\ 86 --verbose \\\ 87 --with-abi-version=%{MY_ABI} \\\ 88 --with-config-suffix=dev \\\ 89 --with-cxx-shared \\\ 90 --with-default-terminfo-dir=%{MYDATA} \\\ 91 --with-develop \\\ 92 --with-extra-suffix=%{MY_ABI} \\\ 93 --with-install-prefix=$RPM_BUILD_ROOT \\\ 94 --with-pkg-config-libdir=%{MY_PKG} \\\ 95 --with-shared \\\ 96 --with-terminfo-dirs=%{MYDATA}:/usr/share/terminfo \\\ 97 --with-termlib \\\ 98 --with-ticlib \\\ 99 --with-trace \\\ 100 --with-versioned-syms \\\ 101 --with-xterm-kbs=DEL \\\ 102 --without-ada \\\ 103 --without-debug \\\ 104 --without-normal 105 106%configure %{CFG_OPTS} \ 107 --enable-interop \ 108 --enable-sp-funcs \ 109 --program-suffix=t%{MY_ABI} \ 110 --with-pthread 111make 112 113%install 114rm -rf $RPM_BUILD_ROOT 115 116make install.libs install.progs 117rm -f test/ncurses 118( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncursest%{MY_ABI} ) 119 120%if %{is_mandriva} 121# check this first because Mageia has the /etc/redhat-release file... 122%else 123%if %{is_fedora} 124%ldconfig_scriptlets libs 125%ldconfig_scriptlets c++-libs 126%endif 127%endif 128 129%clean 130if rm -rf $RPM_BUILD_ROOT; then 131 echo OK 132else 133 find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1 134fi 135exit 0 136 137%files 138%defattr(-,root,root,-) 139%{_bindir}/* 140%{_includedir}/* 141%{_libdir}/* 142 143%changelog 144 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 148 packages. 149 150* Sat Nov 16 2019 Thomas Dickey 151- modify clean-rule to work around Fedora NFS bugs. 152 153* Sat Aug 25 2018 Thomas E. Dickey 154- split spec-file into ncurses6 and ncursest6 to work around toolset breakage 155 in Fedora 28 156 157* Sat Jun 02 2018 Thomas E. Dickey 158- build-fix for Mageia 159 160* Sat May 26 2018 Thomas E. Dickey 161- use predefined configure-macro 162- separate ncurses6/ncursest6 packages 163 164* Sat Feb 10 2018 Thomas E. Dickey 165- add ncursest6 package 166- add several development features 167 168* Mon Jan 01 2018 Thomas E. Dickey 169- drop redundant files pattern for "*.pc" 170 171* Tue Dec 26 2017 Thomas E. Dickey 172- add --with-config-suffix option 173 174* Sun Apr 26 2015 Thomas E. Dickey 175- move package to /usr 176 177* Sun Apr 12 2015 Thomas E. Dickey 178- factor-out MY_ABI 179 180* Sat Mar 09 2013 Thomas E. Dickey 181- add --with-cxx-shared option to demonstrate c++ binding as shared library 182 183* Sat Oct 27 2012 Thomas E. Dickey 184- add ncurses program as "ncurses6" to provide demonstration. 185 186* Fri Jun 08 2012 Thomas E. Dickey 187- initial version. 188