• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# spec file for ClearSilver Linux RPM (based on RedHat installs)
3#
4# Caveats: There is some difficulty getting this file to sync with the
5# actual information discovered by configure.  In theory, some of this
6# stuff in here could be driven off of configure.. except that configure
7# is supposed to be driven off this file...
8#
9# * PREFIX vs perl/python PREFIX: where the perl/python modules get
10# installed is actually defined by the installation of perl/python you
11# are using to build the module.  For that reason, we need to use a
12# different PREFIX for the python/perl modules.  For python, we just
13# override PYTHON_SITE during install, for perl we have to run make
14# install again with a new PREFIX.  This means the perl module might be
15# installed in two different locations, but we just package the second
16# one.
17#
18# * The perl suggestions for rpms:
19# http://archive.develooper.com/perl-dist@perl.org/msg00055.html
20# suggest using find to get all of the files for the perl module.  I'm
21# currently hard coding them since we're not just building the perl
22# module.  In particular, the file path of the ClearSilver.3pm.gz
23# manpage is probably wrong on some platforms.
24#
25# * The apache/java/ruby/csharp packages are not yet finished.  For one,
26# all of my machines are redhat 7.3 or earlier, and don't have rpms
27# installed for java/ruby/csharp, and my apache installation is Neotonic
28# specific and therefore not much help to the rest of you.
29
30##########################################################################
31## Edit these settings
32%define __prefix        /usr/local
33%define __python        /usr/bin/python
34%define	with_python_subpackage	1 %{nil}
35%define with_perl_subpackage	1 %{nil}
36
37# These packages aren't tested at all and probably won't build
38%define with_apache_subpackage	0
39%define with_java_subpackage	0
40%define with_ruby_subpackage	0
41%define with_csharp_subpackage	0
42
43##########################################################################
44## All of the rest of this should work correctly based on the top...
45## maybe
46%define python_sitepath %(%{__python} -c "import site; print site.sitedirs[0]")
47%define perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
48%define perl_prefix %(eval "`perl -V:prefix`"; echo $prefix)
49%define ruby_sitepath %(echo "i dunno")
50%define ruby_version %(echo "i dunno")
51%define ruby_arch %(echo "i dunno")
52%define apache_libexec %(eval `/httpd/bin/apxs -q LIBEXECDIR`)
53
54Summary: Neotonic ClearSilver
55Name: clearsilver
56Version: 0.10.5
57Release: 1
58Copyright: Open Source - Neotonic ClearSilver License (Apache 1.1 based)
59Group: Development/Libraries
60Source: http://www.clearsilver.net/downloads/clearsilver-0.10.5.tar.gz
61URL: http://www.clearsilver.net/
62Vendor: Neotonic Software Corporation, Inc.
63Packager: Brandon Long <blong@neotonic.com>
64BuildRequires: zlib-devel
65%if %{with_python_subpackage}
66BuildRequires: python-devel >= 1.5.2
67%endif
68%if %{with_perl_subpackage}
69BuildRequires: perl >= 0:5.006
70%endif
71%if %{with_ruby_subpackage}
72BuildRequires: ruby >= 1.4.5
73%endif
74
75BuildRoot: %{_tmppath}/%{name}-root
76
77%description
78ClearSilver is a fast, powerful, and language-neutral HTML template system.
79In both static content sites and dynamic HTML applications, it provides a
80separation between presentation code and application logic which makes
81working with your project easier.
82
83Because it's written as a C-library, and exported to scripting languages
84like Python and Perl via modules, it is extremely fast compared to template
85systems written in a script language.
86
87%if %{with_python_subpackage}
88%package python
89Summary: Neotonic ClearSilver Python Module
90Group: Development/Libraries
91Requires: clearsilver = %PACKAGE_VERSION
92%requires_eq python
93
94%description python
95The clearsilver-python package provides a python interface to the
96clearsilver CGI kit and templating system.
97%endif
98
99%if %{with_perl_subpackage}
100%package perl
101Summary: Neotonic ClearSilver Perl Module
102Group: Development/Libraries
103Requires: clearsilver = %PACKAGE_VERSION
104Requires: perl >= 0:5.006
105%requires_eq perl
106
107%description perl
108The clearsilver-perl package provides a perl interface to the
109clearsilver templating system.
110%endif
111
112%if %{with_ruby_subpackage}
113%package ruby
114Summary: Neotonic ClearSilver Ruby Module
115Group: Development/Libraries
116Requires: clearsilver = %PACKAGE_VERSION
117Requires: ruby >= 1.4.5
118
119%description ruby
120The clearsilver-ruby package provides a ruby interface to the
121clearsilver templating system.
122%endif
123
124%if %{with_apache_subpackage}
125%package apache
126Summary: Neotonic ClearSilver Apache Module
127Group: Development/Libraries
128Requires: clearsilver = %PACKAGE_VERSION
129Requires: apache >= 1.3.0
130Requires: apache < 1.4
131
132%description apache
133The clearsilver-apache package provides an Apache 1.3.x module for
134loading ClearSilver CGI's as shared libraries.
135%endif
136
137%if %{with_java_subpackage}
138%package java
139Group: Development/Libraries
140Requires: clearsilver = %PACKAGE_VERSION
141
142%description java
143The clearsilver-java package provides a java jni interface to the
144clearsilver templating system.
145%endif
146
147%prep
148%setup
149
150%build
151./configure --prefix=%{__prefix} --with-python=%{__python}
152make
153
154%install
155make PREFIX="$RPM_BUILD_ROOT%{__prefix}" prefix="$RPM_BUILD_ROOT%{__prefix}" PYTHON_SITE="$RPM_BUILD_ROOT%{python_sitepath}" install
156cd perl
157make PREFIX="$RPM_BUILD_ROOT%{perl_prefix}" install
158cd ..
159
160%files
161%{__prefix}/include/ClearSilver/ClearSilver.h
162%{__prefix}/include/ClearSilver/cs_config.h
163%{__prefix}/include/ClearSilver/cgi/cgi.h
164%{__prefix}/include/ClearSilver/cgi/cgiwrap.h
165%{__prefix}/include/ClearSilver/cgi/date.h
166%{__prefix}/include/ClearSilver/cgi/html.h
167%{__prefix}/include/ClearSilver/cs/cs.h
168%{__prefix}/include/ClearSilver/util/dict.h
169%{__prefix}/include/ClearSilver/util/filter.h
170%{__prefix}/include/ClearSilver/util/neo_date.h
171%{__prefix}/include/ClearSilver/util/neo_err.h
172%{__prefix}/include/ClearSilver/util/neo_files.h
173%{__prefix}/include/ClearSilver/util/neo_hash.h
174%{__prefix}/include/ClearSilver/util/neo_hdf.h
175%{__prefix}/include/ClearSilver/util/neo_misc.h
176%{__prefix}/include/ClearSilver/util/neo_net.h
177%{__prefix}/include/ClearSilver/util/neo_rand.h
178%{__prefix}/include/ClearSilver/util/neo_server.h
179%{__prefix}/include/ClearSilver/util/neo_str.h
180%{__prefix}/include/ClearSilver/util/rcfs.h
181%{__prefix}/include/ClearSilver/util/skiplist.h
182%{__prefix}/include/ClearSilver/util/ulist.h
183%{__prefix}/include/ClearSilver/util/ulocks.h
184%{__prefix}/include/ClearSilver/util/wdb.h
185%{__prefix}/include/ClearSilver/util/wildmat.h
186%{__prefix}/lib/libneo_cgi.a
187%{__prefix}/lib/libneo_cs.a
188%{__prefix}/lib/libneo_utl.a
189%{__prefix}/bin/static.cgi
190%{__prefix}/bin/cstest
191%{__prefix}/man/man3
192
193%if %{with_python_subpackage}
194%files python
195%{python_sitepath}/neo_cgi.so
196%endif
197
198%if %{with_perl_subpackage}
199%files perl
200%{perl_sitearch}/ClearSilver.pm
201%{perl_sitearch}/auto/ClearSilver/ClearSilver.so
202%{perl_sitearch}/auto/ClearSilver/ClearSilver.bs
203%{perl_prefix}/share/man/man3/ClearSilver.3pm.gz
204%endif
205
206%if %{with_ruby_subpackage}
207%files ruby
208%{ruby_sitepath}/%(ruby_version}/neo.rb
209%{ruby_sitepath}/%(ruby_version}/$(ruby_arch}/hdf.so
210%endif
211
212%if %{with_apache_subpackage}
213%files apache
214%{apache_libexec}/mod_ecs.so
215%endif
216
217%if %{with_java_subpackage}
218%files java
219%{__prefix}/lib/clearsilver.jar
220%{__prefix}/lib/libclearsilver-jni.so
221%endif
222