%{!?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: 16%{?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 Patch1: clearsilver-0.10.5-regression.patch Patch2: clearsilver-0.10.5-CVE-2011-4357.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: httpd-devel BuildRequires: perl(ExtUtils::MM) %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 Provides: %{name}-static = %{version}-%{release} %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}. %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 %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -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 alpha %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 make %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS" cd perl && %{__perl} Makefile.PL INSTALLDIRS=vendor && cd .. %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 alpha %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 * Fri Apr 22 2016 Jon Ciesla - 0.10.5-16 - Fix build order for Perl issue, BZ 1329524. * Mon Dec 12 2011 Jon Ciesla - 0.10.5-15 - Patch for CVE-2011-4357, BZ 757543. * Fri Jun 17 2011 Marcela Mašláňová - 0.10.5-14 - Perl mass rebuild * Fri Jun 10 2011 Marcela Mašláňová - 0.10.5-13 - Perl 5.14 mass rebuild * Tue Feb 08 2011 Fedora Release Engineering - 0.10.5-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Oct 04 2010 Jon Ciesla - 0.10.5-11 - Added virtual provides for -static, BZ 609601. * Wed Jul 21 2010 David Malcolm - 0.10.5-10 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Thu Apr 29 2010 Marcela Maslanova - 0.10.5-9 - Mass rebuild with perl-5.12.0 * Fri Dec 4 2009 Stepan Kasal - 0.10.5-8 - rebuild against perl 5.10.1 * Fri Jul 24 2009 Fedora Release Engineering - 0.10.5-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Feb 24 2009 Fedora Release Engineering - 0.10.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Apr 14 2008 Jeffrey C. Ollie - 0.10.5-4 - Add patch from Kevin Kofler to fix build failures. * 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.