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