]> git.pld-linux.org Git - packages/thrift.git/blob - thrift.spec
e68c4cc873cee542f340d954092d675347b7845d
[packages/thrift.git] / thrift.spec
1 # TODO
2 # - rename -libs to -cpp, -devel to -cpp-devel, -static to -cpp-static?
3 # - no SONAME ext in -libs, enforce some?
4 # - BR for java, ruby, perl, more general BR
5 # - Separate packages per each language
6 # - fix perl: missing vendordir on install
7 # - fix java: not installing to %{_javadir}
8 # - avoid downloading from net when build building java
9 # - Fix ruby install
10 # - Add Mono
11 # - Fix parallel build make.
12 #
13 # Conditional build:
14 #
15 # generic options
16 %bcond_with     tests           # build with tests
17 #
18 # language options
19 %bcond_without  cpp             # build the C++ library
20 %bcond_with     qt4             # build the Qt library
21 %bcond_with     c_glib          # build the C (GLib) library
22 %bcond_with     csharp          # build the C# library
23 %bcond_with     java            # build the Java library
24 %bcond_with     erlang          # build the Erlang library
25 %bcond_without  python          # build the Python library
26 %bcond_with     perl            # build the Perl library
27 %bcond_without  php             # build the PHP library
28 %bcond_with     php_extension   # build the PHP_EXTENSION library
29 %bcond_with     ruby            # build the Ruby library
30 %bcond_with     haskell         # build the Haskell library
31 %bcond_with     go              # build the Go library
32 %bcond_with     d               # build the D library
33
34 %define         php_min_version 5.3.0
35 Summary:        Framework for scalable cross-language services development
36 Summary(pl.UTF-8):      Szkielet budowania skalowalnych usług dla różnych języków programowania
37 Name:           thrift
38 Version:        0.9.1
39 Release:        0.1
40 License:        Apache v2.0
41 Group:          Development/Libraries
42 Source0:        http://www.apache.org/dist/thrift/%{version}/%{name}-%{version}.tar.gz
43 # Source0-md5:  d2e46148f6e800a9492dbd848c66ab6e
44 Patch0:         %{name}-Werror_strlcpy_fix.patch
45 Patch1:         %{name}-cpp_link_fix.patch
46 URL:            http://thrift.apache.org/
47 BuildRequires:  autoconf
48 BuildRequires:  automake
49 BuildRequires:  bison
50 BuildRequires:  boost-devel >= 1.33.1
51 BuildRequires:  flex
52 BuildRequires:  libevent-devel
53 BuildRequires:  pkgconfig
54 BuildRequires:  python-devel >= 1:2.4
55 BuildRequires:  rpm-pythonprov
56 BuildRequires:  rpmbuild(macros) >= 1.219
57 BuildRequires:  zlib-devel >= 1.2.3
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
61 The Apache Thrift software framework, for scalable cross-language
62 services development, combines a software stack with a code generation
63 engine to build services that work efficiently and seamlessly between
64 C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa,
65 JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
66
67 %description -l pl.UTF-8
68 Programowy szkielet dla rozwoju skalowanych usług dla różnych języków
69 programowania. Zawiera oprogramowanie wraz silnikiem generowania kodu
70 do tworzenie usług które spawnie działają pomiędzy C++, Javą,
71 Pythonem, PHP, Rybym, Erlangiem, Perlem, Haskellem, C#, Cocoa,
72 Smalltalikiem i Ocamlem.
73
74 %package devel
75 Summary:        C++ header files
76 Summary(pl.UTF-8):      Pliki nagłówkowe i bibliotek iterfejsu C++ thrift
77 Group:          Development/Libraries
78 Requires:       %{name}-libs = %{version}-%{release}
79
80 %description devel
81 Header and libarary files for C++ thrift inteface.
82
83 %description devel -l pl.UTF-8
84 Pliki nagłówkowe i bibliotek iterfejsu C++ thrift.
85
86 %package static
87 Summary:        Thrift C++ static libraries
88 Summary(pl.UTF-8):      Biblioteki statyczne iterfejsu C++ thrift
89 Group:          Development/Libraries
90 Requires:       %{name}-devel = %{version}-%{release}
91
92 %description static
93 Static libarary files for C++ thrift inteface.
94
95 %description static -l pl.UTF-8
96 Statyczne biblioteki iterfejsu C++ thrift.
97
98 %package libs
99 Summary:        C++ thrift interface libraries
100 Summary(pl.UTF-8):      Interfejs thrift dla C++
101 Group:          Development/Libraries
102 Requires:       %{name} = %{version}-%{release}
103
104 %description libs
105 C++ thrift interface libraries
106
107 %description libs -l pl.UTF-8
108 Biblioteki interfejsu thrift dla C++.
109
110 %package -n php-%{name}
111 Summary:        PHP Thrift interface
112 Summary(pl.UTF-8):      Interfejs Thrift dla PHP
113 Group:          Development/Languages/PHP
114 Requires:       %{name} = %{version}-%{release}
115 Requires:       php(core) >= %{php_min_version}
116
117 %description -n php-%{name}
118 PHP Thrift interface.
119
120 %package -n python-%{name}
121 Summary:        Python thrift interface
122 Summary(pl.UTF-8):      Interfejs thrift dla Pythona
123 Group:          Development/Languages/Python
124 Requires:       %{name} = %{version}-%{release}
125
126 %description -n python-%{name}
127 Python thrift interface.
128
129 %description -n python-%{name} -l pl.UTF-8
130 Interfejs thrift dla Pythona.
131
132 %prep
133 %setup -q
134 #%patch0 -p1
135 #%patch1 -p1
136
137 %build
138 %{__aclocal} -I aclocal
139 %{__autoconf}
140 %{__autoheader}
141 %{__automake}
142 %configure \
143         PHP_PREFIX=%{php_data_dir} \
144         %{__with_without cpp} \
145         %{__with_without qt4} \
146         %{__with_without c_glib} \
147         %{__with_without csharp} \
148         %{__with_without java} \
149         %{__with_without erlang} \
150         %{__with_without python} \
151         %{__with_without bcond_without} \
152         %{__with_without perl} \
153         %{__with_without php} \
154         %{__with_without php_extension} \
155         %{__with_without ruby} \
156         %{__with_without haskell} \
157         %{__with_without go} \
158         %{__with_without d} \
159         --with-boost \
160         --with-libevent \
161         --with-zlib \
162         %{__with_without tests}
163
164 %{__make} -j1
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168
169 %{__make} install \
170         DESTDIR=$RPM_BUILD_ROOT
171
172 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
173 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
174 %py_postclean
175
176 %clean
177 rm -rf $RPM_BUILD_ROOT
178
179 %post   libs -p /sbin/ldconfig
180 %postun libs -p /sbin/ldconfig
181
182 %files
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_bindir}/thrift
185 %if %{with cpp}
186 %files libs
187 %defattr(644,root,root,755)
188 %{_libdir}/libthrift-%{version}.so
189 %{_libdir}/libthriftnb-%{version}.so
190 %{_libdir}/libthriftz-%{version}.so
191
192 %files devel
193 %defattr(644,root,root,755)
194 %{_libdir}/libthrift.la
195 %{_libdir}/libthriftnb.la
196 %{_libdir}/libthriftz.la
197 %{_libdir}/libthrift.so
198 %{_libdir}/libthriftnb.so
199 %{_libdir}/libthriftz.so
200 %{_includedir}/thrift
201 %{_pkgconfigdir}/thrift-nb.pc
202 %{_pkgconfigdir}/thrift-z.pc
203 %{_pkgconfigdir}/thrift.pc
204
205 %files static
206 %defattr(644,root,root,755)
207 %{_libdir}/libthrift.a
208 %{_libdir}/libthriftnb.a
209 %{_libdir}/libthriftz.a
210 %endif
211
212 %if %{with php}
213 %files -n php-%{name}
214 %defattr(644,root,root,755)
215 %{php_data_dir}/Thrift
216 %endif
217
218 %if %{with python}
219 %files -n python-%{name}
220 %defattr(644,root,root,755)
221 %dir %{py_sitedir}/%{name}
222 %dir %{py_sitedir}/%{name}/protocol
223 %{py_sitedir}/%{name}/protocol/*.py[co]
224 %attr(755,root,root) %{py_sitedir}/%{name}/protocol/fastbinary.so
225 %dir %{py_sitedir}/%{name}/server
226 %{py_sitedir}/%{name}/server/*.py[co]
227 %dir %{py_sitedir}/%{name}/transport
228 %{py_sitedir}/%{name}/transport/*.py[co]
229 %{py_sitedir}/%{name}/*.py[co]
230 %if "%{py_ver}" > "2.4"
231 %{py_sitedir}/thrift-%{version}-py*.egg-info
232 %endif
233 %endif
This page took 0.071248 seconds and 2 git commands to generate.