ncurses 5.9 - patch 20150321
[ncurses.git] / package / ncurses.spec
1 Summary: shared libraries for terminal handling
2 Name: ncurses6
3 Version: 5.9
4 Release: 20150321
5 License: X11
6 Group: Development/Libraries
7 Source: ncurses-%{version}-%{release}.tgz
8 # URL: http://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 # save value before redefining
14 %global sys_libdir %{_libdir}
15
16 # redefine...
17 %global _prefix /usr/local/ncurses6
18
19 %global MY_PKG %{sys_libdir}/pkgconfig
20 %define MYDATA /usr/local/ncurses/share/terminfo
21
22 %description
23 The ncurses library routines are a terminal-independent method of
24 updating character screens with reasonable optimization.
25
26 This package is used for testing ABI 6.
27
28 %prep
29
30 %define debug_package %{nil}
31 %setup -q -n ncurses-%{version}-%{release}
32
33 %build
34 CFLAGS="%{CC_NORMAL}" \
35 RPATH_LIST=../lib:%{_prefix}/lib \
36 %configure \
37         --target %{_target_platform} \
38         --prefix=%{_prefix} \
39         --includedir='${prefix}/include' \
40         --with-default-terminfo-dir=%{MYDATA} \
41         --with-install-prefix=$RPM_BUILD_ROOT \
42         --with-terminfo-dirs=%{MYDATA}:/usr/share/terminfo \
43         --disable-echo \
44         --disable-getcap \
45         --disable-leaks \
46         --disable-macros  \
47         --disable-overwrite  \
48         --disable-termcap \
49         --enable-const \
50         --enable-ext-colors \
51         --enable-ext-mouse \
52         --enable-hard-tabs \
53         --enable-interop \
54         --enable-pc-files \
55         --enable-rpath \
56         --enable-sp-funcs \
57         --enable-warnings \
58         --enable-widec \
59         --verbose \
60         --with-chtype=uint32_t \
61         --with-mmask_t=uint32_t \
62         --with-develop \
63         --with-shared \
64         --with-termlib \
65         --with-ticlib \
66         --with-trace \
67         --with-cxx-shared \
68         --with-pc-suffix=6 \
69         --with-pkg-config-libdir=%{MY_PKG} \
70         --with-versioned-syms \
71         --with-xterm-kbs=DEL \
72         --without-ada \
73         --without-debug \
74         --without-normal
75
76 make
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 make install.libs install.progs
82 rm -f test/ncurses
83 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncurses6 )
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(-,root,root,-)
90 %{_bindir}/*
91 %{_includedir}/*
92 %{_libdir}/*
93 %{MY_PKG}/*.pc
94
95 %changelog
96
97 * Sat Mar 09 2013 Thomas E. Dickey
98 - add --with-cxx-shared option to demonstrate c++ binding as shared library
99
100 * Sat Oct 27 2012 Thomas E. Dickey
101 - add ncurses program as "ncurses6" to provide demonstration.
102
103 * Fri Jun 08 2012 Thomas E. Dickey
104 - initial version.