]> ncurses.scripts.mit.edu Git - ncurses.git/blob - package/ncurses.spec
ncurses 6.4 - patch 20240414
[ncurses.git] / package / ncurses.spec
1 Summary: shared libraries for terminal handling
2 Name: ncurses6
3 Version: 6.3
4 Release: 20211127
5 License: X11
6 Group: Development/Libraries
7 Source: 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
22 The ncurses library routines are a terminal-independent method of
23 updating character screens with reasonable optimization.
24
25 This 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         %{_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         --disable-rpath \\\
81         --enable-stdnoreturn \\\
82         --enable-warnings \\\
83         --enable-wgetch-events \\\
84         --enable-widec \\\
85         --enable-xmc-glitch \\\
86         --program-suffix=%{MY_ABI} \\\
87         --verbose \\\
88         --with-abi-version=%{MY_ABI} \\\
89         --with-config-suffix=dev \\\
90         --with-cxx-shared \\\
91         --with-default-terminfo-dir=%{MYDATA} \\\
92         --with-develop \\\
93         --with-extra-suffix=%{MY_ABI} \\\
94         --with-install-prefix=$RPM_BUILD_ROOT \\\
95         --with-pkg-config-libdir=%{MY_PKG} \\\
96         --with-shared \\\
97         --with-terminfo-dirs=%{MYDATA}:/usr/share/terminfo \\\
98         --with-termlib \\\
99         --with-ticlib \\\
100         --with-trace \\\
101         --with-versioned-syms \\\
102         --with-xterm-kbs=DEL \\\
103         --without-ada \\\
104         --without-debug \\\
105         --without-normal
106
107 %configure %{CFG_OPTS}
108
109 make
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 make install.libs install.progs
115 rm -f test/ncurses
116 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncurses%{MY_ABI} )
117
118 %if %{is_mandriva}
119 # check this first because Mageia has the /etc/redhat-release file...
120 %else
121 %if %{is_fedora}
122 %ldconfig_scriptlets libs
123 %ldconfig_scriptlets c++-libs
124 %endif
125 %endif
126
127 %clean
128 if rm -rf $RPM_BUILD_ROOT; then
129   echo OK
130 else
131   find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1
132 fi
133 exit 0
134
135 %files
136 %defattr(-,root,root,-)
137 %{_bindir}/*
138 %{_includedir}/*
139 %{_libdir}/*
140
141 %changelog
142
143 * Sat Oct 16 2021 Thomas Dickey
144 - disable rpath to address QA_RPATHS=1 warning.
145
146 * Tue Dec 24 2019 Thomas Dickey
147 - drop custom CC_NORMAL warning flags because setting CFLAGS interferes with
148   matching Fedora's PIE/PIC configuration.  Also, generate debug/debug-source
149   packages.
150
151 * Sat Nov 16 2019 Thomas Dickey
152 - modify clean-rule to work around Fedora NFS bugs.
153
154 * Sat Aug 25 2018 Thomas E. Dickey
155 - split spec-file into ncurses6 and ncursest6 to work around toolset breakage
156   in Fedora 28
157
158 * Sat Jun 02 2018 Thomas E. Dickey
159 - build-fix for Mageia
160
161 * Sat May 26 2018 Thomas E. Dickey
162 - use predefined configure-macro
163 - separate ncurses6/ncursest6 packages
164
165 * Sat Feb 10 2018 Thomas E. Dickey
166 - add ncursest6 package
167 - add several development features
168
169 * Mon Jan 01 2018 Thomas E. Dickey
170 - drop redundant files pattern for "*.pc"
171
172 * Tue Dec 26 2017 Thomas E. Dickey
173 - add --with-config-suffix option
174
175 * Sun Apr 26 2015 Thomas E. Dickey
176 - move package to /usr
177
178 * Sun Apr 12 2015 Thomas E. Dickey
179 - factor-out MY_ABI
180
181 * Sat Mar 09 2013 Thomas E. Dickey
182 - add --with-cxx-shared option to demonstrate c++ binding as shared library
183
184 * Sat Oct 27 2012 Thomas E. Dickey
185 - add ncurses program as "ncurses6" to provide demonstration.
186
187 * Fri Jun 08 2012 Thomas E. Dickey
188 - initial version.