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.UTF-8): 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: %{apxs}
19 BuildRequires: apache-devel >= 2.0.52-2
20 BuildRequires: apr-devel
21 BuildRequires: rote-devel >= 0.2.8
22 BuildRequires: rpmbuild(macros) >= 1.228
23 Requires: apache >= 2.0.52-2
24 Requires: apache(modules-api) = %apache_modules_api
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _appdir %{_datadir}/%{name}
28 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
32 An Apache module plus scripts to make a terminal within a web browser.
34 %description -l pl.UTF-8
35 Moduł Apache'a i skrypty tworzące terminal w przeglądarce WWW.
40 mv -f browser/.htaccess htaccess
43 %{__make} -C apachemod \
44 INCLUDES='-I%{_includedir}/apr-util' \
46 APR_CONFIG=apr-1-config
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_appdir}}
53 cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_anyterm.conf <<'END'
54 LoadModule anyterm modules/%{name}.so
56 Alias /%{name} "%{_appdir}"
58 # anyterm_command '%{_sbindir}/anygetty --remotehost "Anyterm: %h"'
60 anyterm_command "USER=%u; exec /usr/bin/ssh ${USER:+$USER@}localhost"
62 <Files anyterm-module>
64 <IfModule mod_setenv.c>
65 # for this to work you need to change CustomLog:
66 # CustomLog /path/to/logfile combined env=!DONTLOG
67 # http://anyterm.org/security.html
72 <IfModule !mod_auth.c>
81 AuthUserFile /etc/httpd/user
82 AuthGroupFile /etc/httpd/group
90 # vim: filetype=apache ts=4 sw=4 et
93 install apachemod/.libs/%{name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{name}.so
94 cp -a browser/* $RPM_BUILD_ROOT%{_appdir}
95 install anygetty/anygetty $RPM_BUILD_ROOT%{_sbindir}
98 rm -rf $RPM_BUILD_ROOT
101 %service httpd restart
103 %banner %{name} <<-EOF
104 To use anygetty, you need to setuid it:
105 chmod 4755 %{_sbindir}/anygetty
109 if [ "$1" = "0" ]; then
110 %service -q httpd restart
114 %defattr(644,root,root,755)
115 %doc README CHANGELOG htaccess
116 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*
117 %attr(755,root,root) %{_pkglibdir}/%{name}.so
118 %attr(755,root,root) %{_sbindir}/anygetty