d3e992e800178949720297bd0273459f5f4cc44c
[ncurses.git] / package / ncurses.spec
1 Summary: shared libraries for terminal handling
2 Name: ncurses6
3 Version: 5.9
4 Release: 20150418
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 MY_ABI 6
14
15 # save value before redefining
16 %global sys_libdir %{_libdir}
17
18 # redefine...
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         --disable-echo \
46         --disable-getcap \
47         --disable-leaks \
48         --disable-macros  \
49         --disable-overwrite  \
50         --disable-termcap \
51         --enable-const \
52         --enable-ext-colors \
53         --enable-ext-mouse \
54         --enable-hard-tabs \
55         --enable-interop \
56         --enable-pc-files \
57         --enable-rpath \
58         --enable-sp-funcs \
59         --enable-warnings \
60         --enable-widec \
61         --verbose \
62         --with-chtype=uint32_t \
63         --with-mmask_t=uint32_t \
64         --with-develop \
65         --with-shared \
66         --with-termlib \
67         --with-ticlib \
68         --with-trace \
69         --with-cxx-shared \
70         --with-extra-suffix=%{MY_ABI} \
71         --with-pkg-config-libdir=%{MY_PKG} \
72         --with-versioned-syms \
73         --with-xterm-kbs=DEL \
74         --without-ada \
75         --without-debug \
76         --without-normal
77
78 make
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82
83 make install.libs install.progs
84 rm -f test/ncurses
85 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncurses%{MY_ABI} )
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %files
91 %defattr(-,root,root,-)
92 %{_bindir}/*
93 %{_includedir}/*
94 %{_libdir}/*
95 %{MY_PKG}/*.pc
96
97 %changelog
98
99 * Sun Apr 12 2015 Thomas E. Dickey
100 - factor-out MY_ABI
101
102 * Sat Mar 09 2013 Thomas E. Dickey
103 - add --with-cxx-shared option to demonstrate c++ binding as shared library
104
105 * Sat Oct 27 2012 Thomas E. Dickey
106 - add ncurses program as "ncurses6" to provide demonstration.
107
108 * Fri Jun 08 2012 Thomas E. Dickey
109 - initial version.