ncurses 6.0 - patch 20180120
[ncurses.git] / package / ncurses.spec
1 Summary: shared libraries for terminal handling
2 Name: ncurses6
3 Version: 6.0
4 Release: 20180120
5 License: X11
6 Group: Development/Libraries
7 Source: ncurses-%{version}-%{release}.tgz
8 # URL: https://invisible-island.net/ncurses/
9
10 %define CC_NORMAL -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
11 %define CC_STRICT %{CC_NORMAL} -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
12
13 %global MY_ABI 6
14
15 # save value before redefining
16 %global sys_libdir %{_libdir}
17
18 # was redefined...
19 #global _prefix /usr/local/ncurses#{MY_ABI}
20
21 %global MY_PKG %{sys_libdir}/pkgconfig
22 %define MYDATA /usr/local/ncurses/share/terminfo
23
24 %description
25 The ncurses library routines are a terminal-independent method of
26 updating character screens with reasonable optimization.
27
28 This package is used for testing ABI %{MY_ABI}.
29
30 %prep
31
32 %define debug_package %{nil}
33 %setup -q -n ncurses-%{version}-%{release}
34
35 %build
36 CFLAGS="%{CC_NORMAL}" \
37 RPATH_LIST=../lib:%{_prefix}/lib \
38 %configure \
39         --target %{_target_platform} \
40         --prefix=%{_prefix} \
41         --includedir='${prefix}/include' \
42         --with-default-terminfo-dir=%{MYDATA} \
43         --with-install-prefix=$RPM_BUILD_ROOT \
44         --with-terminfo-dirs=%{MYDATA}:/usr/share/terminfo \
45         --with-config-suffix=dev \
46         --disable-echo \
47         --disable-getcap \
48         --disable-leaks \
49         --disable-macros  \
50         --disable-overwrite  \
51         --disable-termcap \
52         --enable-hard-tabs \
53         --enable-pc-files \
54         --enable-rpath \
55         --enable-warnings \
56         --enable-wgetch-events \
57         --enable-widec \
58         --verbose \
59         --program-suffix=%{MY_ABI} \
60         --with-abi-version=%{MY_ABI} \
61         --with-develop \
62         --with-shared \
63         --with-termlib \
64         --with-ticlib \
65         --with-trace \
66         --with-cxx-shared \
67         --with-extra-suffix=%{MY_ABI} \
68         --with-pkg-config-libdir=%{MY_PKG} \
69         --with-versioned-syms \
70         --with-xterm-kbs=DEL \
71         --without-ada \
72         --without-debug \
73         --without-normal
74
75 make
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 make install.libs install.progs
81 rm -f test/ncurses
82 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncurses%{MY_ABI} )
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
88 %defattr(-,root,root,-)
89 %{_bindir}/*
90 %{_includedir}/*
91 %{_libdir}/*
92
93 %changelog
94
95 * Mon Jan 01 2018 Thomas E. Dickey
96 - drop redundant files pattern for "*.pc"
97
98 * Tue Dec 26 2017 Thomas E. Dickey
99 - add --with-config-suffix option
100
101 * Sun Apr 26 2015 Thomas E. Dickey
102 - move package to /usr
103
104 * Sun Apr 12 2015 Thomas E. Dickey
105 - factor-out MY_ABI
106
107 * Sat Mar 09 2013 Thomas E. Dickey
108 - add --with-cxx-shared option to demonstrate c++ binding as shared library
109
110 * Sat Oct 27 2012 Thomas E. Dickey
111 - add ncurses program as "ncurses6" to provide demonstration.
112
113 * Fri Jun 08 2012 Thomas E. Dickey
114 - initial version.