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 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 4 | %global AppProgram ncurses-examples |
| 5 | %global AppVersion MAJOR.MINOR |
| 6 | %global AppRelease YYYYMMDD |
| 7 | # $Id: mingw-ncurses-examples.spec,v 1.11 2023/02/25 23:10:34 tom Exp $ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 8 | Name: mingw32-ncurses6-examples |
| 9 | Version: %{AppVersion} |
| 10 | Release: %{AppRelease} |
| 11 | License: X11 |
| 12 | Group: Development/Libraries |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 13 | URL: https://invisible-island.net/ncurses/%{AppProgram}.html |
| 14 | Source: https://invisible-island.net/archives/%{AppProgram}/%{AppProgram}-%{release}.tgz |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 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 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 53 | %global mingw32_bindir %{mingw32_exec_prefix}/bin/%{AppProgram} |
| 54 | %global mingw64_bindir %{mingw64_exec_prefix}/bin/%{AppProgram} |
| 55 | |
| 56 | %global mingw32_datadir %{mingw32_datadir}/%{AppProgram} |
| 57 | %global mingw64_datadir %{mingw64_datadir}/%{AppProgram} |
| 58 | |
| 59 | %global mingw32_libexec %{mingw32_libexecdir}/%{AppProgram} |
| 60 | %global mingw64_libexec %{mingw64_libexecdir}/%{AppProgram} |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 61 | |
| 62 | %define CFG_OPTS \\\ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 63 | --enable-echo \\\ |
| 64 | --enable-warnings \\\ |
| 65 | --verbose \\\ |
| 66 | --with-screen=ncursesw6 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 67 | |
| 68 | %define debug_package %{nil} |
| 69 | %setup -q -n ncurses-examples-%{release} |
| 70 | |
| 71 | %build |
| 72 | mkdir BUILD-W32 |
| 73 | pushd BUILD-W32 |
| 74 | CFLAGS="%{CC_NORMAL}" \ |
| 75 | CC=%{mingw32_cc} \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 76 | NCURSES_CONFIG_SUFFIX=dev \ |
| 77 | %mingw32_configure %{CFG_OPTS} \ |
| 78 | --datadir=%{mingw32_datadir} |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 79 | make |
| 80 | popd |
| 81 | |
| 82 | mkdir BUILD-W64 |
| 83 | pushd BUILD-W64 |
| 84 | CFLAGS="%{CC_NORMAL}" \ |
| 85 | CC=%{mingw64_cc} \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 86 | %mingw64_configure %{CFG_OPTS} \ |
| 87 | --datadir=%{mingw32_datadir} |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 88 | make |
| 89 | popd |
| 90 | |
| 91 | %install |
| 92 | rm -rf $RPM_BUILD_ROOT |
| 93 | |
| 94 | pushd BUILD-W32 |
| 95 | %{mingw32_make} install DESTDIR=$RPM_BUILD_ROOT |
| 96 | popd |
| 97 | |
| 98 | pushd BUILD-W64 |
| 99 | %{mingw64_make} install DESTDIR=$RPM_BUILD_ROOT |
| 100 | popd |
| 101 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 102 | %files -n mingw32-ncurses6-examples |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 103 | %defattr(-,root,root,-) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 104 | %{mingw32_bindir}/* |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 105 | %{mingw32_datadir}/* |
| 106 | %{mingw32_libexec}/* |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 107 | |
| 108 | %files -n mingw64-ncurses6-examples |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 109 | %defattr(-,root,root,-) |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 110 | %{mingw64_bindir}/* |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 111 | %{mingw64_datadir}/* |
| 112 | %{mingw64_libexec}/* |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 113 | |
| 114 | %changelog |
| 115 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 116 | * Sat Feb 25 2023 Thomas Dickey |
| 117 | - use libexecdir for programs rather than subdir of bindir |
| 118 | - amend URLs per rpmlint |
| 119 | |
| 120 | * Sat Nov 16 2019 Thomas Dickey |
| 121 | - modify clean-rule to work around Fedora NFS bugs. |
| 122 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 123 | * Sat Oct 19 2013 Thomas E. Dickey |
| 124 | - initial version |