]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/package/ncurses-examples.spec
ncurses 6.4 - patch 20240414
[ncurses.git] / test / package / ncurses-examples.spec
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 $
7 Name: %{AppProgram}
8 Version: %{AppVersion}
9 Release: %{AppRelease}
10 License: MIT
11 Group: Applications/Development
12 URL: https://invisible-island.net/ncurses/%{AppProgram}.html
13 Source: https://invisible-island.net/archives/%{AppProgram}/%{AppProgram}-%{release}.tgz
14
15 %description
16 These are the example/test programs from the ncurses MAJOR.MINOR distribution,
17 for patch-date YYYYMMDD.
18
19 This package installs in "bin/%{AppProgram}" to avoid conflict with other
20 packages.
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
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
44 mkdir BUILD-%{AppProgram}
45 pushd BUILD-%{AppProgram}
46 INSTALL_PROGRAM='${INSTALL}' \
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
55
56 make
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
73
74 %install
75 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
76
77 pushd BUILD-%{AppProgram}
78 make install PACKAGE=%{AppProgram} DESTDIR=$RPM_BUILD_ROOT
79 popd
80
81 pushd BUILD-%{AltProgram}
82 make install PACKAGE=%{AltProgram} DESTDIR=$RPM_BUILD_ROOT
83 popd
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