|
|
c846cda |
%global pkgname scscp
|
|
|
eb0b974 |
%global PKGNAME SCSCP
|
|
|
c846cda |
%global usrname gapd
|
|
|
c846cda |
|
|
|
c846cda |
Name: gap-pkg-%{pkgname}
|
|
|
dd72874 |
Version: 2.3.0
|
|
|
dd72874 |
Release: 1%{?dist}
|
|
|
c846cda |
Summary: Symbolic Computation Software Composability Protocol in GAP
|
|
|
c846cda |
|
|
|
c846cda |
License: GPLv2+
|
|
|
eb0b974 |
URL: https://gap-packages.github.io/scscp/
|
|
|
dd72874 |
BuildArch: noarch
|
|
|
eb0b974 |
Source0: https://github.com/gap-packages/%{pkgname}/releases/download/v%{version}/%{PKGNAME}-%{version}.tar.gz
|
|
|
c846cda |
Source1: %{usrname}.sh
|
|
|
c846cda |
Source2: gap-scscp.service
|
|
|
c846cda |
Source3: %{usrname}.logrotate
|
|
|
c846cda |
Source4: %{usrname}.conf
|
|
|
c846cda |
Source5: %{usrname}.h2m
|
|
|
c846cda |
Source6: server.g
|
|
|
dd72874 |
|
|
|
dd72874 |
# Fix a typo in makedoc.g.
|
|
|
dd72874 |
Patch0: %{name}-makedoc.patch
|
|
|
c846cda |
|
|
|
c846cda |
BuildRequires: gap-devel
|
|
|
c846cda |
BuildRequires: GAPDoc-latex
|
|
|
ed8b3fc |
BuildRequires: gap-pkg-io-doc
|
|
|
ed8b3fc |
BuildRequires: gap-pkg-openmath-doc
|
|
|
ed8b3fc |
BuildRequires: gap-pkg-smallgrp-doc
|
|
|
c846cda |
BuildRequires: help2man
|
|
|
c846cda |
BuildRequires: systemd
|
|
|
c846cda |
|
|
|
c846cda |
%{?systemd_requires}
|
|
|
c846cda |
Requires(pre): shadow-utils
|
|
|
c846cda |
Requires: gap-pkg-openmath
|
|
|
c846cda |
|
|
|
c846cda |
%description
|
|
|
c846cda |
This package implements the Symbolic Computation Software Composability
|
|
|
c846cda |
Protocol (SCSCP) for the GAP system in accordance with the SCSCP
|
|
|
c846cda |
specification, described at http://www.symbolic-computing.org/scscp, and
|
|
|
c846cda |
OpenMath dictionaries scscp1 and scscp2.
|
|
|
c846cda |
|
|
|
ed8b3fc |
%package doc
|
|
|
ed8b3fc |
Summary: SCSCP documentation
|
|
|
ed8b3fc |
Requires: %{name} = %{version}-%{release}
|
|
|
ed8b3fc |
Requires: gap-pkg-io-doc
|
|
|
ed8b3fc |
Requires: gap-pkg-openmath-doc
|
|
|
ed8b3fc |
Requires: gap-pkg-smallgrp-doc
|
|
|
ed8b3fc |
|
|
|
ed8b3fc |
%description doc
|
|
|
ed8b3fc |
This package contains documentation for gap-pkg-%{pkgname}.
|
|
|
ed8b3fc |
|
|
|
c846cda |
%prep
|
|
|
ed8b3fc |
%autosetup -p0 -n %{PKGNAME}-%{version}
|
|
|
c846cda |
|
|
|
c846cda |
%build
|
|
|
c846cda |
# Link to main GAP documentation
|
|
|
c846cda |
ln -s %{_gap_dir}/doc ../../doc
|
|
|
c846cda |
mkdir ../pkg
|
|
|
eb0b974 |
ln -s ../%{PKGNAME}-%{version} ../pkg/%{PKGNAME}
|
|
|
ed8b3fc |
ln -s %{_gap_dir}/pkg/io-* ../pkg
|
|
|
ed8b3fc |
ln -s %{_gap_dir}/pkg/OpenMath-* ../pkg
|
|
|
dd72874 |
ln -s %{_gap_dir}/pkg/SmallGrp-* ../pkg
|
|
|
eb0b974 |
gap -l "$PWD/..;%{_gap_dir}" makedoc.g
|
|
|
c846cda |
rm -fr ../../doc ../pkg
|
|
|
c846cda |
|
|
|
c846cda |
%install
|
|
|
c846cda |
mkdir -p %{buildroot}%{_gap_dir}/pkg
|
|
|
eb0b974 |
cp -a ../%{PKGNAME}-%{version} %{buildroot}%{_gap_dir}/pkg/%{PKGNAME}
|
|
|
dd72874 |
rm -f %{buildroot}%{_gap_dir}/pkg/%{PKGNAME}/{COPYING,README.md,todo.txt}
|
|
|
ed8b3fc |
rm -f %{buildroot}%{_gap_dir}/pkg/%{PKGNAME}/doc/*.{aux,bbl,blg,brf,idx,ilg,ind,log,out,pnr,tex}
|
|
|
c846cda |
|
|
|
c846cda |
# Replace upstream's launcher script with our own.
|
|
|
ed8b3fc |
install -p -m 0755 %{SOURCE1} %{buildroot}%{_gap_dir}/pkg/%{PKGNAME}
|
|
|
c846cda |
|
|
|
dd72874 |
# Make the daemon's home directory
|
|
|
dd72874 |
mkdir -p %{buildroot}%{_sharedstatedir}/%{usrname}
|
|
|
dd72874 |
|
|
|
c846cda |
# Install the systemd unit
|
|
|
c846cda |
mkdir -p %{buildroot}%{_unitdir}
|
|
|
ed8b3fc |
install -p -m 0644 -p %{SOURCE2} %{buildroot}%{_unitdir}
|
|
|
c846cda |
|
|
|
c846cda |
# Install the logrotate script
|
|
|
c846cda |
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
|
|
ed8b3fc |
install -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|
|
c846cda |
|
|
|
c846cda |
# Install the daemon config file
|
|
|
c846cda |
mkdir -p %{buildroot}%{_sysconfdir}
|
|
|
ed8b3fc |
install -p -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}
|
|
|
c846cda |
|
|
|
c846cda |
# Install the man page
|
|
|
c846cda |
mkdir -p %{buildroot}%{_mandir}/man8
|
|
|
c846cda |
help2man -m "GAP SCSCP package" -S "GAP SCSCP (Fedora %{version}-%{release})" \
|
|
|
c846cda |
-n "GAP Daemon" -I %{SOURCE5} -o %{buildroot}%{_mandir}/man8/%{usrname}.8 \
|
|
|
c846cda |
-N -s 8 %{SOURCE1}
|
|
|
c846cda |
|
|
|
c846cda |
# Move the config files to their new home
|
|
|
c846cda |
mkdir -p %{buildroot}%{_sysconfdir}/scscp/gap
|
|
|
ed8b3fc |
install -p -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/scscp/gap
|
|
|
eb0b974 |
mv %{buildroot}%{_gap_dir}/pkg/%{PKGNAME}/config.g \
|
|
|
eb0b974 |
%{buildroot}%{_gap_dir}/pkg/%{PKGNAME}/configpar.g \
|
|
|
c846cda |
%{buildroot}%{_sysconfdir}/scscp/gap
|
|
|
c846cda |
|
|
|
c846cda |
# Tell the package where to look for its configuration
|
|
|
c846cda |
sed -e 's,ReadPackage("scscp/\(config\.g\)"),Read("/etc/scscp/gap/\1"),' \
|
|
|
c846cda |
-e 's,ReadPackage("scscp/\(configpar\.g\)"),Read("/etc/scscp/gap/\1"),' \
|
|
|
eb0b974 |
-i %{buildroot}%{_gap_dir}/pkg/%{PKGNAME}/init.g
|
|
|
eb0b974 |
touch -r init.g %{buildroot}%{_gap_dir}/pkg/%{PKGNAME}/init.g
|
|
|
c846cda |
|
|
|
c846cda |
%check
|
|
|
c846cda |
# We only run the offline test as the others require network access and two
|
|
|
c846cda |
# servers to be setup and running.
|
|
|
c846cda |
mkdir ../pkg
|
|
|
eb0b974 |
ln -s ../%{PKGNAME}-%{version} ../pkg/%{PKGNAME}
|
|
|
c846cda |
pushd tst
|
|
|
ed8b3fc |
gap -l "$PWD/../..;%{_gap_dir}" << EOF
|
|
|
c846cda |
LoadPackage("scscp");
|
|
|
ed8b3fc |
GAP_EXIT_CODE(Test("offline.tst", rec(compareFunction := "uptowhitespace") ));
|
|
|
c846cda |
EOF
|
|
|
c846cda |
popd
|
|
|
c846cda |
rm -fr ../pkg
|
|
|
c846cda |
|
|
|
c846cda |
%pre
|
|
|
dd72874 |
getent passwd %{usrname} >/dev/null || \
|
|
|
dd72874 |
useradd -c "GAP SCSCP server daemon" -d %{_sharedstatedir}/%{usrname} \
|
|
|
dd72874 |
-r -s /sbin/nologin -U %{usrname} || :
|
|
|
c846cda |
|
|
|
c846cda |
%preun
|
|
|
c846cda |
%systemd_preun gap-scscp.service
|
|
|
c846cda |
|
|
|
c846cda |
%post
|
|
|
c846cda |
%systemd_post gap-scscp.service
|
|
|
c846cda |
|
|
|
dd72874 |
%posttrans
|
|
|
dd72874 |
chown %{usrname}:%{usrname} %{_sharedstatedir}/%{usrname}
|
|
|
dd72874 |
|
|
|
c846cda |
%files
|
|
|
eb0b974 |
%doc README.md todo.txt
|
|
|
9cd8317 |
%license COPYING
|
|
|
eb0b974 |
%{_gap_dir}/pkg/%{PKGNAME}/
|
|
|
ed8b3fc |
%exclude %{_gap_dir}/pkg/%{PKGNAME}/demo/
|
|
|
ed8b3fc |
%exclude %{_gap_dir}/pkg/%{PKGNAME}/doc/
|
|
|
ed8b3fc |
%exclude %{_gap_dir}/pkg/%{PKGNAME}/example/
|
|
|
c846cda |
%{_mandir}/man8/%{usrname}.8*
|
|
|
c846cda |
%{_unitdir}/gap-scscp.service
|
|
|
c846cda |
%dir %{_sysconfdir}/scscp/
|
|
|
c846cda |
%dir %{_sysconfdir}/scscp/gap/
|
|
|
c846cda |
%config(noreplace) %{_sysconfdir}/scscp/gap/config.g
|
|
|
c846cda |
%config(noreplace) %{_sysconfdir}/scscp/gap/configpar.g
|
|
|
c846cda |
%config(noreplace) %{_sysconfdir}/scscp/gap/server.g
|
|
|
c846cda |
%config(noreplace) %{_sysconfdir}/%{usrname}.conf
|
|
|
c846cda |
%dir %{_sysconfdir}/logrotate.d/
|
|
|
c846cda |
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
dd72874 |
%attr(755,%{usrname},%{usrname}) %{_sharedstatedir}/%{usrname}/
|
|
|
c846cda |
|
|
|
ed8b3fc |
%files doc
|
|
|
ed8b3fc |
%docdir %{_gap_dir}/pkg/%{PKGNAME}/demo/
|
|
|
ed8b3fc |
%docdir %{_gap_dir}/pkg/%{PKGNAME}/doc/
|
|
|
ed8b3fc |
%docdir %{_gap_dir}/pkg/%{PKGNAME}/example/
|
|
|
ed8b3fc |
%{_gap_dir}/pkg/%{PKGNAME}/demo/
|
|
|
ed8b3fc |
%{_gap_dir}/pkg/%{PKGNAME}/doc/
|
|
|
ed8b3fc |
%{_gap_dir}/pkg/%{PKGNAME}/example/
|
|
|
ed8b3fc |
|
|
|
c846cda |
%changelog
|
|
|
dd72874 |
* Tue Jun 25 2019 Jerry James <loganjerry@gmail.com> - 2.3.0-1
|
|
|
dd72874 |
- New upstream version
|
|
|
dd72874 |
- Drop upstreamed -ref patch
|
|
|
dd72874 |
- Add -makedoc patch to fix documentation building
|
|
|
dd72874 |
- Fix creation of the daemon home dir
|
|
|
dd72874 |
|
|
|
a92ce41 |
* Fri Mar 8 2019 Tim Landscheidt <tim@tim-landscheidt.de> - 2.2.3-6
|
|
|
a92ce41 |
- Remove obsolete requirement for %%postun scriptlet
|
|
|
a92ce41 |
|
|
|
ed8b3fc |
* Sat Feb 2 2019 Jerry James <loganjerry@gmail.com> - 2.2.3-5
|
|
|
ed8b3fc |
- Rebuild for gap 4.10.0
|
|
|
ed8b3fc |
- Add -ref patch
|
|
|
ed8b3fc |
- Add -doc subpackage
|
|
|
ed8b3fc |
|
|
|
9d869ca |
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-4
|
|
|
9d869ca |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
9d869ca |
|
|
|
6efbfaa |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3
|
|
|
6efbfaa |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
6efbfaa |
|
|
|
b04a54c |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-2
|
|
|
b04a54c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
b04a54c |
|
|
|
9cd8317 |
* Tue Sep 26 2017 Jerry James <loganjerry@gmail.com> - 2.2.3-1
|
|
|
9cd8317 |
- New upstream version
|
|
|
9cd8317 |
|
|
|
754d593 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-2
|
|
|
754d593 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
754d593 |
|
|
|
eb0b974 |
* Sat Apr 1 2017 Jerry James <loganjerry@gmail.com> - 2.2.2-1
|
|
|
eb0b974 |
- New upstream version
|
|
|
eb0b974 |
- New URLs
|
|
|
eb0b974 |
|
|
|
f65c8f6 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.4-4
|
|
|
f65c8f6 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
f65c8f6 |
|
|
|
c846cda |
* Wed Jul 20 2016 Jerry James <loganjerry@gmail.com> - 2.1.4-3
|
|
|
c846cda |
- Own the logrotate directory
|
|
|
c846cda |
- Do not delete the user in postun
|
|
|
c846cda |
|
|
|
c846cda |
* Thu May 26 2016 Jerry James <loganjerry@gmail.com> - 2.1.4-2
|
|
|
c846cda |
- Improved service integration
|
|
|
c846cda |
|
|
|
c846cda |
* Fri Apr 22 2016 Jerry James <loganjerry@gmail.com> - 2.1.4-1
|
|
|
c846cda |
- Initial RPM
|