Accepting request 913862 from home:fusionfuture:branches:network:messaging:amqp
- Separate autocomplete files into individual packages. OBS-URL: https://build.opensuse.org/request/show/913862 OBS-URL: https://build.opensuse.org/package/show/network:messaging:amqp/rabbitmq-server?expand=0&rev=167
This commit is contained in:
parent
9718db1b4a
commit
9b4e48e9d8
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 23 14:20:39 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>
|
||||||
|
|
||||||
|
- Separate autocomplete files into individual packages.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 22 01:05:26 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>
|
Sun Aug 22 01:05:26 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
%define _rabbit_server_ocf scripts/rabbitmq-server.ocf
|
%define _rabbit_server_ocf scripts/rabbitmq-server.ocf
|
||||||
%define _plugins_state_dir %{_localstatedir}/lib/rabbitmq/plugins
|
%define _plugins_state_dir %{_localstatedir}/lib/rabbitmq/plugins
|
||||||
%define _rabbit_server_ha_ocf scripts/rabbitmq-server-ha.ocf
|
%define _rabbit_server_ha_ocf scripts/rabbitmq-server-ha.ocf
|
||||||
%define _rabbitmqctl_autocomplete scripts/rabbitmqctl-autocomplete.sh
|
%define _rabbitmqctl_autocomplete scripts/bash_autocomplete.sh
|
||||||
%define _rabbitmq_user rabbitmq
|
%define _rabbitmq_user rabbitmq
|
||||||
%define _rabbitmq_group rabbitmq
|
%define _rabbitmq_group rabbitmq
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ Name: rabbitmq-server
|
|||||||
Version: 3.9.4
|
Version: 3.9.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A message broker supporting AMQP, STOMP and MQTT
|
Summary: A message broker supporting AMQP, STOMP and MQTT
|
||||||
License: MPLv2.0
|
License: MPL-2.0
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
URL: http://www.rabbitmq.com/
|
URL: http://www.rabbitmq.com/
|
||||||
Source: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/rabbitmq-server-%{version}.tar.xz
|
Source: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/rabbitmq-server-%{version}.tar.xz
|
||||||
@ -105,6 +105,28 @@ standard for messaging.
|
|||||||
|
|
||||||
This package includes the RabbitMQ AMQP language bindings for Erlang.
|
This package includes the RabbitMQ AMQP language bindings for Erlang.
|
||||||
|
|
||||||
|
%package bash-completion
|
||||||
|
Summary: Bash completion for %{name}
|
||||||
|
Group: System/Shells
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
Requires: bash-completion
|
||||||
|
Supplements: (%{name} and bash-completion)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description bash-completion
|
||||||
|
Optional dependency offering bash completion for %{name}.
|
||||||
|
|
||||||
|
%package zsh-completion
|
||||||
|
Summary: Zsh completion for %{name}
|
||||||
|
Group: System/Shells
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
Requires: zsh
|
||||||
|
Supplements: (%{name} and zsh)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description zsh-completion
|
||||||
|
Optional dependency offering zsh completion for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
cp %{SOURCE8} .
|
cp %{SOURCE8} .
|
||||||
@ -135,8 +157,7 @@ sed \
|
|||||||
> %{buildroot}%{_sbindir}/rabbitmqctl
|
> %{buildroot}%{_sbindir}/rabbitmqctl
|
||||||
chmod 0755 %{buildroot}%{_sbindir}/rabbitmqctl
|
chmod 0755 %{buildroot}%{_sbindir}/rabbitmqctl
|
||||||
for script in rabbitmq-server rabbitmq-plugins rabbitmq-diagnostics rabbitmq-queues rabbitmq-upgrade rabbitmq-streams; do \
|
for script in rabbitmq-server rabbitmq-plugins rabbitmq-diagnostics rabbitmq-queues rabbitmq-upgrade rabbitmq-streams; do \
|
||||||
cp -a %{buildroot}%{_sbindir}/rabbitmqctl \
|
cp -a %{buildroot}%{_sbindir}/rabbitmqctl %{buildroot}%{_sbindir}/$script
|
||||||
%{buildroot}%{_sbindir}/$script; \
|
|
||||||
done
|
done
|
||||||
|
|
||||||
install -p -D -m 0755 %{_rabbit_server_ocf} %{buildroot}%{_exec_prefix}/lib/ocf/resource.d/rabbitmq/rabbitmq-server
|
install -p -D -m 0755 %{_rabbit_server_ocf} %{buildroot}%{_exec_prefix}/lib/ocf/resource.d/rabbitmq/rabbitmq-server
|
||||||
@ -152,8 +173,10 @@ install -p -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/rabbitmq/rabbitmq-e
|
|||||||
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server
|
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server
|
||||||
|
|
||||||
# Install autocomplete scripts
|
# Install autocomplete scripts
|
||||||
install -p -D -m 0644 %{_rabbitmqctl_autocomplete} %{buildroot}%{_sysconfdir}/profile.d/rabbitmqctl-autocomplete.sh
|
for script in rabbitmqctl rabbitmq-plugins rabbitmq-diagnostics; do
|
||||||
install -p -D -m 0644 scripts/zsh_autocomplete.sh %{buildroot}%{_datarootdir}/zsh/site-functions/_enable_rabbitmqctl_completion
|
install -p -D -m 0644 %{_rabbitmqctl_autocomplete} %{buildroot}%{_datadir}/bash-completion/completions/$script
|
||||||
|
done
|
||||||
|
install -p -D -m 0644 scripts/zsh_autocomplete.sh %{buildroot}%{_datadir}/zsh/site-functions/_enable_rabbitmqctl_completion
|
||||||
|
|
||||||
# Install Erlang client
|
# Install Erlang client
|
||||||
mkdir -p %{buildroot}%{_libdir}/erlang/lib
|
mkdir -p %{buildroot}%{_libdir}/erlang/lib
|
||||||
@ -167,8 +190,9 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia
|
|||||||
mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq
|
mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq
|
||||||
|
|
||||||
# Create hardlinks for duplicate files
|
# Create hardlinks for duplicate files
|
||||||
%fdupes %{buildroot}/%{_datarootdir}
|
%fdupes %{buildroot}/%{_datadir}
|
||||||
%fdupes %{buildroot}/%{_libdir}
|
%fdupes %{buildroot}/%{_libdir}
|
||||||
|
%fdupes %{buildroot}/%{_sbindir}
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
getent group %{_rabbitmq_group} >/dev/null || groupadd -r %{_rabbitmq_group}
|
getent group %{_rabbitmq_group} >/dev/null || groupadd -r %{_rabbitmq_group}
|
||||||
@ -182,12 +206,6 @@ getent passwd %{_rabbitmq_user} >/dev/null || useradd -r -g %{_rabbitmq_group} \
|
|||||||
%service_add_post %{name}.service
|
%service_add_post %{name}.service
|
||||||
systemd-tmpfiles --create --clean /usr/lib/tmpfiles.d/rabbitmq-server.conf
|
systemd-tmpfiles --create --clean /usr/lib/tmpfiles.d/rabbitmq-server.conf
|
||||||
|
|
||||||
if [ -n "$ZSH_VERSION" ]; then
|
|
||||||
echo "Z Shell detected.
|
|
||||||
to enable rabbitmqctl autocompletion add the following to your .zshrc file:
|
|
||||||
autoload _enable_rabbitmqctl_completion; _enable_rabbitmqctl_completion"
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
# Clean out plugin activation state, both on uninstall and upgrade
|
# Clean out plugin activation state, both on uninstall and upgrade
|
||||||
rm -rf %{_plugins_state_dir}
|
rm -rf %{_plugins_state_dir}
|
||||||
@ -224,9 +242,6 @@ done
|
|||||||
%{_sbindir}/rabbitmq-diagnostics
|
%{_sbindir}/rabbitmq-diagnostics
|
||||||
%{_sbindir}/rabbitmq-streams
|
%{_sbindir}/rabbitmq-streams
|
||||||
|
|
||||||
%{_sysconfdir}/profile.d/rabbitmqctl-autocomplete.sh
|
|
||||||
%{_datarootdir}/zsh/site-functions/_enable_rabbitmqctl_completion
|
|
||||||
|
|
||||||
%ghost %dir /run/rabbitmq
|
%ghost %dir /run/rabbitmq
|
||||||
#
|
#
|
||||||
%dir /usr/lib/ocf/
|
%dir /usr/lib/ocf/
|
||||||
@ -245,4 +260,10 @@ done
|
|||||||
%{_libdir}/erlang/lib/amqp_client*/
|
%{_libdir}/erlang/lib/amqp_client*/
|
||||||
%{_libdir}/erlang/lib/rabbit_common*/
|
%{_libdir}/erlang/lib/rabbit_common*/
|
||||||
|
|
||||||
|
%files bash-completion
|
||||||
|
%{_datadir}/bash-completion/completions/rabbitmq*
|
||||||
|
|
||||||
|
%files zsh-completion
|
||||||
|
%{_datadir}/zsh/site-functions/_enable_rabbitmqctl_completion
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user