2 # - anygetty hangs due /bin/login calling vhangup()
3 # http://anyterm.org/1.0/config.html
4 # - put anygetty to separate package?
5 %define apxs /usr/sbin/apxs
6 Summary: Terminal emulator in a web browser
7 Summary(pl): Emulator terminala dzia³aj±cy w przegl±darce WWW
13 Group: Networking/Daemons
14 Source0: http://anyterm.org/download/%{name}-%{version}.tbz2
15 # Source0-md5: cf841703b7438866e573f5a33137ff6f
16 Patch0: %{name}-makefile.patch
17 URL: http://anyterm.org/
18 BuildRequires: apache-devel >= 2.0.52-2
19 BuildRequires: apr-devel
20 BuildRequires: rote-devel >= 0.2.8
21 BuildRequires: rpmbuild(macros) >= 1.228
22 BuildRequires: %{apxs}
23 Requires: apache >= 2.0.52-2
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _appdir %{_datadir}/%{name}
27 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
28 %define _sysconfdir /etc/httpd
31 An Apache module plus scripts to make a terminal within a web browser.
34 Modu³ Apache'a i skrypty tworz±ce terminal w przegl±darce WWW.
39 mv -f browser/.htaccess htaccess
42 %{__make} -C apachemod \
43 INCLUDES='-I%{_includedir}/apr-util' \
45 APR_CONFIG=apr-1-config
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_appdir}}
52 cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_anyterm.conf <<'END'
53 LoadModule anyterm modules/%{name}.so
55 Alias /%{name} "%{_appdir}"
57 # anyterm_command '%{_sbindir}/anygetty --remotehost "Anyterm: %h"'
59 anyterm_command "USER=%u; exec /usr/bin/ssh ${USER:+$USER@}localhost"
61 <Files anyterm-module>
63 <IfModule mod_setenv.c>
64 # for this to work you need to change CustomLog:
65 # CustomLog /path/to/logfile combined env=!DONTLOG
66 # http://anyterm.org/security.html
71 <IfModule !mod_auth.c>
80 AuthUserFile /etc/httpd/user
81 AuthGroupFile /etc/httpd/group
89 # vim: filetype=apache ts=4 sw=4 et
92 install apachemod/.libs/%{name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{name}.so
93 cp -a browser/* $RPM_BUILD_ROOT%{_appdir}
94 install anygetty/anygetty $RPM_BUILD_ROOT/%{_sbindir}
97 rm -rf $RPM_BUILD_ROOT
100 %service httpd restart
102 %banner %{name} <<-EOF
103 To use anygetty, you need to setuid it:
104 chmod 4755 %{_sbindir}/anygetty
108 if [ "$1" = "0" ]; then
109 %service -q httpd restart
113 %defattr(644,root,root,755)
114 %doc README CHANGELOG htaccess
115 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*
116 %attr(755,root,root) %{_pkglibdir}/%{name}.so
117 %attr(755,root,root) %{_sbindir}/anygetty