]> git.pld-linux.org Git - packages/anyterm.git/blame - anyterm.spec
- check for mod_auth in apache config
[packages/anyterm.git] / anyterm.spec
CommitLineData
57ac7731 1%define apxs /usr/sbin/apxs
2Summary: Terminal emulator in a web browser
3Name: anyterm
4Version: 1.1.4
770fba2c 5Release: 0.9
e1dd02cd 6Epoch: 0
57ac7731 7License: GPL
8Group: Networking/Daemons
9Source0: http://anyterm.org/download/%{name}-%{version}.tbz2
10# Source0-md5: cf841703b7438866e573f5a33137ff6f
8785aef2 11Patch0: %{name}-makefile.patch
57ac7731 12URL: http://anyterm.org/
13BuildRequires: apache-devel >= 2.0.52-2
14BuildRequires: apr-devel
15BuildRequires: rote-devel >= 0.2.8
ecd95c79 16BuildRequires: rpmbuild(macros) >= 1.228
57ac7731 17BuildRequires: %{apxs}
18Requires: apache >= 2.0.52-2
19BuildRoot: %{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
26An apache module plus scripts to make a terminal within a web browser.
27
28%prep
29%setup -q
30%patch0 -p1
ecd95c79 31mv -f browser/.htaccess htaccess
57ac7731 32
33%build
3f2c16d7 34%{__make} -C apachemod \
8785aef2 35 INCLUDES='-I%{_includedir}/apr-util' \
ecd95c79 36 APXS2=%{apxs} \
57ac7731 37 APR_CONFIG=apr-1-config
3f2c16d7 38%{__make} -C anygetty
57ac7731 39
40%install
41rm -rf $RPM_BUILD_ROOT
ecd95c79 42install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_appdir}}
57ac7731 43
cca3cb31 44cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_anyterm.conf <<'END'
57ac7731 45LoadModule anyterm modules/%{name}.so
ecd95c79
ER
46<IfModule anyterm>
47 Alias /%{name} "%{_appdir}"
cca3cb31
ER
48 # hangs on login:
49# anyterm_command '%{_sbindir}/anygetty --remotehost "Anyterm: %h"'
50 # works for me:
51 anyterm_command "USER=%u; exec /usr/bin/ssh ${USER:+$USER@}localhost"
ecd95c79
ER
52
53 <Files anyterm-module>
54 SetHandler anyterm
55 </Files>
cca3cb31 56
770fba2c
ER
57 <IfModule !mod_auth.c>
58 <Location /%{name}>
59 allow from all
60 </Location>
61 </IfModule>
cca3cb31 62
770fba2c
ER
63 <IfModule mod_auth.c>
64 <Location /%{name}>
65 AuthType Basic
66 AuthUserFile /etc/httpd/user
67 AuthGroupFile /etc/httpd/group
68 AuthName "AnyTerm"
69 require group anyterm
70 satisfy any
71 order allow,deny
72 </Location>
73 </IfModule>
ecd95c79
ER
74</IfModule>
75# vim: filetype=apache ts=4 sw=4 et
57ac7731 76END
77
78install apachemod/.libs/%{name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{name}.so
ecd95c79 79cp -a browser/* $RPM_BUILD_ROOT%{_appdir}
57ac7731 80install anygetty/anygetty $RPM_BUILD_ROOT/%{_sbindir}
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
ecd95c79
ER
85%post
86%service httpd restart
87
db9d5550
ER
88%banner %{name} <<-EOF
89To use anygetty, you need to setuid it:
90chmod 4755 %{_sbindir}/anygetty
91EOF
ecd95c79
ER
92
93%preun
94if [ "$1" = "0" ]; then
95 %service -q httpd restart
96fi
97
57ac7731 98%files
99%defattr(644,root,root,755)
3f2c16d7 100%doc README CHANGELOG htaccess
8785aef2 101%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*
57ac7731 102%attr(755,root,root) %{_pkglibdir}/%{name}.so
103%attr(755,root,root) %{_sbindir}/anygetty
ecd95c79 104%{_appdir}
This page took 0.044798 seconds and 4 git commands to generate.