blob: 8f1a3cbe52d133b84c7dc9a83e6d38929005c265 [file] [log] [blame]
micky3879b9f5e72025-07-08 18:04:53 -04001Summary: 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 $
Steve Kondikae271bc2015-11-15 02:50:53 +01007Name: %{AppProgram}
8Version: %{AppVersion}
9Release: %{AppRelease}
10License: MIT
11Group: Applications/Development
micky3879b9f5e72025-07-08 18:04:53 -040012URL: https://invisible-island.net/ncurses/%{AppProgram}.html
13Source: https://invisible-island.net/archives/%{AppProgram}/%{AppProgram}-%{release}.tgz
Steve Kondikae271bc2015-11-15 02:50:53 +010014
15%description
16These are the example/test programs from the ncurses MAJOR.MINOR distribution,
17for patch-date YYYYMMDD.
18
micky3879b9f5e72025-07-08 18:04:53 -040019This package installs in "bin/%{AppProgram}" to avoid conflict with other
Steve Kondikae271bc2015-11-15 02:50:53 +010020packages.
micky3879b9f5e72025-07-08 18:04:53 -040021
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
Steve Kondikae271bc2015-11-15 02:50:53 +010033%prep
34
35%setup -q -n %{AppProgram}-%{AppRelease}
36
micky3879b9f5e72025-07-08 18:04:53 -040037%define debug_package %{nil}
38
Steve Kondikae271bc2015-11-15 02:50:53 +010039%build
40
micky3879b9f5e72025-07-08 18:04:53 -040041%global _configure ../configure
42%define my_srcdir ..
43
44mkdir BUILD-%{AppProgram}
45pushd BUILD-%{AppProgram}
Steve Kondikae271bc2015-11-15 02:50:53 +010046INSTALL_PROGRAM='${INSTALL}' \
micky3879b9f5e72025-07-08 18:04:53 -040047NCURSES_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
Steve Kondikae271bc2015-11-15 02:50:53 +010055
56make
micky3879b9f5e72025-07-08 18:04:53 -040057popd
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
Steve Kondikae271bc2015-11-15 02:50:53 +010073
74%install
75[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
76
micky3879b9f5e72025-07-08 18:04:53 -040077pushd BUILD-%{AppProgram}
78make install PACKAGE=%{AppProgram} DESTDIR=$RPM_BUILD_ROOT
79popd
Steve Kondikae271bc2015-11-15 02:50:53 +010080
micky3879b9f5e72025-07-08 18:04:53 -040081pushd BUILD-%{AltProgram}
82make install PACKAGE=%{AltProgram} DESTDIR=$RPM_BUILD_ROOT
83popd
Steve Kondikae271bc2015-11-15 02:50:53 +010084
micky3879b9f5e72025-07-08 18:04:53 -040085%files -n %{AppProgram}
Steve Kondikae271bc2015-11-15 02:50:53 +010086%defattr(-,root,root)
micky3879b9f5e72025-07-08 18:04:53 -040087%{_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}/*
Steve Kondikae271bc2015-11-15 02:50:53 +010096
97%changelog
98# each patch should add its ChangeLog entries here
99
micky3879b9f5e72025-07-08 18:04:53 -0400100* 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
Steve Kondikae271bc2015-11-15 02:50:53 +0100114* Thu Mar 25 2010 Thomas Dickey
115- initial version