1Summary: 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 $ 7Name: %{AppProgram} 8Version: %{AppVersion} 9Release: %{AppRelease} 10License: MIT 11Group: Applications/Development 12URL: https://invisible-island.net/ncurses/%{AppProgram}.html 13Source: https://invisible-island.net/archives/%{AppProgram}/%{AppProgram}-%{release}.tgz 14 15%description 16These are the example/test programs from the ncurses MAJOR.MINOR distribution, 17for patch-date YYYYMMDD. 18 19This package installs in "bin/%{AppProgram}" to avoid conflict with other 20packages. 21 22%package -n %{AltProgram} 23Summary: examples/test programs from ncurses with POSIX thread support 24 25%description -n %{AltProgram} 26These are the example/test programs from the ncurses MAJOR.MINOR distribution, 27for patch-date YYYYMMDD, using the "ncurseswt" library to demonstrate the 28use of POSIX threads, e.g., in ditto, rain, and worm. 29 30This package installs in "bin/%{AltProgram}" to avoid conflict with other 31packages. 32 33%prep 34 35%setup -q -n %{AppProgram}-%{AppRelease} 36 37%define debug_package %{nil} 38 39%build 40 41%global _configure ../configure 42%define my_srcdir .. 43 44mkdir BUILD-%{AppProgram} 45pushd BUILD-%{AppProgram} 46INSTALL_PROGRAM='${INSTALL}' \ 47NCURSES_CONFIG_SUFFIX=dev \ 48CONFIGURE_TOP=%{my_srcdir} \ 49%configure \ 50 --target %{_target_platform} \ 51 --prefix=%{_prefix} \ 52 --datadir=%{_datarootdir}/%{AppProgram} \ 53 --with-screen=ncursesw6dev \ 54 --disable-rpath-hack 55 56make 57popd 58 59mkdir BUILD-%{AltProgram} 60pushd BUILD-%{AltProgram} 61INSTALL_PROGRAM='${INSTALL}' \ 62NCURSES_CONFIG_SUFFIX=dev \ 63CONFIGURE_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 71make 72popd 73 74%install 75[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 76 77pushd BUILD-%{AppProgram} 78make install PACKAGE=%{AppProgram} DESTDIR=$RPM_BUILD_ROOT 79popd 80 81pushd BUILD-%{AltProgram} 82make install PACKAGE=%{AltProgram} DESTDIR=$RPM_BUILD_ROOT 83popd 84 85%files -n %{AppProgram} 86%defattr(-,root,root) 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}/* 96 97%changelog 98# each patch should add its ChangeLog entries here 99 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 114* Thu Mar 25 2010 Thomas Dickey 115- initial version 116