3 %bcond_without tests # build without tests
4 %bcond_without static_libs # don't build static libraries
6 Summary: Simple and powerful template language for C++
12 Source0: https://github.com/OlafvdSpek/ctemplate/archive/%{name}-%{version}.tar.gz
13 # Source0-md5: 3b91f3c1e7aa55cb4c2957acf77d6b9a
14 URL: https://github.com/OlafvdSpek/ctemplate/
15 BuildRequires: autoconf
16 BuildRequires: automake
17 BuildRequires: libstdc++-devel
18 BuildRequires: libtool
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 CTemplate is a simple and powerful template language for C++. It
23 emphasizes separating logic from presentation: it is impossible to
24 embed application logic in this template language.
27 Summary: CTemplate library
28 Summary(pl.UTF-8): Biblioteka CTemplate
32 This package contains CTemplate library.
34 %description libs -l pl.UTF-8
35 Ten pakiet zawiera bibliotekę CTemplate.
38 Summary: CTemplate documentation
39 Summary(pl.UTF-8): Dokumentacja CTemplate
40 Group: Development/Libraries
43 CTemplate documentation.
45 %description doc -l pl.UTF-8
46 Dokumentacja CTemplate.
49 Summary: Header files for CTemplate
50 Summary(pl.UTF-8): Pliki nagłówkowe CTemplate
51 Group: Development/Libraries
52 Requires: %{name}-libs = %{version}-%{release}
55 Header files for CTemplate.
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe CTemplate.
61 Summary: Static CTemplate library
62 Summary(pl.UTF-8): Statyczna biblioteka CTemplate
63 Group: Development/Libraries
64 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
67 Static CTemplate library.
69 %description static -l pl.UTF-8
70 Statyczna biblioteka CTemplate.
73 %setup -q -n %{name}-%{name}-%{version}
80 export PTHREAD_LIBS="-lpthread"
82 %{!?with_static_libs:--disable-static} \
83 --disable-silent-rules
85 %{?with_test:%{__make} check}
88 rm -rf $RPM_BUILD_ROOT
90 DESTDIR=$RPM_BUILD_ROOT
93 rm -rf $RPM_BUILD_ROOT
95 %post libs -p /sbin/ldconfig
96 %postun libs -p /sbin/ldconfig
99 %defattr(644,root,root,755)
100 %attr(755,root,root) %{_bindir}/diff_tpl_auto_escape
101 %attr(755,root,root) %{_bindir}/make_tpl_varnames_h
102 %attr(755,root,root) %{_bindir}/template-converter
105 %defattr(644,root,root,755)
106 %attr(755,root,root) %{_libdir}/libctemplate.so.*.*.*
107 %attr(755,root,root) %ghost %{_libdir}/libctemplate.so.3
108 %attr(755,root,root) %{_libdir}/libctemplate_nothreads.so.*.*.*
109 %attr(755,root,root) %ghost %{_libdir}/libctemplate_nothreads.so.3
112 %defattr(644,root,root,755)
113 %{_libdir}/libctemplate.so
114 %{_libdir}/libctemplate_nothreads.so
115 %{_libdir}/libctemplate.la
116 %{_libdir}/libctemplate_nothreads.la
117 %dir %{_includedir}/%{name}
118 %{_includedir}/%{name}/*.h
119 %{_pkgconfigdir}/libctemplate.pc
120 %{_pkgconfigdir}/libctemplate_nothreads.pc
122 %if %{with static_libs}
124 %defattr(644,root,root,755)
125 %{_libdir}/libctemplate.a
126 %{_libdir}/libctemplate_nothreads.a
130 %defattr(644,root,root,755)