• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Summary: shared libraries for terminal handling
2Name: ncurses6
3Version: 6.5
4Release: 20240427
5License: X11
6Group: Development/Libraries
7URL: https://invisible-island.net/ncurses/
8Source: https://invisible-island.net/archives/ncurses/ncurses-%{version}-%{release}.tgz
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}.
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	--disable-root-access \\\
73	--disable-root-environ \\\
74	--disable-rpath \\\
75	--disable-termcap \\\
76	%{_test_relink}  \\\
77	--enable-hard-tabs \\\
78	--enable-opaque-curses \\\
79	--enable-opaque-form \\\
80	--enable-opaque-menu \\\
81	--enable-opaque-panel \\\
82	--enable-pc-files \\\
83	--enable-stdnoreturn \\\
84	--enable-warnings \\\
85	--enable-wgetch-events \\\
86	--enable-widec \\\
87	--enable-xmc-glitch \\\
88	--program-suffix=%{MY_ABI} \\\
89	--verbose \\\
90	--with-abi-version=%{MY_ABI} \\\
91	--with-config-suffix=dev \\\
92	--with-cxx-shared \\\
93	--with-default-terminfo-dir=%{MYDATA} \\\
94	--with-develop \\\
95	--with-extra-suffix=%{MY_ABI} \\\
96	--with-install-prefix=$RPM_BUILD_ROOT \\\
97	--with-pkg-config-libdir=%{MY_PKG} \\\
98	--with-shared \\\
99	--with-terminfo-dirs=%{MYDATA}:/usr/share/terminfo \\\
100	--with-termlib \\\
101	--with-ticlib \\\
102	--with-trace \\\
103	--with-versioned-syms \\\
104	--with-xterm-kbs=DEL \\\
105	--without-ada \\\
106	--without-debug \\\
107	--without-normal
108
109%configure %{CFG_OPTS}
110
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}/ncurses%{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%files
130%defattr(-,root,root,-)
131%{_bindir}/*
132%{_includedir}/*
133%{_libdir}/*
134
135%changelog
136
137* Sat Feb 25 2023 Thomas Dickey
138- amend URLs per rpmlint
139
140* Sat Oct 16 2021 Thomas Dickey
141- disable rpath to address QA_RPATHS=1 warning.
142
143* Tue Dec 24 2019 Thomas Dickey
144- drop custom CC_NORMAL warning flags because setting CFLAGS interferes with
145  matching Fedora's PIE/PIC configuration.  Also, generate debug/debug-source
146  packages.
147
148* Sat Nov 16 2019 Thomas Dickey
149- modify clean-rule to work around Fedora NFS bugs.
150
151* Sat Aug 25 2018 Thomas E. Dickey
152- split spec-file into ncurses6 and ncursest6 to work around toolset breakage
153  in Fedora 28
154
155* Sat Jun 02 2018 Thomas E. Dickey
156- build-fix for Mageia
157
158* Sat May 26 2018 Thomas E. Dickey
159- use predefined configure-macro
160- separate ncurses6/ncursest6 packages
161
162* Sat Feb 10 2018 Thomas E. Dickey
163- add ncursest6 package
164- add several development features
165
166* Mon Jan 01 2018 Thomas E. Dickey
167- drop redundant files pattern for "*.pc"
168
169* Tue Dec 26 2017 Thomas E. Dickey
170- add --with-config-suffix option
171
172* Sun Apr 26 2015 Thomas E. Dickey
173- move package to /usr
174
175* Sun Apr 12 2015 Thomas E. Dickey
176- factor-out MY_ABI
177
178* Sat Mar 09 2013 Thomas E. Dickey
179- add --with-cxx-shared option to demonstrate c++ binding as shared library
180
181* Sat Oct 27 2012 Thomas E. Dickey
182- add ncurses program as "ncurses6" to provide demonstration.
183
184* Fri Jun 08 2012 Thomas E. Dickey
185- initial version.
186