File poplog.spec of Package poplog
# See https://rpm-packaging-guide.github.io/
# for help on writing spec files.
Name: poplog
Version: 0.3.2
Release: 1
Summary: Poplog development environment
License: MIT
Source0: poplog-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}/%{version}
Buildarch: x86_64
BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: ncurses-devel
BuildRequires: libXext-devel
BuildRequires: libX11-devel
BuildRequires: libXt-devel
BuildRequires: openmotif-devel
# RHEL and CentOS 7 and below ships with ncurses5 as ncurses-libs
%if 0%{?rhel} && 0%{?rhel} < 8
BuildRequires: ncurses-libs
%else
%if 0%{?suse_version}
# OpenSUSE has different names for ncurses5 than RHEL/CentOS/Fedora
BuildRequires: ncurses5-devel
BuildRequires: libncurses5
%else
# RHEL and CentOS 8 and above, and Fedora 31+ ship ncurses5 as ncurses-compat-libs
BuildRequires: ncurses-compat-libs
%endif
%endif
Requires: libXext
Requires: libX11
Requires: libXt
Requires: glibc(x86-32)
# libXt-devel is needed for some reason, without it libXt.so load errors occur.
Requires: libXt-devel
Requires: openmotif
Requires: openmotif-devel
# See comments on conditional BuildRequires for information on
# which packages are selected for different distributions
%if 0%{?rhel} && 0%{?rhel} < 8
Requires: ncurses-libs
%else
%if 0%{?suse_version}
Requires: libncurses5
%else
Requires: ncurses-compat-libs
%endif
%endif
%if 0%{?rhel} && 0%{?rhel} < 8
# RHEL 7/CentOS 7 don't support Suggests.
%else
Suggests: csh
Suggests: xterm
Suggests: espeak
%endif
%description
Poplog is a software development environment for the programming languages
POP-11, Common Lisp, Prolog, and Standard ML.
# Currently, poplog ships some .so files which cause the post RPM build
# check to fail as they don't have build IDs stamped within them. We
# can't do much about that, so we tell rpmbuild to ignore them.
%undefine _missing_build_ids_terminate_build
%prep
# Without setting the umask, there are issues unpacking the tarballs.
umask 0
%setup -q
%build
make
%install
mkdir -p %{buildroot}/opt/#poplog/%{name}-%{version}-%{release}
make install DESTDIR=%{buildroot} prefix=/opt bindir=%{_bindir}
%files
%defattr(-,root,root,-)
/opt/poplog
/usr/bin/poplog
%changelog