851bbc2ae8bb434a2bd5646be4cd7bea3e627b02
[ncurses.git] / package / ncurses.spec
1 Summary: shared libraries for terminal handling
2 Name: ncurses6
3 Version: 5.9
4 Release: 20150516
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 # 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         --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-wgetch-events \
61         --enable-widec \
62         --verbose \
63         --program-suffix=%{MY_ABI} \
64         --with-chtype=uint32_t \
65         --with-mmask_t=uint32_t \
66         --with-develop \
67         --with-shared \
68         --with-termlib \
69         --with-ticlib \
70         --with-trace \
71         --with-cxx-shared \
72         --with-extra-suffix=%{MY_ABI} \
73         --with-pkg-config-libdir=%{MY_PKG} \
74         --with-versioned-syms \
75         --with-xterm-kbs=DEL \
76         --without-ada \
77         --without-debug \
78         --without-normal
79
80 make
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 make install.libs install.progs
86 rm -f test/ncurses
87 ( cd test && make ncurses LOCAL_LIBDIR=%{_libdir} && mv ncurses $RPM_BUILD_ROOT/%{_bindir}/ncurses%{MY_ABI} )
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %files
93 %defattr(-,root,root,-)
94 %{_bindir}/*
95 %{_includedir}/*
96 %{_libdir}/*
97 %{MY_PKG}/*.pc
98
99 %changelog
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.