micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 1 | Summary: example/test programs from ncurses |
| 2 | %global AppProgram ncurses-examples |
| 3 | %global AltProgram ncursest-examples |
| 4 | %global AppVersion MAJOR.MINOR |
| 5 | %global AppRelease YYYYMMDD |
| 6 | # $Id: ncurses-examples.spec,v 1.22 2023/02/25 23:10:49 tom Exp $ |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 7 | Name: %{AppProgram} |
| 8 | Version: %{AppVersion} |
| 9 | Release: %{AppRelease} |
| 10 | License: MIT |
| 11 | Group: Applications/Development |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 12 | URL: https://invisible-island.net/ncurses/%{AppProgram}.html |
| 13 | Source: https://invisible-island.net/archives/%{AppProgram}/%{AppProgram}-%{release}.tgz |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 14 | |
| 15 | %description |
| 16 | These are the example/test programs from the ncurses MAJOR.MINOR distribution, |
| 17 | for patch-date YYYYMMDD. |
| 18 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 19 | This package installs in "bin/%{AppProgram}" to avoid conflict with other |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 20 | packages. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 21 | |
| 22 | %package -n %{AltProgram} |
| 23 | Summary: examples/test programs from ncurses with POSIX thread support |
| 24 | |
| 25 | %description -n %{AltProgram} |
| 26 | These are the example/test programs from the ncurses MAJOR.MINOR distribution, |
| 27 | for patch-date YYYYMMDD, using the "ncurseswt" library to demonstrate the |
| 28 | use of POSIX threads, e.g., in ditto, rain, and worm. |
| 29 | |
| 30 | This package installs in "bin/%{AltProgram}" to avoid conflict with other |
| 31 | packages. |
| 32 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 33 | %prep |
| 34 | |
| 35 | %setup -q -n %{AppProgram}-%{AppRelease} |
| 36 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 37 | %define debug_package %{nil} |
| 38 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 39 | %build |
| 40 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 41 | %global _configure ../configure |
| 42 | %define my_srcdir .. |
| 43 | |
| 44 | mkdir BUILD-%{AppProgram} |
| 45 | pushd BUILD-%{AppProgram} |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 46 | INSTALL_PROGRAM='${INSTALL}' \ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 47 | NCURSES_CONFIG_SUFFIX=dev \ |
| 48 | CONFIGURE_TOP=%{my_srcdir} \ |
| 49 | %configure \ |
| 50 | --target %{_target_platform} \ |
| 51 | --prefix=%{_prefix} \ |
| 52 | --datadir=%{_datarootdir}/%{AppProgram} \ |
| 53 | --with-screen=ncursesw6dev \ |
| 54 | --disable-rpath-hack |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 55 | |
| 56 | make |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 57 | popd |
| 58 | |
| 59 | mkdir BUILD-%{AltProgram} |
| 60 | pushd BUILD-%{AltProgram} |
| 61 | INSTALL_PROGRAM='${INSTALL}' \ |
| 62 | NCURSES_CONFIG_SUFFIX=dev \ |
| 63 | CONFIGURE_TOP=%{my_srcdir} \ |
| 64 | %configure \ |
| 65 | --target %{_target_platform} \ |
| 66 | --prefix=%{_prefix} \ |
| 67 | --datadir=%{_datarootdir}/%{AltProgram} \ |
| 68 | --with-screen=ncursestw6dev \ |
| 69 | --disable-rpath-hack |
| 70 | |
| 71 | make |
| 72 | popd |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 73 | |
| 74 | %install |
| 75 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
| 76 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 77 | pushd BUILD-%{AppProgram} |
| 78 | make install PACKAGE=%{AppProgram} DESTDIR=$RPM_BUILD_ROOT |
| 79 | popd |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 80 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 81 | pushd BUILD-%{AltProgram} |
| 82 | make install PACKAGE=%{AltProgram} DESTDIR=$RPM_BUILD_ROOT |
| 83 | popd |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 84 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 85 | %files -n %{AppProgram} |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 86 | %defattr(-,root,root) |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 87 | %{_bindir}/%{AppProgram} |
| 88 | %{_libexecdir}/%{AppProgram}/* |
| 89 | %{_datarootdir}/%{AppProgram}/* |
| 90 | |
| 91 | %files -n %{AltProgram} |
| 92 | %defattr(-,root,root) |
| 93 | %{_bindir}/%{AltProgram} |
| 94 | %{_libexecdir}/%{AltProgram}/* |
| 95 | %{_datarootdir}/%{AltProgram}/* |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 96 | |
| 97 | %changelog |
| 98 | # each patch should add its ChangeLog entries here |
| 99 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 100 | * Sat Feb 25 2023 Thomas Dickey |
| 101 | - amend URLs per rpmlint |
| 102 | |
| 103 | * Sat Dec 18 2021 Thomas Dickey |
| 104 | - use libexecdir for programs rather than subdir of bindir |
| 105 | |
| 106 | * Sat Nov 16 2019 Thomas Dickey |
| 107 | - modify clean-rule to work around Fedora NFS bugs. |
| 108 | |
| 109 | * Sat Nov 11 2017 Thomas Dickey |
| 110 | - add example data-files |
| 111 | - use rpm built-in "configure" |
| 112 | - suppress debug-package |
| 113 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 114 | * Thu Mar 25 2010 Thomas Dickey |
| 115 | - initial version |