diff --git a/apisix-2.7.tar.gz b/apisix-2.7.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e70953dd1e1c8c87ecde25ca5caa7c955f0974cc Binary files /dev/null and b/apisix-2.7.tar.gz differ diff --git a/apisix.service b/apisix.service new file mode 100644 index 0000000000000000000000000000000000000000..60f125fb17d51c9a63cb88ad093d9890fcb82af3 --- /dev/null +++ b/apisix.service @@ -0,0 +1,11 @@ +[Unit] +Description=apisix +Conflicts=apisix.service +After=network-online.target + +[Service] +Type=forking +WorkingDirectory=/usr/local/apisix +ExecStart=/usr/bin/apisix start +ExecStop=/usr/bin/apisix stop +ExecReload=/usr/bin/apisix reload \ No newline at end of file diff --git a/apisix.spec b/apisix.spec new file mode 100644 index 0000000000000000000000000000000000000000..9c318e1c200817e7630d88e92484a3346711f36e --- /dev/null +++ b/apisix.spec @@ -0,0 +1,85 @@ +# Use luajit within openresty, which is compatible with lua 5.1 +%global lua_version 5.1 +%{!?lua_pkgdir: %global lua_pkgdir %{_datadir}/lua/%{lua_version}} + +# Use luajit within openresty to build luarocks +%global openresty_prefix %{_usr}/local/openresty +%global openresty_openssl %{openresty_prefix}/openssl111 + +%global apisix_dist %{_prefix}/local/apisix + +Name: apisix +Version: 2.7 +Release: 1%{?dist} +Summary: Apache APISIX is a dynamic, real-time, high-performance API gateway + +License: Apache License 2.0 +URL: https://github.com/apache/apisix +Source0: %{name}-%{version}.tar.gz +Source1: %{name}.service + +BuildRequires: make, gcc, curl, git, unzip +BuildRequires: luarocks >= 3.5.0-1 +BuildRequires: openresty >= 1.19.3.1-1 +BuildRequires: openresty-openssl111-devel >= 1.1.1h-1 + +Requires: etcd >= 3.4.0 +Requires: openresty-openssl111 >= 1.1.1h-1 +Requires: openresty >= 1.19.3.1-1 + + +%description +Apache APISIX is a cloud-native microservices API gateway, delivering the ultimate +performance, security, open source and scalable platform for all your APIs and +microservices. Apache APISIX is based on Nginx and etcd. Compared with traditional +API gateways, APISIX has dynamic routing and plug-in hot loading, which is especially +suitable for API management under micro-service system. + + +%prep +%autosetup + + +%build +make deps + + +%install +rm -fr %{buildroot} + +install -m 0755 -vd %{buildroot}%{apisix_dist} +cp -a apisix %{buildroot}%{apisix_dist} +cp -a deps %{buildroot}%{apisix_dist} +cp -a conf %{buildroot}%{apisix_dist} +cp -a logs %{buildroot}%{apisix_dist} + +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp ./bin/apisix %{buildroot}%{_bindir} + +install -Dpm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service + + +%check + + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun %{name}.service + + +%files +%license LICENSE NOTICE +%doc README.md CONTRIBUTING.md +%dir %{apisix_dist} +%{_bindir}/* +%{_unitdir}/%{name}.service + + +%changelog +* Sat Jul 31 2021 Joey Ma - 2.7-1 +- Initial package with 2.7 diff --git a/apisix.yaml b/apisix.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1ad17f3c8d30e02e0d702c0b44cc86cce2c62af6 --- /dev/null +++ b/apisix.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: apache/apisix +tag_prefix: +seperator: . \ No newline at end of file