]> ncurses.scripts.mit.edu Git - ncurses.git/blob - package/ncursest.spec
ncurses 6.1 - patch 20200111
[ncurses.git] / package / ncursest.spec
1 Summary: Curses library with POSIX thread support.
2 Name: ncursest6
3 Version: 6.1
4 Release: 20200111
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} with POSIX threads.
26
27 %prep
28
29 %global is_mandriva %(test -f /etc/mandriva-release && echo 1 || echo 0)
30 %global is_redhat   %(test -f /etc/redhat-release && echo 1 || echo 0)
31 %global is_suse     %(test -f /etc/SuSE-release && echo 1 || echo 0)
32
33 %if %{is_redhat}
34 # generate debug/debug-source packages.
35 %else
36 %define debug_package %{nil}
37 %endif
38
39 %if %{is_mandriva}
40 %define _disable_ld_as_needed 1
41 %define _disable_ld_no_undefined 1
42 # libtool is not used here...
43 %define _disable_libtoolize 1
44 %define _disable_ld_build_id 1
45 %endif
46
47 %if %{is_redhat}
48 # workaround for toolset breakage in Fedora 28
49 %define _test_relink --enable-relink
50 %else
51 %define _test_relink --disable-relink
52 %endif
53
54 %setup -q -n ncurses-%{version}-%{release}
55
56 %build
57 %define CFG_OPTS \\\
58         --target %{_target_platform} \\\
59         --prefix=%{_prefix} \\\
60         --bindir=%{_bindir} \\\
61         --includedir=%{_includedir} \\\
62         --libdir=%{_libdir} \\\
63         --includedir='${prefix}/include' \\\
64         --disable-echo \\\
65         --disable-getcap \\\
66         --disable-leaks \\\
67         --disable-macros  \\\
68         --disable-overwrite  \\\
69         %{_test_relink}  \\\
70         --disable-termcap \\\
71         --enable-hard-tabs \\\
72         --enable-opaque-curses \\\
73         --enable-opaque-form \\\
74         --enable-opaque-menu \\\
75         --enable-opaque-panel \\\
76         --enable-pc-files \\\
77         --enable-rpath \\\
78         --enable-warnings \\\
79         --enable-wgetch-events \\\
80         --enable-widec \\\
81         --enable-xmc-glitch \\\
82         --program-suffix=%{MY_ABI} \\\
83         --verbose \\\
84         --with-abi-version=%{MY_ABI} \\\
85         --with-config-suffix=dev \\\
86         --with-cxx-shared \\\
87         --with-default-terminfo-dir=%{MYDATA} \\\
88         --with-develop \\\
89         --with-extra-suffix=%{MY_ABI} \\\
90         --with-install-prefix=$RPM_BUILD_ROOT \\\
91         --with-pkg-config-libdir=%{MY_PKG} \\\
92         --with-shared \\\
93         --with-terminfo-dirs=%{MYDATA}:/usr/share/terminfo \\\
94         --with-termlib \\\
95         --with-ticlib \\\
96         --with-trace \\\
97         --with-versioned-syms \\\
98         --with-xterm-kbs=DEL \\\
99         --without-ada \\\
100         --without-debug \\\
101         --without-normal
102
103 %configure %{CFG_OPTS} \
104         --enable-interop \
105         --enable-sp-funcs \
106         --program-suffix=t%{MY_ABI} \
107         --with-pthread
108 make
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 make install.libs install.progs
114 rm -f test/ncurses
115 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncursest%{MY_ABI} )
116
117 %if %{is_redhat}
118 %ldconfig_scriptlets libs
119 %ldconfig_scriptlets c++-libs
120 %endif
121
122 %clean
123 if rm -rf $RPM_BUILD_ROOT; then
124   echo OK
125 else
126   find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1
127 fi
128 exit 0
129
130 %files
131 %defattr(-,root,root,-)
132 %{_bindir}/*
133 %{_includedir}/*
134 %{_libdir}/*
135
136 %changelog
137
138 * Tue Dec 24 2019 Thomas Dickey
139 - drop custom CC_NORMAL warning flags because setting CFLAGS interferes with
140   matching Fedora's PIE/PIC configuration.  Also, generate debug/debug-source
141   packages.
142
143 * Sat Nov 16 2019 Thomas Dickey
144 - modify clean-rule to work around Fedora NFS bugs.
145
146 * Sat Aug 25 2018 Thomas E. Dickey
147 - split spec-file into ncurses6 and ncursest6 to work around toolset breakage
148   in Fedora 28
149
150 * Sat Jun 02 2018 Thomas E. Dickey
151 - build-fix for Mageia
152
153 * Sat May 26 2018 Thomas E. Dickey
154 - use predefined configure-macro
155 - separate ncurses6/ncursest6 packages
156
157 * Sat Feb 10 2018 Thomas E. Dickey
158 - add ncursest6 package
159 - add several development features
160
161 * Mon Jan 01 2018 Thomas E. Dickey
162 - drop redundant files pattern for "*.pc"
163
164 * Tue Dec 26 2017 Thomas E. Dickey
165 - add --with-config-suffix option
166
167 * Sun Apr 26 2015 Thomas E. Dickey
168 - move package to /usr
169
170 * Sun Apr 12 2015 Thomas E. Dickey
171 - factor-out MY_ABI
172
173 * Sat Mar 09 2013 Thomas E. Dickey
174 - add --with-cxx-shared option to demonstrate c++ binding as shared library
175
176 * Sat Oct 27 2012 Thomas E. Dickey
177 - add ncurses program as "ncurses6" to provide demonstration.
178
179 * Fri Jun 08 2012 Thomas E. Dickey
180 - initial version.