e85e214033ec050495c7e42a1e3e912b31eac556
[ncurses.git] / package / mingw-ncurses.spec
1 %?mingw_package_header
2
3 Summary: shared libraries for terminal handling
4 Name: mingw32-ncurses6
5 Version: 5.9
6 Release: 20140802
7 License: X11
8 Group: Development/Libraries
9 Source: ncurses-%{version}-%{release}.tgz
10 # URL: http://invisible-island.net/ncurses/
11
12 BuildRequires:  mingw32-filesystem >= 95
13 BuildRequires:  mingw32-gcc
14 BuildRequires:  mingw32-binutils
15
16 BuildRequires:  mingw64-filesystem >= 95
17 BuildRequires:  mingw64-gcc
18 BuildRequires:  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
24 Cross-compiling support for ncurses to mingw32.
25
26 The ncurses library routines are a terminal-independent method of
27 updating character screens with reasonable optimization.
28
29 This package is used for testing ABI 6 with cross-compiles to MinGW.
30
31 %package -n mingw64-ncurses6
32 Summary:        Curses library for MinGW64
33
34 %description -n mingw64-ncurses6
35 Cross-compiling support for ncurses to mingw64.
36
37 The ncurses library routines are a terminal-independent method of
38 updating character screens with reasonable optimization.
39
40 This 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-interop \\\
57         --enable-sp-funcs \\\
58         --enable-term-driver \\\
59         --enable-warnings \\\
60         --enable-widec \\\
61         --verbose \\\
62         --with-cxx-shared \\\
63         --with-develop \\\
64         --with-fallbacks=unknown,rxvt \\\
65         --with-shared \\\
66         --with-tparm-arg=intptr_t \\\
67         --with-trace \\\
68         --with-xterm-kbs=DEL \\\
69         --without-ada \\\
70         --without-debug \\\
71         --with-install-prefix=$RPM_BUILD_ROOT \\\
72         --without-manpages \\\
73         --without-progs \\\
74         --without-tests
75
76 %define debug_package %{nil}
77 %setup -q -n ncurses-%{version}-%{release}
78
79 %build
80 mkdir BUILD-W32
81 pushd BUILD-W32
82 CFLAGS="%{CC_NORMAL}" \
83 CC=%{mingw32_cc} \
84 %mingw32_configure %{CFG_OPTS}
85 make
86 popd
87
88 mkdir BUILD-W64
89 pushd BUILD-W64
90 CFLAGS="%{CC_NORMAL}" \
91 CC=%{mingw64_cc} \
92 %mingw64_configure %{CFG_OPTS}
93 make
94 popd
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98
99 pushd BUILD-W32
100 %{mingw32_make} install
101 popd
102
103 pushd BUILD-W64
104 %{mingw64_make} install
105 popd
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %files
111 %defattr(-,root,root,-)
112
113 %files -n mingw32-ncurses6
114 %{mingw32_bindir}/*
115 %{mingw32_includedir}/*
116 %{mingw32_libdir}/*
117
118 %files -n mingw64-ncurses6
119 %{mingw64_bindir}/*
120 %{mingw64_includedir}/*
121 %{mingw64_libdir}/*
122
123 %changelog
124
125 * Sat Aug 03 2013 Thomas E. Dickey
126 - initial version, using mingw-pdcurses package as a guide.