| 1 |
%define RELEASE 1 |
| 2 |
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} |
| 3 |
%define prefix /usr |
| 4 |
|
| 5 |
Name: %NAME |
| 6 |
Summary: Simple but powerful template language for C++ |
| 7 |
Version: %VERSION |
| 8 |
Release: %rel |
| 9 |
Group: Development/Libraries |
| 10 |
URL: http://code.google.com/p/ctemplate |
| 11 |
License: BSD |
| 12 |
Vendor: Google Inc. and others |
| 13 |
Packager: Google Inc. and others <[email protected]> |
| 14 |
Source: http://%{NAME}.googlecode.com/files/%{NAME}-%{VERSION}.tar.gz |
| 15 |
Distribution: Redhat 7 and above. |
| 16 |
Buildroot: %{_tmppath}/%{name}-root |
| 17 |
Prefix: %prefix |
| 18 |
|
| 19 |
%description |
| 20 |
The %name package contains a library implementing a simple but |
| 21 |
powerful template language for C++. It emphasizes separating logic |
| 22 |
from presentation: it is impossible to embed application logic in this |
| 23 |
template language. This limits the power of the template language |
| 24 |
without limiting the power of the template *system*. Indeed, Google's |
| 25 |
"main" web search uses this system exclusively for formatting output. |
| 26 |
|
| 27 |
%package devel |
| 28 |
Summary: Simple but powerful template language for C++ |
| 29 |
Group: Development/Libraries |
| 30 |
Requires: %{NAME} = %{VERSION} |
| 31 |
|
| 32 |
%description devel |
| 33 |
The %name-devel package contains static and debug libraries and header |
| 34 |
files for developing applications that use the %name package. |
| 35 |
|
| 36 |
%changelog |
| 37 |
* Wed Apr 22 2009 <[email protected]> |
| 38 |
- Change build rule to use %configure instead of ./configure |
| 39 |
- Change install to use DESTDIR instead of prefix for make install |
| 40 |
- Use wildcards for doc/ and lib/ directories |
| 41 |
- Use {_libdir}/{_includedir}/etc instead of {prefix}/lib, etc |
| 42 |
|
| 43 |
* Mon Mar 13 2006 <[email protected]> |
| 44 |
- First draft |
| 45 |
|
| 46 |
%prep |
| 47 |
%setup |
| 48 |
|
| 49 |
%build |
| 50 |
# I can't use '% configure', because it defines -m32 which breaks on |
| 51 |
# my development environment for some reason. But I do take |
| 52 |
# as much from % configure (in /usr/lib/rpm/macros) as I can. |
| 53 |
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} |
| 54 |
make |
| 55 |
|
| 56 |
%install |
| 57 |
rm -rf $RPM_BUILD_ROOT |
| 58 |
make DESTDIR=$RPM_BUILD_ROOT install |
| 59 |
|
| 60 |
%clean |
| 61 |
rm -rf $RPM_BUILD_ROOT |
| 62 |
|
| 63 |
%files |
| 64 |
%defattr(-,root,root) |
| 65 |
|
| 66 |
%docdir %{prefix}/share/doc/%{NAME}-%{VERSION} |
| 67 |
%{prefix}/share/doc/%{NAME}-%{VERSION}/* |
| 68 |
|
| 69 |
%{_libdir}/*.so.* |
| 70 |
|
| 71 |
%files devel |
| 72 |
%defattr(-,root,root) |
| 73 |
|
| 74 |
%{_includedir}/ctemplate |
| 75 |
%{_libdir}/*.a |
| 76 |
%{_libdir}/*.la |
| 77 |
%{_libdir}/*.so |
| 78 |
%{_bindir}/make_tpl_varnames_h |
| 79 |
%{_bindir}/template-converter |
| 80 |
%{_bindir}/diff_tpl_auto_escape |
| 81 |
%{_libdir}/pkgconfig/*.pc |