102 lines
2.8 KiB
RPMSpec
102 lines
2.8 KiB
RPMSpec
Name: anyterm
|
|
Version: 1.2.3
|
|
Release: %autorelease
|
|
Summary: A web-based terminal emulator
|
|
|
|
License: GPL-2.0-or-later
|
|
URL: http://anyterm.org
|
|
|
|
# The source for this package was pulled from upstream's vcs. Use the
|
|
# following commands to generate the tarball:
|
|
# svn export http://svn.anyterm.org/anyterm/tags/releases/1.2/1.2.3 anyterm-1.2.3
|
|
# tar -jcf anyterm-1.2.3.tar.xz anyterm-1.2.3
|
|
Source0: anyterm-1.2.3.tar.xz
|
|
Source1: anyterm-cmd
|
|
Source4: anyterm.conf
|
|
Source5: anyterm.service
|
|
Source6: anyterm.sysusers.conf
|
|
Source7: anyterm.tmpfiles.conf
|
|
|
|
# http://anyterm.org/1.1/install.html#secid2252601
|
|
Patch0: anyterm-change-url-prefix.patch
|
|
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: boost-devel
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: systemd
|
|
BuildRequires: make
|
|
BuildRequires: systemd-rpm-macros
|
|
Requires(post): systemd
|
|
Requires(preun): systemd
|
|
Requires(postun): systemd
|
|
%{?sysusers_requires_compat}
|
|
|
|
|
|
%package httpd
|
|
Summary: Httpd proxy configuration for anyterm
|
|
License: GPL-2.0-or-later
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: httpd
|
|
|
|
|
|
%description
|
|
The Anyterm web-based terminal emulator, permits terminal and/or arbitrary
|
|
command access via http. The anyterm daemon can be configured to run any
|
|
arbitrary command, redirecting all standard input / output / error to
|
|
and from any javascript-enabled web browser in real time.
|
|
|
|
%description httpd
|
|
The httpd configuration necessary to proxy anyterm.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch -P0 -p0
|
|
|
|
%build
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
export CXXFLAGS="$RPM_OPT_FLAGS -std=c++17"
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" OPTIMISE_FLAGS="$CXXFLAGS"
|
|
gzip anytermd.1
|
|
|
|
%install
|
|
install -Dp -m0755 anytermd %{buildroot}%{_sbindir}/anytermd
|
|
install -Dp -m0644 anytermd.1.gz %{buildroot}%{_mandir}/man1/anytermd.1.gz
|
|
install -Dp -m0755 %{SOURCE1} %{buildroot}%{_libexecdir}/%{name}/anyterm-cmd
|
|
install -Dp -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/anyterm.conf
|
|
install -Dp -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/anyterm.service
|
|
install -Dp -m0644 %{SOURCE6} %{buildroot}%{_sysusersdir}/anyterm.conf
|
|
install -Dp -m0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/anyterm/
|
|
for f in browser/*.{html,css,js,png,gif}; do
|
|
install -m644 "$f" %{buildroot}%{_datadir}/anyterm/
|
|
done
|
|
|
|
%pre
|
|
%sysusers_create_compat %{SOURCE6}
|
|
|
|
%post
|
|
%systemd_post anyterm.service
|
|
|
|
%preun
|
|
%systemd_preun anyterm.service
|
|
|
|
%postun
|
|
%systemd_postun_with_restart anyterm.service
|
|
|
|
%files
|
|
%{_sbindir}/anytermd
|
|
%{_libexecdir}/anyterm/
|
|
%{_mandir}/man1/anytermd.1.gz
|
|
%{_datadir}/anyterm/
|
|
%{_unitdir}/anyterm.service
|
|
%ghost %attr(0755,%{name},%{name}) %dir /run/%{name}
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
%doc LICENSE
|
|
%{_sysusersdir}/anyterm.conf
|
|
|
|
%files httpd
|
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/anyterm.conf
|
|
|
|
%changelog
|
|
%autochangelog
|