]> ncurses.scripts.mit.edu Git - ncurses.git/blob - package/mingw-ncurses.spec
ncurses 6.0 - patch 20171230
[ncurses.git] / package / mingw-ncurses.spec
1 %?mingw_package_header
2
3 Summary: shared libraries for terminal handling
4 Name: mingw32-ncurses6
5 Version: 6.0
6 Release: 20171230
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         --with-config-suffix=dev \\\
46         --disable-echo \\\
47         --disable-db-install \\\
48         --disable-getcap \\\
49         --disable-hard-tabs \\\
50         --disable-leaks \\\
51         --disable-macros \\\
52         --disable-overwrite \\\
53         --disable-termcap \\\
54         --enable-const \\\
55         --enable-ext-colors \\\
56         --enable-ext-mouse \\\
57         --enable-ext-putwin \\\
58         --enable-interop \\\
59         --enable-sp-funcs \\\
60         --enable-term-driver \\\
61         --enable-warnings \\\
62         --enable-widec \\\
63         --verbose \\\
64         --with-cxx-shared \\\
65         --with-develop \\\
66         --with-fallbacks=unknown,rxvt \\\
67         --with-shared \\\
68         --with-tparm-arg=intptr_t \\\
69         --with-trace \\\
70         --with-xterm-kbs=DEL \\\
71         --without-ada \\\
72         --without-debug \\\
73         --with-install-prefix=$RPM_BUILD_ROOT \\\
74         --without-manpages \\\
75         --without-progs \\\
76         --without-tests
77
78 %define debug_package %{nil}
79 %setup -q -n ncurses-%{version}-%{release}
80
81 %build
82 mkdir BUILD-W32
83 pushd BUILD-W32
84 CFLAGS="%{CC_NORMAL}" \
85 CC=%{mingw32_cc} \
86 %mingw32_configure %{CFG_OPTS}
87 make
88 popd
89
90 mkdir BUILD-W64
91 pushd BUILD-W64
92 CFLAGS="%{CC_NORMAL}" \
93 CC=%{mingw64_cc} \
94 %mingw64_configure %{CFG_OPTS}
95 make
96 popd
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 mkdir -p $RPM_BUILD_ROOT%{_bindir}
102
103 pushd BUILD-W32
104 %{mingw32_make} install.libs
105 for name in $RPM_BUILD_ROOT%{mingw32_bindir}/*-config; \
106         do \
107                 base=`basename $name`; \
108                 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw32_target}-$base; \
109         done
110 popd
111
112 pushd BUILD-W64
113 %{mingw64_make} install.libs
114 for name in $RPM_BUILD_ROOT%{mingw64_bindir}/*-config; \
115         do \
116                 base=`basename $name`; \
117                 ln -v $name $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-$base; \
118         done
119 popd
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %files -n mingw32-ncurses6
125 %defattr(-,root,root,-)
126 %{_bindir}/%{mingw32_target}-*
127 %{mingw32_bindir}/*
128 %{mingw32_includedir}/*
129 %{mingw32_libdir}/*
130
131 %files -n mingw64-ncurses6
132 %defattr(-,root,root,-)
133 %{_bindir}/%{mingw64_target}-*
134 %{mingw64_bindir}/*
135 %{mingw64_includedir}/*
136 %{mingw64_libdir}/*
137
138 %changelog
139
140 * Tue Dec 26 2017 Thomas E. Dickey
141 - add --with-config-suffix option
142
143 * Sat Sep 20 2014 Thomas E. Dickey
144 - adjust install-rules for ncurses*-config
145
146 * Sat Aug 03 2013 Thomas E. Dickey
147 - initial version, using mingw-pdcurses package as a guide.