3 %bcond_without static_libs # static libraries
4 %bcond_without tests # tests
6 %if %{without static_libs}
7 # tests require static libs
10 Summary: RabbitMQ C AMQP client library
11 Summary(pl.UTF-8): Biblioteka kliencka C RabbitMQ AMQP
17 #Source0Download: https://github.com/alanxz/rabbitmq-c/releases
18 Source0: https://github.com/alanxz/rabbitmq-c/archive/v%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: 2de19cdd2b4f7c76f624f031e161f925
20 URL: https://github.com/alanxz/rabbitmq-c
21 BuildRequires: cmake >= 3.12
22 BuildRequires: openssl-devel >= 1.1.1
23 BuildRequires: popt-devel
24 BuildRequires: pkgconfig >= 1:0.17
26 Requires: openssl >= 1.1.1
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This is a C-language AMQP client library for use with AMQP servers
31 speaking protocol versions 0-9-1.
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.
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}
42 Requires: openssl-devel >= 1.1.1
45 Header files for rabbitmq-c library.
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki rabbitmq-c.
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}
57 Static rabbitmq-c library.
59 %description static -l pl.UTF-8
60 Statyczna biblioteka rabbitmq-c.
63 Summary: Example tools utilizing the rabbitmq-c library
64 Summary(pl.UTF-8): Przykładowe narzędzia wykorzystujące bibliotekę rabbitmq-c
66 Requires: %{name} = %{version}-%{release}
69 Example tools utilizing the rabbitmq-c library.
71 %description tools -l pl.UTF-8
72 Przykładowe narzędzia wykorzystujące bibliotekę rabbitmq-c.
81 %{!?with_static_libs:-DBUILD_STATIC_LIBS=OFF} \
82 %{!?with_tests:-DBUILD_TESTING=OFF} \
84 -DBUILD_TOOLS_DOCS=ON \
85 -DCMAKE_INSTALL_INCLUDEDIR:PATH=include \
86 -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}
91 rm -rf $RPM_BUILD_ROOT
93 %{__make} -C build install \
94 DESTDIR=$RPM_BUILD_ROOT
97 rm -rf $RPM_BUILD_ROOT
99 %post -p /sbin/ldconfig
100 %postun -p /sbin/ldconfig
103 %defattr(644,root,root,755)
104 %doc AUTHORS CONTRIBUTING.md LICENSE README.md THANKS
105 %attr(755,root,root) %{_libdir}/librabbitmq.so.*.*.*
106 %attr(755,root,root) %ghost %{_libdir}/librabbitmq.so.4
109 %defattr(644,root,root,755)
110 %attr(755,root,root) %{_libdir}/librabbitmq.so
111 %{_includedir}/amqp.h
112 %{_includedir}/amqp_framing.h
113 %{_includedir}/amqp_ssl_socket.h
114 %{_includedir}/amqp_tcp_socket.h
115 %{_includedir}/rabbitmq-c
116 %{_pkgconfigdir}/librabbitmq.pc
117 %{_libdir}/cmake/rabbitmq-c
119 %if %{with static_libs}
121 %defattr(644,root,root,755)
122 %{_libdir}/librabbitmq.a
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*