ncurses 6.1 - patch 20190126
[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.13 2019/01/27 00:22:06 tom Exp $
7 Name: %{AppProgram}
8 Version: %{AppVersion}
9 Release: %{AppRelease}
10 License: MIT
11 Group: Applications/Development
12 URL: ftp://ftp.invisible-island.net/%{AppProgram}
13 Source0: %{AppProgram}-%{AppRelease}.tgz
14 Packager: Thomas Dickey <dickey@invisible-island.net>
15
16 %description
17 These are the example/test programs from the ncurses MAJOR.MINOR distribution,
18 for patch-date YYYYMMDD.
19
20 This package installs in "bin/%{AppProgram}" to avoid conflict with other
21 packages.
22
23 %package -n %{AltProgram}
24 Summary:  examples/test programs from ncurses with POSIX thread support
25
26 %description -n %{AltProgram}
27 These are the example/test programs from the ncurses MAJOR.MINOR distribution,
28 for patch-date YYYYMMDD, using the "ncurseswt" library to demonstrate the
29 use of POSIX threads, e.g., in ditto, rain, and worm.
30
31 This package installs in "bin/%{AltProgram}" to avoid conflict with other
32 packages.
33
34 %prep
35
36 %setup -q -n %{AppProgram}-%{AppRelease}
37
38 %define debug_package %{nil}
39
40 %build
41
42 %global _configure ../configure
43 %define my_srcdir ..
44
45 mkdir BUILD-%{AppProgram}
46 pushd BUILD-%{AppProgram}
47 INSTALL_PROGRAM='${INSTALL}' \
48 NCURSES_CONFIG_SUFFIX=dev \
49 CONFIGURE_TOP=%{my_srcdir} \
50 %configure \
51         --target %{_target_platform} \
52         --prefix=%{_prefix} \
53         --bindir=%{_bindir}/%{AppProgram} \
54         --datadir=%{_datadir}/%{AppProgram} \
55         --with-screen=ncursesw6 \
56         --disable-rpath-hack
57
58 make
59 popd
60
61 mkdir BUILD-%{AltProgram}
62 pushd BUILD-%{AltProgram}
63 INSTALL_PROGRAM='${INSTALL}' \
64 NCURSES_CONFIG_SUFFIX=dev \
65 CONFIGURE_TOP=%{my_srcdir} \
66 %configure \
67         --target %{_target_platform} \
68         --prefix=%{_prefix} \
69         --bindir=%{_bindir}/%{AltProgram} \
70         --datadir=%{_datadir}/%{AltProgram} \
71         --with-screen=ncursestw6 \
72         --disable-rpath-hack
73
74 make
75 popd
76
77 %install
78 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
79
80 pushd BUILD-%{AppProgram}
81 make install DESTDIR=$RPM_BUILD_ROOT
82 popd
83
84 pushd BUILD-%{AltProgram}
85 make install DESTDIR=$RPM_BUILD_ROOT
86 popd
87
88 %clean
89 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
90
91 %files -n %{AppProgram}
92 %defattr(-,root,root)
93 %{_bindir}/%{AppProgram}/*
94 %{_datadir}/%{AppProgram}/*
95
96 %files -n %{AltProgram}
97 %defattr(-,root,root)
98 %{_bindir}/%{AltProgram}/*
99 %{_datadir}/%{AltProgram}/*
100
101 %changelog
102 # each patch should add its ChangeLog entries here
103
104 * Sat Nov 11 2017 Thomas Dickey
105 - add example data-files
106 - use rpm built-in "configure"
107 - suppress debug-package
108
109 * Thu Mar 25 2010 Thomas Dickey
110 - initial version