blob: 703d68597f80ee5059b45727141fe24f542ca0a0 [file] [log] [blame]
Steve Kondikae271bc2015-11-15 02:50:53 +01001%?mingw_package_header
2
3Summary: shared libraries for terminal handling
4Name: mingw32-ncurses6
5Version: 6.0
6Release: 20150808
7License: X11
8Group: Development/Libraries
9Source: ncurses-%{version}-%{release}.tgz
10# URL: http://invisible-island.net/ncurses/
11
12BuildRequires: mingw32-filesystem >= 95
13BuildRequires: mingw32-gcc
14BuildRequires: mingw32-binutils
15
16BuildRequires: mingw64-filesystem >= 95
17BuildRequires: mingw64-gcc
18BuildRequires: mingw64-binutils
19
20%define CC_NORMAL -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
21%define CC_STRICT %{CC_NORMAL} -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
22
23%description -n mingw32-ncurses6
24Cross-compiling support for ncurses to mingw32.
25
26The ncurses library routines are a terminal-independent method of
27updating character screens with reasonable optimization.
28
29This package is used for testing ABI 6 with cross-compiles to MinGW.
30
31%package -n mingw64-ncurses6
32Summary: Curses library for MinGW64
33
34%description -n mingw64-ncurses6
35Cross-compiling support for ncurses to mingw64.
36
37The ncurses library routines are a terminal-independent method of
38updating character screens with reasonable optimization.
39
40This package is used for testing ABI 6 with cross-compiles to MinGW.
41
42%prep
43
44%define CFG_OPTS \\\
45 --disable-echo \\\
46 --disable-db-install \\\
47 --disable-getcap \\\
48 --disable-hard-tabs \\\
49 --disable-leaks \\\
50 --disable-macros \\\
51 --disable-overwrite \\\
52 --disable-termcap \\\
53 --enable-const \\\
54 --enable-ext-colors \\\
55 --enable-ext-mouse \\\
56 --enable-ext-putwin \\\
57 --enable-interop \\\
58 --enable-sp-funcs \\\
59 --enable-term-driver \\\
60 --enable-warnings \\\
61 --enable-widec \\\
62 --verbose \\\
63 --with-cxx-shared \\\
64 --with-develop \\\
65 --with-fallbacks=unknown,rxvt \\\
66 --with-shared \\\
67 --with-tparm-arg=intptr_t \\\
68 --with-trace \\\
69 --with-xterm-kbs=DEL \\\
70 --without-ada \\\
71 --without-debug \\\
72 --with-install-prefix=$RPM_BUILD_ROOT \\\
73 --without-manpages \\\
74 --without-progs \\\
75 --without-tests
76
77%define debug_package %{nil}
78%setup -q -n ncurses-%{version}-%{release}
79
80%build
81mkdir BUILD-W32
82pushd BUILD-W32
83CFLAGS="%{CC_NORMAL}" \
84CC=%{mingw32_cc} \
85%mingw32_configure %{CFG_OPTS}
86make
87popd
88
89mkdir BUILD-W64
90pushd BUILD-W64
91CFLAGS="%{CC_NORMAL}" \
92CC=%{mingw64_cc} \
93%mingw64_configure %{CFG_OPTS}
94make
95popd
96
97%install
98rm -rf $RPM_BUILD_ROOT
99
100mkdir -p $RPM_BUILD_ROOT%{_bindir}
101
102pushd BUILD-W32
103%{mingw32_make} install.libs
104for name in $RPM_BUILD_ROOT%{mingw32_bindir}/*-config; \
105 do \
106 base=`basename $name`; \
107 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw32_target}-$base; \
108 done
109popd
110
111pushd BUILD-W64
112%{mingw64_make} install.libs
113for name in $RPM_BUILD_ROOT%{mingw64_bindir}/*-config; \
114 do \
115 base=`basename $name`; \
116 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-$base; \
117 done
118popd
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%files -n mingw32-ncurses6
124%defattr(-,root,root,-)
125%{_bindir}/%{mingw32_target}-*
126%{mingw32_bindir}/*
127%{mingw32_includedir}/*
128%{mingw32_libdir}/*
129
130%files -n mingw64-ncurses6
131%defattr(-,root,root,-)
132%{_bindir}/%{mingw64_target}-*
133%{mingw64_bindir}/*
134%{mingw64_includedir}/*
135%{mingw64_libdir}/*
136
137%changelog
138
139* Sat Sep 20 2014 Thomas E. Dickey
140- adjust install-rules for ncurses*-config
141
142* Sat Aug 03 2013 Thomas E. Dickey
143- initial version, using mingw-pdcurses package as a guide.