1 %define apxs /usr/sbin/apxs
2 Summary: Terminal emulator in a web browser
8 Group: Networking/Daemons
9 Source0: http://anyterm.org/download/%{name}-%{version}.tbz2
10 # Source0-md5: cf841703b7438866e573f5a33137ff6f
11 Patch0: %{name}-makefile.patch
12 URL: http://anyterm.org/
13 BuildRequires: apache-devel >= 2.0.52-2
14 BuildRequires: apr-devel
15 BuildRequires: rote-devel >= 0.2.8
16 BuildRequires: rpmbuild(macros) >= 1.228
17 BuildRequires: %{apxs}
18 Requires: apache >= 2.0.52-2
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _appdir %{_datadir}/%{name}
22 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
23 %define _sysconfdir /etc/httpd
26 An apache module plus scripts to make a terminal within a web browser.
31 mv -f browser/.htaccess htaccess
34 %{__make} -C apachemod \
35 INCLUDES='-I%{_includedir}/apr-util' \
37 APR_CONFIG=apr-1-config
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_appdir}}
44 cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_anyterm.conf <<END
45 LoadModule anyterm modules/%{name}.so
47 Alias /%{name} "%{_appdir}"
48 anyterm_command '%{_sbindir}/anygetty --remotehost "Anyterm: %h"'
50 <Files anyterm-module>
54 # vim: filetype=apache ts=4 sw=4 et
57 install apachemod/.libs/%{name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{name}.so
58 cp -a browser/* $RPM_BUILD_ROOT%{_appdir}
59 install anygetty/anygetty $RPM_BUILD_ROOT/%{_sbindir}
62 rm -rf $RPM_BUILD_ROOT
65 %service httpd restart
68 For full function, setuid %{_sbindir}/anygetty.
72 if [ "$1" = "0" ]; then
73 %service -q httpd restart
77 %defattr(644,root,root,755)
78 %doc README CHANGELOG htaccess
79 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*
80 %attr(755,root,root) %{_pkglibdir}/%{name}.so
81 %attr(755,root,root) %{_sbindir}/anygetty