cf38130
Name:           ctemplate
6009a1c
Version:        0.97
1db33e2
Release:        2%{?dist}
cf38130
Summary:        A simple but powerful template language for C++
cf38130
cf38130
Group:          Development/Tools
cf38130
License:        BSD
cf38130
URL:            http://code.google.com/p/google-ctemplate/
cf38130
Source0:        http://google-ctemplate.googlecode.com/files/%{name}-%{version}.tar.gz
faf14bf
Patch0:         ctemplate-0.93.consts.patch
cf38130
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0d70cb0
BuildRequires:  chrpath, python
cf38130
cf38130
%description
cf38130
CTemplate is a simple but powerful template language for C++. It
cf38130
emphasizes separating logic from presentation: it is impossible to
cf38130
embed application logic in this template language.
cf38130
cf38130
%package        devel
cf38130
Summary:        Development files for %{name}
cf38130
Group:          Development/Libraries
cf38130
Requires:       %{name} = %{version}-%{release}
cf38130
cf38130
%description    devel
cf38130
The %{name}-devel package contains libraries and header files for
cf38130
developing applications that use %{name}.
cf38130
cf38130
cf38130
%prep
cf38130
%setup -q
faf14bf
%patch0 -p1 -b .const
0d70cb0
chmod 644 src/template_string.cc
cf38130
cf38130
%build
cf38130
%configure --disable-static
cf38130
cf38130
#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
cf38130
#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
cf38130
cf38130
sed -i 's|^PTHREAD_LIBS = |PTHREAD_LIBS = -lpthread|g' Makefile
cf38130
cf38130
# Omit unused direct shared library dependencies.
cf38130
sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool
cf38130
cf38130
make %{?_smp_mflags}
cf38130
cf38130
%check
cf38130
make check
cf38130
cf38130
%install
cf38130
rm -rf $RPM_BUILD_ROOT
cf38130
make install DESTDIR=$RPM_BUILD_ROOT
cf38130
cf38130
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}
d36be65
sed -i -e 's|google|ctemplate|g' $RPM_BUILD_ROOT%{_includedir}/%{name}/*.h
cf38130
cf38130
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
cf38130
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
cf38130
cf38130
# Remove rpaths.
cf38130
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libctemplate_nothreads.so.0.0.0
cf38130
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libctemplate.so.0.0.0
cf38130
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/make_tpl_varnames_h
cf38130
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/diff_tpl_auto_escape
cf38130
cf38130
%clean
cf38130
rm -rf $RPM_BUILD_ROOT
cf38130
cf38130
%post -p /sbin/ldconfig
cf38130
cf38130
%postun -p /sbin/ldconfig
cf38130
cf38130
cf38130
%files
cf38130
%defattr(-,root,root,-)
cf38130
%doc AUTHORS COPYING INSTALL README
cf38130
%doc doc/designstyle.css
cf38130
%{_bindir}/diff_tpl_auto_escape
cf38130
%{_bindir}/make_tpl_varnames_h
cf38130
%{_bindir}/template-converter
cf38130
%{_libdir}/libctemplate_nothreads.so.*
cf38130
%{_libdir}/libctemplate.so.*
cf38130
cf38130
%files devel
cf38130
%defattr(-,root,root,-)
cf38130
%doc doc/*.html
cf38130
%{_libdir}/libctemplate_nothreads.so
cf38130
%{_libdir}/libctemplate.so
cf38130
%dir %{_includedir}/%{name}
cf38130
%{_includedir}/%{name}/*.h
cf38130
cf38130
%changelog
1db33e2
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.97-2
1db33e2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1db33e2
6009a1c
* Wed May 05 2010 Rakesh Pandit <rakesh@fedoraproject.org> - 0.97-1
6009a1c
- Updated to 0.97
6009a1c
10869c3
* Fri Dec 04 2009 Rakesh Pandit <rakesh@fedoraproject.org> - 0.96-1
10869c3
- Updated to 0.96
10869c3
d36be65
* Tue Sep 01 2009 Dennis Gilmore <dennis@ausil.us> - 0.95-2
d36be65
- make sure that the namespace is ctemplate not google
d36be65
20afc56
* Wed Aug 05 2009 Rakesh Pandit <rakesh@fedoraproject.org> - 0.95-1
20afc56
- Updated to ctemplate
20afc56
d711ac9
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.93-3
d711ac9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d711ac9
0d70cb0
* Sun Apr 12 2009 Rakesh Pandit <rakesh@fedoraproject.org> - 0.93-2
0d70cb0
- Added python as BuildRequires, and bswap patch for ppc
0d70cb0
faf14bf
* Sun Apr 12 2009 Rakesh Pandit <rakesh@fedoraproject.org> - 0.93-1
faf14bf
- Updated to 0.93, removed patch for consts - fixed upstream
faf14bf
Caolan McNamara a083009
* Tue Mar 03 2009 Caolán McNamara <caolanm@redhat.com> - 0.91-5
Caolan McNamara a083009
- fix up consts to build
Caolan McNamara a083009
56ee9a4
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.91-4
56ee9a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
56ee9a4
f5e552b
* Tue Sep 23 2008 Dennis Gilmore <dennis@ausil.us> - 0.91-3
f5e552b
- clean up headers so that they include each other as intended
f5e552b
cf38130
* Wed Sep 03 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.91-2
cf38130
- Added %%check section to run tests
cf38130
cf38130
* Sun Aug 24 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.91-1
cf38130
- Update to 0.91 & removed missing header files patch
cf38130
cf38130
* Fri Aug 22 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.90-2
cf38130
- fix undefined-non-weak-symbol & rpath issue
cf38130
cf38130
* Thu Aug 14 2008 Rakesh Pandit <rakesh@fedoraproject.org> 0.90-1
cf38130
-Initial build