]>
Commit | Line | Data |
---|---|---|
57ac7731 | 1 | # |
2 | %define apxs /usr/sbin/apxs | |
3 | Summary: Terminal emulator in a web browser | |
4 | Name: anyterm | |
5 | Version: 1.1.4 | |
6 | Release: 1 | |
7 | Epoch: 1 | |
8 | License: GPL | |
9 | Group: Networking/Daemons | |
10 | Source0: http://anyterm.org/download/%{name}-%{version}.tbz2 | |
11 | # Source0-md5: cf841703b7438866e573f5a33137ff6f | |
12 | Patch0: %{name}-makefile.patch | |
13 | URL: http://anyterm.org/ | |
14 | BuildRequires: apache-devel >= 2.0.52-2 | |
15 | BuildRequires: apr-devel | |
16 | BuildRequires: rote-devel >= 0.2.8 | |
17 | BuildRequires: %{apxs} | |
18 | Requires: apache >= 2.0.52-2 | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _httpdir /home/services/httpd | |
22 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR) | |
23 | %define _sysconfdir /etc/httpd | |
24 | ||
25 | %description | |
26 | An apache module plus scripts to make a terminal within a web browser. | |
27 | ||
28 | %prep | |
29 | %setup -q | |
30 | %patch0 -p1 | |
31 | ||
32 | %build | |
33 | rm -rf $RPM_BUILD_ROOT | |
34 | cd apachemod | |
35 | %{__make} \ | |
36 | INCLUDES='-I/usr/include/apr-util' \ | |
37 | APXS2=apxs \ | |
38 | APR_CONFIG=apr-1-config | |
39 | cd .. | |
40 | cd anygetty | |
41 | %{__make} | |
42 | cd .. | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_httpdir}} | |
47 | ||
48 | cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_anyterm.conf <<END | |
49 | LoadModule anyterm modules/%{name}.so | |
50 | Alias /%{name} "%{_httpdir}/%{name}" | |
51 | anyterm_command '/usr/sbin/anygetty --remotehost "Anyterm: %h"' | |
52 | END | |
53 | ||
54 | install apachemod/.libs/%{name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{name}.so | |
55 | cp -a browser $RPM_BUILD_ROOT/%{_httpdir}/%{name} | |
56 | install anygetty/anygetty $RPM_BUILD_ROOT/%{_sbindir} | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
63 | %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/* | |
64 | %doc README | |
65 | %attr(755,root,root) %{_pkglibdir}/%{name}.so | |
66 | %attr(755,root,root) %{_sbindir}/anygetty | |
67 | %{_httpdir}/%{name} | |
68 | ||
69 | %post | |
70 | %banner "for full function, setuid %{_sbindir}/anygetty" |