]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/package/mingw-ncurses-examples.spec
ncurses 5.9 - patch 20131019
[ncurses.git] / test / package / mingw-ncurses-examples.spec
1 %?mingw_package_header
2
3 %define AppProgram ncurses-examples
4 # $Id: mingw-ncurses-examples.spec,v 1.1 2013/10/19 22:04:58 tom Exp $
5 Summary: shared libraries for terminal handling
6 Name: mingw32-ncurses6-examples
7 Release: 5.9
8 Version: 20131019
9 License: X11
10 Group: Development/Libraries
11 Source: ncurses-examples-%{version}.tgz
12 # URL: http://invisible-island.net/ncurses/
13
14 BuildRequires:  mingw32-ncurses6
15
16 BuildRequires:  mingw32-filesystem >= 95
17 BuildRequires:  mingw32-gcc
18 BuildRequires:  mingw32-binutils
19
20 BuildRequires:  mingw64-ncurses6
21
22 BuildRequires:  mingw64-filesystem >= 95
23 BuildRequires:  mingw64-gcc
24 BuildRequires:  mingw64-binutils
25
26 %define CC_NORMAL -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
27 %define CC_STRICT %{CC_NORMAL} -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
28
29 %description -n mingw32-ncurses6-examples
30 Cross-compiling support for ncurses to mingw32.
31
32 The ncurses library routines are a terminal-independent method of
33 updating character screens with reasonable optimization.
34
35 This package is used for testing ABI 6 with cross-compiles to MinGW.
36
37 %package -n mingw64-ncurses6-examples
38 Summary:        Curses library for MinGW64
39
40 %description -n mingw64-ncurses6-examples
41 Cross-compiling support for ncurses to mingw64.
42
43 The ncurses library routines are a terminal-independent method of
44 updating character screens with reasonable optimization.
45
46 This package is used for testing ABI 6 with cross-compiles to MinGW.
47
48 %prep
49
50 # override location of bindir, e.g., to avoid conflict with pdcurses
51 %global mingw32_bindir %{mingw32_exec_prefix}/bin/%{AppProgram} 
52 %global mingw64_bindir %{mingw64_exec_prefix}/bin/%{AppProgram} 
53
54 %define CFG_OPTS \\\
55         --disable-echo \\\
56         --enable-warnings \\\
57         --verbose
58
59 %define debug_package %{nil}
60 %setup -q -n ncurses-examples-%{version}
61
62 %build
63 mkdir BUILD-W32
64 pushd BUILD-W32
65 CFLAGS="%{CC_NORMAL}" \
66 CC=%{mingw32_cc} \
67 %mingw32_configure %{CFG_OPTS}
68 cp config.status /tmp/ming32-config.status
69 make
70 popd
71
72 mkdir BUILD-W64
73 pushd BUILD-W64
74 CFLAGS="%{CC_NORMAL}" \
75 CC=%{mingw64_cc} \
76 %mingw64_configure %{CFG_OPTS}
77 cp config.status /tmp/ming64-config.status
78 make
79 popd
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 pushd BUILD-W32
85 %{mingw32_make} install DESTDIR=$RPM_BUILD_ROOT
86 popd
87
88 pushd BUILD-W64
89 %{mingw64_make} install DESTDIR=$RPM_BUILD_ROOT
90 popd
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %files
96 %defattr(-,root,root,-)
97
98 %files -n mingw32-ncurses6-examples
99 %{mingw32_bindir}/*
100
101 %files -n mingw64-ncurses6-examples
102 %{mingw64_bindir}/*
103
104 %changelog
105
106 * Sat Oct 19 2013 Thomas E. Dickey
107 - initial version