diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 7a3bfac..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# kafka - -#### Description -A Distributed Streaming Platform - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index d785686..683a44c 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,3 @@ # kafka -#### 介绍 -A Distributed Streaming Platform - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +Apache Kafka is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications. diff --git a/kafka.spec b/kafka.spec new file mode 100644 index 0000000..c47ca8f --- /dev/null +++ b/kafka.spec @@ -0,0 +1,76 @@ +Summary: A Distributed Streaming Platform. +Name: kafka +Version: 2.6.0 +Release: 1 +License: Apache License, Version 2.0 +Source0: https://archive.apache.org/dist/%{name}/%{version}/%{name}-%{version}-src.tgz +Source1: https://gradle.org/next-steps/?version=6.6.1&format=bin +Provides: kafka +BuildRequires: systemd java-1.8.0-openjdk-devel +Requires: java-1.8.0-openjdk + +%description +Apache Kafka is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications. + +$pre + +%prep +%setup -q -n %{name}-%{version}-src + +%build +unzip %{_sourcedir}/gradle-6.6.1-bin.zip +./gradle-gradle-6.6.1/bin/gradle +./gradlew jar + +%install +mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{name}/{libs,bin,config} +mkdir -p $RPM_BUILD_ROOT%{_log_dir} +mkdir -p $RPM_BUILD_ROOT%{_data_dir} +mkdir -p $RPM_BUILD_ROOT%{_unitdir} +mkdir -p $RPM_BUILD_ROOT%{_conf_dir}/ +install -p -D -m 755 bin/*.sh $RPM_BUILD_ROOT%{_prefix}/%{name}/bin +install -p -D -m 644 config/* $RPM_BUILD_ROOT%{_prefix}/%{name}/config +install -p -D -m 644 config/server.properties $RPM_BUILD_ROOT%{_conf_dir}/ +sed -i "s:^log.dirs=.*:log.dirs=%{_data_dir}:" $RPM_BUILD_ROOT%{_conf_dir}/server.properties +install -p -D -m 755 %{S:1} $RPM_BUILD_ROOT%{_unitdir}/ +install -p -D -m 644 %{S:2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} +install -p -D -m 644 %{S:3} $RPM_BUILD_ROOT%{_conf_dir}/ +install -p -D -m 644 %{S:4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} +install -p -D -m 644 libs/* $RPM_BUILD_ROOT%{_prefix}/%{name}/libs +%if %{build_with_metrics} +# adding metric specific sources. +install -p -D -m 644 %{S:6} $RPM_BUILD_ROOT%{_prefix}/%{name}/libs +install -p -D -m 644 %{S:7} $RPM_BUILD_ROOT%{_prefix}/%{name}/libs +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +/usr/bin/getent group %{_group} >/dev/null || /usr/sbin/groupadd -r %{_group} +/usr/bin/getent passwd %{_user} >/dev/null || /usr/sbin/useradd -r \ + -g %{_group} -d %{_prefix}/%{name} -s /bin/bash -c "Kafka" %{_user} + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun %{name}.service + +%files +%defattr(-,root,root) +%{_unitdir}/%{name}.service +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%config(noreplace) %{_conf_dir}/* +%{_prefix}/%{name} +%attr(0755,kafka,kafka) %dir %{_log_dir} +%attr(0700,kafka,kafka) %dir %{_data_dir} +%doc NOTICE +%doc LICENSE + +%changelog +* 2020-09-01 "Hao Zhang" \ No newline at end of file diff --git a/kafka.yaml b/kafka.yaml new file mode 100644 index 0000000..84b5656 --- /dev/null +++ b/kafka.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: https://github.com/apache/kafka/releases +tag_prefix: debian/ +seperator: .