]>
Commit | Line | Data |
---|---|---|
9730ef10 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static libraries | |
4 | # | |
5 | Summary: RabbitMQ C AMQP client library | |
6 | Summary(pl.UTF-8): Biblioteka kliencka C RabbitMQ AMQP | |
7 | Name: rabbitmq-c | |
a0114413 JB |
8 | Version: 0.10.0 |
9 | Release: 1 | |
9730ef10 JB |
10 | License: MIT |
11 | Group: Libraries | |
568f712c | 12 | #Source0Download: https://github.com/alanxz/rabbitmq-c/releases |
a0114413 JB |
13 | Source0: https://github.com/alanxz/rabbitmq-c/archive/v%{version}/%{name}-%{version}.tar.gz |
14 | # Source0-md5: 6f09f0cb07cea221657a768bd9c7dff7 | |
9730ef10 | 15 | URL: https://github.com/alanxz/rabbitmq-c |
a0114413 | 16 | BuildRequires: cmake >= 2.8.12 |
93aca067 JB |
17 | BuildRequires: openssl-devel >= 0.9.8 |
18 | BuildRequires: popt-devel | |
19 | BuildRequires: pkgconfig >= 1:0.17 | |
9730ef10 | 20 | BuildRequires: xmlto |
93aca067 | 21 | Requires: openssl >= 0.9.8 |
9730ef10 JB |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | This is a C-language AMQP client library for use with AMQP servers | |
26 | speaking protocol versions 0-9-1. | |
27 | ||
28 | %description -l pl.UTF-8 | |
29 | Ten pakiet zawiera bibliotekę kliencką AMQP dla języka C, przeznaczoną | |
30 | do użycia z serwerami AMQP obsługującymi protokół w wersjach 0-9-1. | |
31 | ||
32 | %package devel | |
33 | Summary: Header files for rabbitmq-c library | |
34 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki rabbitmq-c | |
35 | Group: Development/Libraries | |
36 | Requires: %{name} = %{version}-%{release} | |
93aca067 | 37 | Requires: openssl-devel >= 0.9.8 |
9730ef10 JB |
38 | |
39 | %description devel | |
40 | Header files for rabbitmq-c library. | |
41 | ||
42 | %description devel -l pl.UTF-8 | |
43 | Pliki nagłówkowe biblioteki rabbitmq-c. | |
44 | ||
45 | %package static | |
46 | Summary: Static rabbitmq-c library | |
47 | Summary(pl.UTF-8): Statyczna biblioteka rabbitmq-c | |
48 | Group: Development/Libraries | |
49 | Requires: %{name}-devel = %{version}-%{release} | |
50 | ||
51 | %description static | |
52 | Static rabbitmq-c library. | |
53 | ||
54 | %description static -l pl.UTF-8 | |
55 | Statyczna biblioteka rabbitmq-c. | |
56 | ||
57 | %package tools | |
58 | Summary: Example tools utilizing the rabbitmq-c library | |
59 | Summary(pl.UTF-8): Przykładowe narzędzia wykorzystujące bibliotekę rabbitmq-c | |
60 | Group: Applications | |
61 | Requires: %{name} = %{version}-%{release} | |
62 | ||
63 | %description tools | |
64 | Example tools utilizing the rabbitmq-c library. | |
65 | ||
66 | %description tools -l pl.UTF-8 | |
67 | Przykładowe narzędzia wykorzystujące bibliotekę rabbitmq-c. | |
68 | ||
69 | %prep | |
93aca067 | 70 | %setup -q |
9730ef10 JB |
71 | |
72 | %build | |
a0114413 JB |
73 | install -d build |
74 | cd build | |
75 | %cmake .. \ | |
76 | %{!?with_static_libs:-DBUILD_STATIC_LIBS=OFF} \ | |
77 | -DBUILD_TOOLS_DOCS=ON | |
78 | ||
9730ef10 JB |
79 | %{__make} |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
a0114413 | 84 | %{__make} -C build install \ |
9730ef10 JB |
85 | DESTDIR=$RPM_BUILD_ROOT |
86 | ||
9730ef10 JB |
87 | %clean |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post -p /sbin/ldconfig | |
91 | %postun -p /sbin/ldconfig | |
92 | ||
93 | %files | |
94 | %defattr(644,root,root,755) | |
95 | %doc AUTHORS CONTRIBUTING.md LICENSE-MIT README.md THANKS TODO | |
96 | %attr(755,root,root) %{_libdir}/librabbitmq.so.*.*.* | |
93aca067 | 97 | %attr(755,root,root) %ghost %{_libdir}/librabbitmq.so.4 |
9730ef10 JB |
98 | |
99 | %files devel | |
100 | %defattr(644,root,root,755) | |
101 | %attr(755,root,root) %{_libdir}/librabbitmq.so | |
102 | %{_includedir}/amqp.h | |
103 | %{_includedir}/amqp_framing.h | |
93aca067 JB |
104 | %{_includedir}/amqp_ssl_socket.h |
105 | %{_includedir}/amqp_tcp_socket.h | |
9730ef10 JB |
106 | %{_pkgconfigdir}/librabbitmq.pc |
107 | ||
108 | %if %{with static_libs} | |
109 | %files static | |
110 | %defattr(644,root,root,755) | |
111 | %{_libdir}/librabbitmq.a | |
112 | %endif | |
113 | ||
114 | %files tools | |
115 | %defattr(644,root,root,755) | |
116 | %attr(755,root,root) %{_bindir}/amqp-consume | |
117 | %attr(755,root,root) %{_bindir}/amqp-declare-queue | |
118 | %attr(755,root,root) %{_bindir}/amqp-delete-queue | |
119 | %attr(755,root,root) %{_bindir}/amqp-get | |
120 | %attr(755,root,root) %{_bindir}/amqp-publish | |
121 | %{_mandir}/man1/amqp-consume.1* | |
122 | %{_mandir}/man1/amqp-declare-queue.1* | |
123 | %{_mandir}/man1/amqp-delete-queue.1* | |
124 | %{_mandir}/man1/amqp-get.1* | |
125 | %{_mandir}/man1/amqp-publish.1* | |
126 | %{_mandir}/man7/librabbitmq-tools.7* |