Blob Blame History Raw
Name:           ctemplate
Version:        0.97
Release:        2%{?dist}
Summary:        A simple but powerful template language for C++

Group:          Development/Tools
License:        BSD
URL:            http://code.google.com/p/google-ctemplate/
Source0:        http://google-ctemplate.googlecode.com/files/%{name}-%{version}.tar.gz
Patch0:         ctemplate-0.93.consts.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  chrpath, python

%description
CTemplate is a simple but powerful template language for C++. It
emphasizes separating logic from presentation: it is impossible to
embed application logic in this template language.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q
%patch0 -p1 -b .const
chmod 644 src/template_string.cc

%build
%configure --disable-static

#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

sed -i 's|^PTHREAD_LIBS = |PTHREAD_LIBS = -lpthread|g' Makefile

# Omit unused direct shared library dependencies.
sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool

make %{?_smp_mflags}

%check
make check

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}
sed -i -e 's|google|ctemplate|g' $RPM_BUILD_ROOT%{_includedir}/%{name}/*.h

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'

# Remove rpaths.
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libctemplate_nothreads.so.0.0.0
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libctemplate.so.0.0.0
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/make_tpl_varnames_h
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/diff_tpl_auto_escape

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING INSTALL README
%doc doc/designstyle.css
%{_bindir}/diff_tpl_auto_escape
%{_bindir}/make_tpl_varnames_h
%{_bindir}/template-converter
%{_libdir}/libctemplate_nothreads.so.*
%{_libdir}/libctemplate.so.*

%files devel
%defattr(-,root,root,-)
%doc doc/*.html
%{_libdir}/libctemplate_nothreads.so
%{_libdir}/libctemplate.so
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h

%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.97-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed May 05 2010 Rakesh Pandit <rakesh@fedoraproject.org> - 0.97-1
- Updated to 0.97

* Fri Dec 04 2009 Rakesh Pandit <rakesh@fedoraproject.org> - 0.96-1
- Updated to 0.96

* Tue Sep 01 2009 Dennis Gilmore <dennis@ausil.us> - 0.95-2
- make sure that the namespace is ctemplate not google

* Wed Aug 05 2009 Rakesh Pandit <rakesh@fedoraproject.org> - 0.95-1
- Updated to ctemplate

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.93-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Apr 12 2009 Rakesh Pandit <rakesh@fedoraproject.org> - 0.93-2
- Added python as BuildRequires, and bswap patch for ppc

* Sun Apr 12 2009 Rakesh Pandit <rakesh@fedoraproject.org> - 0.93-1
- Updated to 0.93, removed patch for consts - fixed upstream

* Tue Mar 03 2009 Caolán McNamara <caolanm@redhat.com> - 0.91-5
- fix up consts to build

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.91-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Sep 23 2008 Dennis Gilmore <dennis@ausil.us> - 0.91-3
- clean up headers so that they include each other as intended

* Wed Sep 03 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.91-2
- Added %%check section to run tests

* Sun Aug 24 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.91-1
- Update to 0.91 & removed missing header files patch

* Fri Aug 22 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.90-2
- fix undefined-non-weak-symbol & rpath issue

* Thu Aug 14 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.90-1
-Initial build