]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/package/ncurses-examples.spec
ncurses 6.3 - patch 20211219
[ncurses.git] / test / package / ncurses-examples.spec
index d912ea8b948fcea3ce1f2f9857c6289c14b20103..1a045edc8b3e355ceb19739ce427b35f9e3bb0a9 100644 (file)
@@ -3,13 +3,13 @@ Summary: example/test programs from ncurses
 %global AltProgram ncursest-examples
 %global AppVersion MAJOR.MINOR
 %global AppRelease YYYYMMDD
-# $Id: ncurses-examples.spec,v 1.13 2019/01/27 00:22:06 tom Exp $
+# $Id: ncurses-examples.spec,v 1.21 2021/12/19 00:13:46 tom Exp $
 Name: %{AppProgram}
 Version: %{AppVersion}
 Release: %{AppRelease}
 License: MIT
 Group: Applications/Development
-URL: ftp://ftp.invisible-island.net/%{AppProgram}
+URL: ftp://ftp.invisible-island.net/pub/%{AppProgram}
 Source0: %{AppProgram}-%{AppRelease}.tgz
 Packager: Thomas Dickey <dickey@invisible-island.net>
 
@@ -50,9 +50,8 @@ CONFIGURE_TOP=%{my_srcdir} \
 %configure \
        --target %{_target_platform} \
        --prefix=%{_prefix} \
-       --bindir=%{_bindir}/%{AppProgram} \
-       --datadir=%{_datadir}/%{AppProgram} \
-       --with-screen=ncursesw6 \
+       --datadir=%{_datarootdir}/%{AppProgram} \
+       --with-screen=ncursesw6dev \
        --disable-rpath-hack
 
 make
@@ -66,9 +65,8 @@ CONFIGURE_TOP=%{my_srcdir} \
 %configure \
        --target %{_target_platform} \
        --prefix=%{_prefix} \
-       --bindir=%{_bindir}/%{AltProgram} \
-       --datadir=%{_datadir}/%{AltProgram} \
-       --with-screen=ncursestw6 \
+       --datadir=%{_datarootdir}/%{AltProgram} \
+       --with-screen=ncursestw6dev \
        --disable-rpath-hack
 
 make
@@ -78,29 +76,42 @@ popd
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 
 pushd BUILD-%{AppProgram}
-make install DESTDIR=$RPM_BUILD_ROOT
+make install PACKAGE=%{AppProgram} DESTDIR=$RPM_BUILD_ROOT
 popd
 
 pushd BUILD-%{AltProgram}
-make install DESTDIR=$RPM_BUILD_ROOT
+make install PACKAGE=%{AltProgram} DESTDIR=$RPM_BUILD_ROOT
 popd
 
 %clean
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+if rm -rf $RPM_BUILD_ROOT; then
+  echo OK
+else
+  find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1
+fi
+exit 0
 
 %files -n %{AppProgram}
 %defattr(-,root,root)
-%{_bindir}/%{AppProgram}/*
-%{_datadir}/%{AppProgram}/*
+%{_bindir}/%{AppProgram}
+%{_libexecdir}/%{AppProgram}/*
+%{_datarootdir}/%{AppProgram}/*
 
 %files -n %{AltProgram}
 %defattr(-,root,root)
-%{_bindir}/%{AltProgram}/*
-%{_datadir}/%{AltProgram}/*
+%{_bindir}/%{AltProgram}
+%{_libexecdir}/%{AltProgram}/*
+%{_datarootdir}/%{AltProgram}/*
 
 %changelog
 # each patch should add its ChangeLog entries here
 
+* Sat Dec 18 2021 Thomas Dickey
+- use libexecdir for programs rather than subdir of bindir
+
+* Sat Nov 16 2019 Thomas Dickey
+- modify clean-rule to work around Fedora NFS bugs.
+
 * Sat Nov 11 2017 Thomas Dickey
 - add example data-files
 - use rpm built-in "configure"