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