%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: clearsilver Version: 0.10.5 Release: 3%{?dist} Summary: Fast and powerful HTML templating system Group: Development/Libraries # Technically, the license is "Neotonic ClearSilver", but it is a copy of # ASL 1.1 with the trademarks as the only difference. License: ASL 1.1 URL: http://www.clearsilver.net/ Source0: http://www.clearsilver.net/downloads/%{name}-%{version}.tar.gz Patch0: clearsilver-0.10.5-fedora.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: httpd-devel %description ClearSilver is a fast, powerful, and language-neutral HTML template system. In both static content sites and dynamic HTML applications, it provides a separation between presentation code and application logic which makes working with your project easier. The design of ClearSilver began in 1999, and evolved during its use at onelist.com, egroups.com, and Yahoo! Groups. Today many other projects and websites are using it. %package devel Summary: ClearSilver development package Group: Development/Libraries %description devel This package provides needed files to develop extensions to ClearSilver. %package -n python-%{name} Summary: Python interface to the ClearSilver HTML templating system Group: Development/Libraries BuildRequires: python-devel >= 2.1 Provides: %{name}-python = %{version}-%{release} %description -n python-%{name} %{summary}. %package -n perl-%{name} Summary: Perl interface to the ClearSilver HTML templating system Group: Development/Libraries BuildRequires: perl %if 0%{?fedora} > 6 BuildRequires: perl-devel %endif Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Provides: %{name}-perl = %{version}-%{release} %description -n perl-%{name} %{summary}. %ifarch %{ix86} ppc %package -n ruby-%{name} Summary: Ruby interface to the ClearSilver HTML templating system Group: Development/Libraries BuildRequires: ruby BuildRequires: ruby-devel Provides: %{name}-ruby = %{version}-%{release} %define ruby_sitearchdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]') %define ruby_sitelibdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]') %description -n ruby-%{name} %{summary}. %if 0%{?rhel} > 4 %package -n java-%{name} Summary: Java interface to the ClearSilver HTML templating system Group: Development/Libraries BuildRequires: java-devel Provides: %{name}-java = %{version}-%{release} %description -n java-%{name} %{summary}. %endif %endif %prep %setup -q %patch0 -p1 touch configure sed -i 's|/neo/opt/bin/python|%{__python}|' python/examples/*/*.py sed -i 's|PYTHON_SITE = @PYTHON_SITE@|PYTHON_SITE = %{python_sitearch}|' rules.mk.in find python/examples -type f | xargs chmod -x %build # java and ruby does not build on x86_64 %ifarch %{ix86} ppc %configure \ %if 0%{?rhel} > 4 --with-java=%{_libdir}/jvm/java \ %endif --with-python=%{__python} \ --disable-csharp %else %configure \ --with-python=%{__python} \ --disable-java \ --disable-ruby \ --disable-csharp %endif cd perl && %{__perl} Makefile.PL INSTALLDIRS=vendor && cd .. make %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' chmod -R u+w $RPM_BUILD_ROOT/* %ifarch %{ix86} ppc %if 0%{?rhel} > 4 install -dm 755 $RPM_BUILD_ROOT%{_libdir}/java mv $RPM_BUILD_ROOT%{_libdir}{,/java}/libclearsilver-jni.so mv $RPM_BUILD_ROOT%{_libdir}/clearsilver.jar \ $RPM_BUILD_ROOT%{_libdir}/java/clearsilver-%{version}.jar chmod 644 $RPM_BUILD_ROOT%{_libdir}/java/clearsilver-%{version}.jar ln -s clearsilver-%{version}.jar $RPM_BUILD_ROOT%{_libdir}/java/clearsilver.jar %endif %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CS_LICENSE INSTALL LICENSE README %{_bindir}/cs %{_bindir}/cstest %{_bindir}/cs_static.cgi %{_mandir}/man3/* %files devel %defattr(-, root, root, 0755) %doc CS_LICENSE LICENSE %{_includedir}/ClearSilver/ %{_libdir}/libneo_*.a %files -n python-clearsilver %doc CS_LICENSE LICENSE %defattr(-,root,root,-) %doc README.python python/examples/ %{python_sitearch}/neo_cgi.so %files -n perl-clearsilver %doc CS_LICENSE LICENSE %defattr(-,root,root,-) %{perl_vendorarch}/auto/ClearSilver/ %{perl_vendorarch}/ClearSilver.pm %ifarch %{ix86} ppc %files -n ruby-clearsilver %doc CS_LICENSE LICENSE %defattr(-,root,root,-) %{ruby_sitearchdir}/hdf.so %{ruby_sitelibdir}/neo.rb %if 0%{?rhel} > 4 %files -n java-clearsilver %doc CS_LICENSE LICENSE %defattr(-,root,root,-) %{_libdir}/java/*clearsilver* %endif %endif %changelog * Thu Mar 06 2008 Tom "spot" Callaway - 0.10.5-3 Rebuild for new perl * Tue Feb 19 2008 Fedora Release Engineering - 0.10.5-2 - Autorebuild for GCC 4.3 * Mon Jun 4 2007 Jeffrey C. Ollie - 0.10.4-5 - Add BR perl-devel for fedora > 6 * Fri Jun 01 2007 Jeffrey C. Ollie - 0.10.4-4 - Minor cleanups * Fri Jun 01 2007 Jesse Keating - 0.10.4-3.1 - Disable java subpackages on el4 * Thu Apr 12 2007 Jeffrey C. Ollie - 0.10.4-3 - Remove bogus -devel provides. * Wed Mar 28 2007 Jeffrey C. Ollie - 0.10.4-2 - Bump release. * Wed Mar 28 2007 Jeffrey C. Ollie - 0.10.4-1 - Update to 0.10.4 * Sat Dec 9 2006 Joost Soeterbroek - 0.10.3-5 - Rebuild for python 2.5 * Mon Aug 28 2006 Joost Soeterbroek - 0.10.3-4 - Rebuild for Fedora Extras 6 * Thu Jun 1 2006 Paul Howarth - 0.10.3-4 - ruby subpackage fix: use ruby_sitearchdir and ruby_sitelibdir * Fri Mar 17 2006 Joost Soeterbroek - 0.10.3-3 - fix for x86_64 * Mon Mar 13 2006 Joost Soeterbroek - 0.10.3-1 - release 0.10.3 * Mon Feb 13 2006 Joost Soeterbroek - 0.10.2-3 - Rebuild for Fedora Extras 5 * Fri Jan 6 2006 Joost Soeterbroek - 0.10.2-2 - Rebuild with disable-ruby, disable-java for any arch other than i386 - hardcoded version in Patch0 - extra line in prep-section - license files in all subpackages * Thu Dec 15 2005 Joost Soeterbroek - 0.10.2-1 - Rebuild for 0.10.2 * Tue Nov 29 2005 Joost Soeterbroek - 0.10.1-1 - Rebuild for Fedora Extras * Sun Jul 31 2005 Ville Skyttä - 0.10.1-0.1 - 0.10.1, PIC issues fixed upstream. * Sun May 29 2005 Ville Skyttä - 0.9.14-0.3 - Rebuild for FC4. - Rename subpackages to $foo-clearsilver. * Mon Apr 25 2005 Ville Skyttä - 0.9.14-0.2 - Build as PIC, fixes Ruby and Java builds on FC4. - More parallel make fixing. * Fri Apr 8 2005 Ville Skyttä - 0.9.14-0.1 - First build.