X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fpackage%2Fncurses-examples.spec;h=aeaca251297b9ef696d9a2c5486fbd30799a8fa2;hp=1918777aaf0f419a8f19707ef21657eed44e072e;hb=4677e861e7e0127b8622b3340ceb6f1278b91244;hpb=86b16a498d6d545c03dceff7636d269eb7eb1e8f diff --git a/test/package/ncurses-examples.spec b/test/package/ncurses-examples.spec index 1918777a..aeaca251 100644 --- a/test/package/ncurses-examples.spec +++ b/test/package/ncurses-examples.spec @@ -1,8 +1,9 @@ -Summary: ncurses-examples - example/test programs from ncurses -%define AppProgram ncurses-examples -%define AppVersion 6.0 -%define AppRelease 20171111 -# $Id: ncurses-examples.spec,v 1.8 2017/12/09 20:41:16 tom Exp $ +Summary: example/test programs from ncurses +%global AppProgram ncurses-examples +%global AltProgram ncursest-examples +%global AppVersion MAJOR.MINOR +%global AppRelease YYYYMMDD +# $Id: ncurses-examples.spec,v 1.14 2019/02/03 01:17:27 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: %{AppRelease} @@ -13,11 +14,23 @@ Source0: %{AppProgram}-%{AppRelease}.tgz Packager: Thomas Dickey %description -These are the example/test programs from the ncurses 6.0 distribution, -for patch-date 20171111. +These are the example/test programs from the ncurses MAJOR.MINOR distribution, +for patch-date YYYYMMDD. -This package installs in "bin/ncurses-examples" to avoid conflict with other +This package installs in "bin/%{AppProgram}" to avoid conflict with other packages. + +%package -n %{AltProgram} +Summary: examples/test programs from ncurses with POSIX thread support + +%description -n %{AltProgram} +These are the example/test programs from the ncurses MAJOR.MINOR distribution, +for patch-date YYYYMMDD, using the "ncurseswt" library to demonstrate the +use of POSIX threads, e.g., in ditto, rain, and worm. + +This package installs in "bin/%{AltProgram}" to avoid conflict with other +packages. + %prep %setup -q -n %{AppProgram}-%{AppRelease} @@ -26,32 +39,65 @@ packages. %build +%global _configure ../configure +%define my_srcdir .. + +mkdir BUILD-%{AppProgram} +pushd BUILD-%{AppProgram} INSTALL_PROGRAM='${INSTALL}' \ +NCURSES_CONFIG_SUFFIX=dev \ +CONFIGURE_TOP=%{my_srcdir} \ %configure \ --target %{_target_platform} \ --prefix=%{_prefix} \ --bindir=%{_bindir}/%{AppProgram} \ --datadir=%{_datadir}/%{AppProgram} \ - --with-screen=ncursesw6 \ + --with-screen=ncursesw6dev \ + --disable-rpath-hack + +make +popd + +mkdir BUILD-%{AltProgram} +pushd BUILD-%{AltProgram} +INSTALL_PROGRAM='${INSTALL}' \ +NCURSES_CONFIG_SUFFIX=dev \ +CONFIGURE_TOP=%{my_srcdir} \ +%configure \ + --target %{_target_platform} \ + --prefix=%{_prefix} \ + --bindir=%{_bindir}/%{AltProgram} \ + --datadir=%{_datadir}/%{AltProgram} \ + --with-screen=ncursestw6dev \ --disable-rpath-hack make +popd %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT +pushd BUILD-%{AppProgram} +make install DESTDIR=$RPM_BUILD_ROOT +popd -strip $RPM_BUILD_ROOT%{_bindir}/%{AppProgram}/* +pushd BUILD-%{AltProgram} +make install DESTDIR=$RPM_BUILD_ROOT +popd %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -%files +%files -n %{AppProgram} %defattr(-,root,root) %{_bindir}/%{AppProgram}/* %{_datadir}/%{AppProgram}/* +%files -n %{AltProgram} +%defattr(-,root,root) +%{_bindir}/%{AltProgram}/* +%{_datadir}/%{AltProgram}/* + %changelog # each patch should add its ChangeLog entries here