]>
Commit | Line | Data |
---|---|---|
57ac7731 | 1 | %define apxs /usr/sbin/apxs |
2 | Summary: Terminal emulator in a web browser | |
3 | Name: anyterm | |
4 | Version: 1.1.4 | |
ecd95c79 | 5 | Release: 0.3 |
e1dd02cd | 6 | Epoch: 0 |
57ac7731 | 7 | License: GPL |
8 | Group: Networking/Daemons | |
9 | Source0: http://anyterm.org/download/%{name}-%{version}.tbz2 | |
10 | # Source0-md5: cf841703b7438866e573f5a33137ff6f | |
8785aef2 | 11 | Patch0: %{name}-makefile.patch |
57ac7731 | 12 | URL: http://anyterm.org/ |
13 | BuildRequires: apache-devel >= 2.0.52-2 | |
14 | BuildRequires: apr-devel | |
15 | BuildRequires: rote-devel >= 0.2.8 | |
ecd95c79 | 16 | BuildRequires: rpmbuild(macros) >= 1.228 |
57ac7731 | 17 | BuildRequires: %{apxs} |
18 | Requires: apache >= 2.0.52-2 | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
ecd95c79 | 21 | %define _appdir %{_datadir}/%{name} |
8785aef2 ER |
22 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
23 | %define _sysconfdir /etc/httpd | |
57ac7731 | 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 | |
ecd95c79 | 31 | mv -f browser/.htaccess htaccess |
57ac7731 | 32 | |
33 | %build | |
34 | rm -rf $RPM_BUILD_ROOT | |
35 | cd apachemod | |
36 | %{__make} \ | |
8785aef2 | 37 | INCLUDES='-I%{_includedir}/apr-util' \ |
ecd95c79 | 38 | APXS2=%{apxs} \ |
57ac7731 | 39 | APR_CONFIG=apr-1-config |
40 | cd .. | |
41 | cd anygetty | |
42 | %{__make} | |
43 | cd .. | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
ecd95c79 | 47 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_appdir}} |
57ac7731 | 48 | |
49 | cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_anyterm.conf <<END | |
50 | LoadModule anyterm modules/%{name}.so | |
ecd95c79 ER |
51 | <IfModule anyterm> |
52 | Alias /%{name} "%{_appdir}" | |
53 | anyterm_command '%{_sbindir}/anygetty --remotehost "Anyterm: %h"' | |
54 | ||
55 | <Files anyterm-module> | |
56 | SetHandler anyterm | |
57 | </Files> | |
58 | </IfModule> | |
59 | # vim: filetype=apache ts=4 sw=4 et | |
57ac7731 | 60 | END |
61 | ||
62 | install apachemod/.libs/%{name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{name}.so | |
ecd95c79 | 63 | cp -a browser/* $RPM_BUILD_ROOT%{_appdir} |
57ac7731 | 64 | install anygetty/anygetty $RPM_BUILD_ROOT/%{_sbindir} |
65 | ||
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
ecd95c79 ER |
69 | %post |
70 | %service httpd restart | |
71 | ||
72 | %banner %{name} <<EOF | |
73 | For full function, setuid %{_sbindir}/anygetty. | |
74 | EOF | |
75 | ||
76 | %preun | |
77 | if [ "$1" = "0" ]; then | |
78 | %service -q httpd restart | |
79 | fi | |
80 | ||
57ac7731 | 81 | %files |
82 | %defattr(644,root,root,755) | |
ecd95c79 | 83 | %doc README htaccess |
8785aef2 | 84 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/* |
57ac7731 | 85 | %attr(755,root,root) %{_pkglibdir}/%{name}.so |
86 | %attr(755,root,root) %{_sbindir}/anygetty | |
ecd95c79 | 87 | %{_appdir} |