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