53 lines
1.5 KiB
RPMSpec
53 lines
1.5 KiB
RPMSpec
|
|
%define debug_package %{nil}
|
||
|
|
%define pulsar_ver 2.10.4
|
||
|
|
%define pkg_ver 1
|
||
|
|
%define _prefix /opt/pulsar
|
||
|
|
Summary: Cloud-Native, Distributed Messaging and Streaming
|
||
|
|
Name: pulsar
|
||
|
|
Version: %{pulsar_ver}
|
||
|
|
Release: %{pkg_ver}
|
||
|
|
License: Apache-2.0
|
||
|
|
Group: Applications/Message
|
||
|
|
URL: https://pulsar.apache.org
|
||
|
|
Source0: https://archive.apache.org/dist/pulsar/pulsar-2.10.4/apache-pulsar-2.10.4-src.tar.gz
|
||
|
|
Patch0001: 0001-use-huawei-repository.patch
|
||
|
|
BuildRoot: /root/rpmbuild/BUILDROOT/
|
||
|
|
BuildRequires: java-1.8.0-openjdk-devel,maven,systemd
|
||
|
|
Requires: java-1.8.0-openjdk,systemd
|
||
|
|
Provides: apache-pulsar
|
||
|
|
Provides: mvn(org.apche.pulsar:pulsar)
|
||
|
|
|
||
|
|
%description
|
||
|
|
Pulsar is a distributed pub-sub messaging platform with a very flexible messaging model and an intuitive client API.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n apache-pulsar-%{version}-src
|
||
|
|
|
||
|
|
%patch0001 -p1
|
||
|
|
|
||
|
|
%build
|
||
|
|
mvn clean install -Pcore-modules,-main -DskipTests
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p $RPM_BUILD_ROOT%{_prefix}/{lib,bin,conf,examples,instances,licenses}
|
||
|
|
cd %{_builddir}/apache-pulsar-%{version}-src/distribution/server/target/
|
||
|
|
tar -xvf apache-pulsar-%{version}-bin.tar.gz
|
||
|
|
cd apache-pulsar-%{version}
|
||
|
|
cp -pr * $RPM_BUILD_ROOT%{_prefix}
|
||
|
|
|
||
|
|
%clean
|
||
|
|
rm -rf $RPM_BUILD_ROOT
|
||
|
|
|
||
|
|
%files
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%attr(-,pulsar,pulsar) %{_prefix}
|
||
|
|
%dir %attr(755, pulsar, pulsar) %{_prefix}
|
||
|
|
|
||
|
|
%pre
|
||
|
|
getent group pulsar >/dev/null || groupadd -r pulsar
|
||
|
|
getent passwd pulsar >/dev/null || useradd -r -g pulsar -d / -s /sbin/nologin pulsar
|
||
|
|
exit 0
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Fri Aug 11 2023 Jialing Wang <wangjialing@cmss.chinamobile.com> - 2.10.4-1
|
||
|
|
- init puslar spec
|