%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: clearsilver Version: 0.10.3 Release: 6%{?dist} Summary: Fast and powerful HTML templating system Group: Development/Libraries License: Neotonic ClearSilver Software License URL: http://www.clearsilver.net/ Source0: http://www.clearsilver.net/downloads/%{name}-%{version}.tar.gz Patch0: %{name}-0.10.3-fedora.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel Provides: %{name}-devel = %{version}-%{release} %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 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"]') %endif %ifarch %{ix86} ppc %description -n ruby-%{name} %{summary}. %endif %ifarch %{ix86} ppc %package -n java-%{name} Summary: Java interface to the ClearSilver HTML templating system Group: Development/Libraries BuildRequires: java-devel Provides: %{name}-java = %{version}-%{release} %endif %ifarch %{ix86} ppc %description -n java-%{name} %{summary}. %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 \ --with-java=%{_libdir}/jvm/java \ --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 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 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CS_LICENSE INSTALL LICENSE README %{_bindir}/cstest %{_bindir}/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 %endif %ifarch %{ix86} ppc %files -n java-clearsilver %doc CS_LICENSE LICENSE %defattr(-,root,root,-) %{_libdir}/java/*clearsilver* %endif %changelog * 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.