]>
Commit | Line | Data |
---|---|---|
87aaa0d7 ER |
1 | # TODO |
2 | # - anygetty hangs due /bin/login calling vhangup() | |
3 | # http://anyterm.org/1.0/config.html | |
4 | # - put anygetty to separate package? | |
57ac7731 | 5 | %define apxs /usr/sbin/apxs |
6 | Summary: Terminal emulator in a web browser | |
27d072ec | 7 | Summary(pl.UTF-8): Emulator terminala działający w przeglądarce WWW |
57ac7731 | 8 | Name: anyterm |
9 | Version: 1.1.4 | |
e89d6217 | 10 | Release: 0.10 |
e1dd02cd | 11 | Epoch: 0 |
57ac7731 | 12 | License: GPL |
13 | Group: Networking/Daemons | |
14 | Source0: http://anyterm.org/download/%{name}-%{version}.tbz2 | |
15 | # Source0-md5: cf841703b7438866e573f5a33137ff6f | |
8785aef2 | 16 | Patch0: %{name}-makefile.patch |
57ac7731 | 17 | URL: http://anyterm.org/ |
8c7c5e93 | 18 | BuildRequires: %{apxs} |
57ac7731 | 19 | BuildRequires: apache-devel >= 2.0.52-2 |
20 | BuildRequires: apr-devel | |
21 | BuildRequires: rote-devel >= 0.2.8 | |
ecd95c79 | 22 | BuildRequires: rpmbuild(macros) >= 1.228 |
57ac7731 | 23 | Requires: apache >= 2.0.52-2 |
e2b01ede | 24 | Requires: apache(modules-api) = %apache_modules_api |
57ac7731 | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
ecd95c79 | 27 | %define _appdir %{_datadir}/%{name} |
8785aef2 | 28 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
e89d6217 | 29 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) |
57ac7731 | 30 | |
31 | %description | |
9b07d92b JB |
32 | An Apache module plus scripts to make a terminal within a web browser. |
33 | ||
c44081d4 JR |
34 | %description -l pl.UTF-8 |
35 | Moduł Apache'a i skrypty tworzące terminal w przeglądarce WWW. | |
57ac7731 | 36 | |
37 | %prep | |
38 | %setup -q | |
39 | %patch0 -p1 | |
ecd95c79 | 40 | mv -f browser/.htaccess htaccess |
57ac7731 | 41 | |
42 | %build | |
3f2c16d7 | 43 | %{__make} -C apachemod \ |
8785aef2 | 44 | INCLUDES='-I%{_includedir}/apr-util' \ |
ecd95c79 | 45 | APXS2=%{apxs} \ |
57ac7731 | 46 | APR_CONFIG=apr-1-config |
3f2c16d7 | 47 | %{__make} -C anygetty |
57ac7731 | 48 | |
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
ecd95c79 | 51 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_appdir}} |
57ac7731 | 52 | |
cca3cb31 | 53 | cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_anyterm.conf <<'END' |
57ac7731 | 54 | LoadModule anyterm modules/%{name}.so |
ecd95c79 ER |
55 | <IfModule anyterm> |
56 | Alias /%{name} "%{_appdir}" | |
cca3cb31 ER |
57 | # hangs on login: |
58 | # anyterm_command '%{_sbindir}/anygetty --remotehost "Anyterm: %h"' | |
59 | # works for me: | |
60 | anyterm_command "USER=%u; exec /usr/bin/ssh ${USER:+$USER@}localhost" | |
ecd95c79 ER |
61 | |
62 | <Files anyterm-module> | |
63 | SetHandler anyterm | |
87aaa0d7 ER |
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 | |
68 | SetEnv DONTLOG | |
69 | </IfModule> | |
ecd95c79 | 70 | </Files> |
cca3cb31 | 71 | |
770fba2c ER |
72 | <IfModule !mod_auth.c> |
73 | <Location /%{name}> | |
74 | allow from all | |
75 | </Location> | |
76 | </IfModule> | |
cca3cb31 | 77 | |
770fba2c ER |
78 | <IfModule mod_auth.c> |
79 | <Location /%{name}> | |
80 | AuthType Basic | |
81 | AuthUserFile /etc/httpd/user | |
82 | AuthGroupFile /etc/httpd/group | |
83 | AuthName "AnyTerm" | |
84 | require group anyterm | |
85 | satisfy any | |
86 | order allow,deny | |
87 | </Location> | |
88 | </IfModule> | |
ecd95c79 ER |
89 | </IfModule> |
90 | # vim: filetype=apache ts=4 sw=4 et | |
57ac7731 | 91 | END |
92 | ||
93 | install apachemod/.libs/%{name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{name}.so | |
ecd95c79 | 94 | cp -a browser/* $RPM_BUILD_ROOT%{_appdir} |
e2b01ede | 95 | install anygetty/anygetty $RPM_BUILD_ROOT%{_sbindir} |
57ac7731 | 96 | |
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
ecd95c79 ER |
100 | %post |
101 | %service httpd restart | |
102 | ||
db9d5550 ER |
103 | %banner %{name} <<-EOF |
104 | To use anygetty, you need to setuid it: | |
105 | chmod 4755 %{_sbindir}/anygetty | |
106 | EOF | |
ecd95c79 ER |
107 | |
108 | %preun | |
109 | if [ "$1" = "0" ]; then | |
110 | %service -q httpd restart | |
111 | fi | |
112 | ||
57ac7731 | 113 | %files |
114 | %defattr(644,root,root,755) | |
3f2c16d7 | 115 | %doc README CHANGELOG htaccess |
8785aef2 | 116 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/* |
57ac7731 | 117 | %attr(755,root,root) %{_pkglibdir}/%{name}.so |
118 | %attr(755,root,root) %{_sbindir}/anygetty | |
ecd95c79 | 119 | %{_appdir} |