]> ncurses.scripts.mit.edu Git - ncurses.git/blob - package/mingw-ncurses.spec
a40d352a4abad50db2195f7a0afcfb92a39cd0ef
[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: 20141227
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 mkdir -p $RPM_BUILD_ROOT%{_bindir}
100
101 pushd BUILD-W32
102 %{mingw32_make} install.libs
103 for name in $RPM_BUILD_ROOT%{mingw32_bindir}/*-config; \
104         do \
105                 base=`basename $name`; \
106                 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw32_target}-$base; \
107         done
108 popd
109
110 pushd BUILD-W64
111 %{mingw64_make} install.libs
112 for name in $RPM_BUILD_ROOT%{mingw64_bindir}/*-config; \
113         do \
114                 base=`basename $name`; \
115                 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-$base; \
116         done
117 popd
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %files
123 %defattr(-,root,root,-)
124
125 %files -n mingw32-ncurses6
126 %{_bindir}/%{mingw32_target}-*
127 %{mingw32_bindir}/*
128 %{mingw32_includedir}/*
129 %{mingw32_libdir}/*
130
131 %files -n mingw64-ncurses6
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.