%define debug_package %{nil} %define _prefix /opt/rocketmq %define path_name %{name}-all-%{version}-source-release Summary: Cloud-Native, Distributed Messaging and Streaming Name: rocketmq Version: 5.1.3 Release: 2 License: Apache-2.0 Group: Applications/Message URL: https://rocketmq.apache.org/ Source0: https://archive.apache.org/dist/%{name}/%{version}/%{name}-all-%{version}-source-release.zip Patch0001: backport_some_typo_fixes.patch BuildRoot: /root/rpmbuild/BUILDROOT/ BuildRequires: java-1.8.0-openjdk-devel, maven, maven-local, git Requires: java-1.8.0-openjdk-devel %description Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications. %prep %autosetup -S git -n %{name}-all-%{version}-source-release %build mvn -Prelease-all -DskipTests clean package -U %install cd %{_builddir}/%{path_name}/distribution/target mkdir -p $RPM_BUILD_ROOT%{_prefix} cp -pr %{_builddir}/%{path_name}/distribution/target/rocketmq-5.1.4-SNAPSHOT/rocketmq-5.1.4-SNAPSHOT/* $RPM_BUILD_ROOT%{_prefix} %clean rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD %files %defattr(-,root,root) %attr(-,rocketmq,rocketmq) %{_prefix} %dir %attr(755, rocketmq, rocketmq) %{_prefix} %pre getent group rocketmq >/dev/null || groupadd -r rocketmq getent passwd rocketmq >/dev/null || useradd -r -g rocketmq -d / -s /sbin/nologin rocketmq exit 0 %changelog * Fri Sep 08 2023 ShiZhili - 5.1.3-2 - fix some bugs * Thu Aug 17 2023 ShiZhili - 5.1.3-1 - init rocketmq spec