SPECS: anyterm.spec - use apxs macro - include .htaccess as sample...
glen
glen at pld-linux.org
Sat Jul 16 13:36:26 CEST 2005
Author: glen Date: Sat Jul 16 11:36:26 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use apxs macro
- include .htaccess as sample in %doc
- more complete apache config
- restart httpd service as it's common in PLD
- fix sections order
---- Files affected:
SPECS:
anyterm.spec (1.3 -> 1.4)
---- Diffs:
================================================================
Index: SPECS/anyterm.spec
diff -u SPECS/anyterm.spec:1.3 SPECS/anyterm.spec:1.4
--- SPECS/anyterm.spec:1.3 Sat Jul 16 12:54:03 2005
+++ SPECS/anyterm.spec Sat Jul 16 13:36:21 2005
@@ -3,7 +3,7 @@
Summary: Terminal emulator in a web browser
Name: anyterm
Version: 1.1.4
-Release: 0.1
+Release: 0.3
Epoch: 0
License: GPL
Group: Networking/Daemons
@@ -14,12 +14,12 @@
BuildRequires: apache-devel >= 2.0.52-2
BuildRequires: apr-devel
BuildRequires: rote-devel >= 0.2.8
-BuildRequires: rpmbuild(macros) >= 1.194
+BuildRequires: rpmbuild(macros) >= 1.228
BuildRequires: %{apxs}
Requires: apache >= 2.0.52-2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _httpdir %{_datadir}/%{name}
+%define _appdir %{_datadir}/%{name}
%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
%define _sysconfdir /etc/httpd
@@ -29,13 +29,14 @@
%prep
%setup -q
%patch0 -p1
+mv -f browser/.htaccess htaccess
%build
rm -rf $RPM_BUILD_ROOT
cd apachemod
%{__make} \
INCLUDES='-I%{_includedir}/apr-util' \
- APXS2=apxs \
+ APXS2=%{apxs} \
APR_CONFIG=apr-1-config
cd ..
cd anygetty
@@ -44,33 +45,47 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_httpdir}}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8,%{_appdir}}
cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_anyterm.conf <<END
LoadModule anyterm modules/%{name}.so
-Alias /%{name} "%{_httpdir}/%{name}"
-anyterm_command '%{_sbindir}/anygetty --remotehost "Anyterm: %h"'
+<IfModule anyterm>
+ Alias /%{name} "%{_appdir}"
+ anyterm_command '%{_sbindir}/anygetty --remotehost "Anyterm: %h"'
+
+ <Files anyterm-module>
+ SetHandler anyterm
+ </Files>
+</IfModule>
+# vim: filetype=apache ts=4 sw=4 et
END
install apachemod/.libs/%{name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{name}.so
-cp -a browser $RPM_BUILD_ROOT/%{_httpdir}/%{name}
+cp -a browser/* $RPM_BUILD_ROOT%{_appdir}
install anygetty/anygetty $RPM_BUILD_ROOT/%{_sbindir}
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+%service httpd restart
+
+%banner %{name} <<EOF
+For full function, setuid %{_sbindir}/anygetty.
+EOF
+
+%preun
+if [ "$1" = "0" ]; then
+ %service -q httpd restart
+fi
+
%files
%defattr(644,root,root,755)
-%doc README
+%doc README htaccess
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*
%attr(755,root,root) %{_pkglibdir}/%{name}.so
%attr(755,root,root) %{_sbindir}/anygetty
-%{_httpdir}/%{name}
-
-%post
-%banner %{name} <<EOF
-For full function, setuid %{_sbindir}/anygetty.
-EOF
+%{_appdir}
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -78,6 +93,13 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.4 2005/07/16 11:36:21 glen
+- use apxs macro
+- include .htaccess as sample in %doc
+- more complete apache config
+- restart httpd service as it's common in PLD
+- fix sections order
+
Revision 1.3 2005/07/16 10:54:03 glen
- Epoch: 0, rel 0.1 if it doesn't work
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/anyterm.spec?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list