blob: b32a535f41bd270d43372b3ecbe16eb73ae45512 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
%define name spyce
%define version __VERSION__
%define release __RELEASE__
%define httpd_conf /etc/httpd/conf/httpd.conf
%define httpd_conf_beginline ### BEGIN SPYCE CONFIG MARKER
%define httpd_conf_endline ### END SPYCE CONFIG MARKER
%define html_dir /var/www/html
Summary: SPYCE - Python Server Pages, Python-based HTML scripting engine
Name: %{name}
Version: %{version}
Release: %{release}
Group: System/Servers
Packager: Rimon Barr <rimon AT acm DOT org>
URL: http://spyce.sourceforge.net
License: Refer to LICENCE.TXT
BuildArchitectures: noarch
BuildRoot: %{_builddir}/%{name}-root
#BuildRequires: python >= 2.2
Requires: python >= 2.2
Requires: httpd >= 2.0
Source0: %{name}-%{version}-%{release}.tgz
%description
SPYCE is a server-side engine that supports simple and efficient Python-based
dynamic HTML generation. Those who like Python and are familiar with JSP, or
PHP, or ASP, should have a look at this engine. It allows one to generate
dynamic HTML content just as easily, using Python for the dynamic parts. Its
modular design makes it very flexible and extensible. It can also be used as a
command-line utility for HTML pre-processing.
%prep
%setup -q
%build
make all
%install
rm -rf ${RPM_BUILD_ROOT}
make DESTDIR=${RPM_BUILD_ROOT} install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/usr/share/spyce
%post
ln -sf /usr/share/spyce/run_spyceCmd.py /usr/bin/spyce
ln -sf /usr/share/spyce/docs /usr/share/doc/spyce
echo -n "Adding Spyce config to httpd.conf..."
cp %httpd_conf %httpd_conf.spyce-install.bak
sed -e "/%httpd_conf_beginline/,/%httpd_conf_endline/d" \
< %httpd_conf.spyce-install.bak > %httpd_conf
echo "%httpd_conf_beginline" >> %httpd_conf
cat /usr/share/spyce/spyceApache.conf | sed -e "s+XXX+/usr/share/spyce+g" >> %httpd_conf
echo "%httpd_conf_endline" >> %httpd_conf
echo " done."
/usr/sbin/apachectl graceful
%postun
if [ $1 == 0 ]; then
rm -f /usr/bin/spyce
rm -f /usr/share/doc/spyce
rm -f %html_dir/spyce
echo -n "Removing Spyce config from httpd.conf..."
cp %httpd_conf %httpd_conf.spyce-uninstall.bak
sed -e "/%httpd_conf_beginline/,/%httpd_conf_endline/d" \
< %httpd_conf.spyce-uninstall.bak > %httpd_conf
echo " done."
/usr/sbin/apachectl graceful
fi
|