diff --git a/Make-the-debug-package-compile.patch b/Make-the-debug-package-compile.patch new file mode 100644 index 0000000..744ee40 --- /dev/null +++ b/Make-the-debug-package-compile.patch @@ -0,0 +1,22 @@ +From 4521b0de64177b030dc946adf1f6e1622bea85fc Mon Sep 17 00:00:00 2001 +From: hht8 +Date: Mon, 28 Jun 2021 17:03:12 +0800 +Subject: [PATCH] 1 + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index d555f0a..2a4c264 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT ++CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT $(OPTFLAGS) + LIBS := -lpthread -lm -lssl -lcrypto + + TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown) +-- +2.23.0 + diff --git a/wrk-4.1.0.tar.gz b/wrk-4.1.0.tar.gz new file mode 100644 index 0000000..0b7bf3e Binary files /dev/null and b/wrk-4.1.0.tar.gz differ diff --git a/wrk.spec b/wrk.spec new file mode 100644 index 0000000..1939afa --- /dev/null +++ b/wrk.spec @@ -0,0 +1,34 @@ +Name: wrk +Version: 4.1.0 +Release: 1 +Summary: Modern HTTP benchmarking tool +License: Apache-2.0 +URL: https://github.com/wg/wrk +Source0: https://github.com/wg/wrk/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: Make-the-debug-package-compile.patch +BuildRequires: pkgconf openssl-devel +%description +wrk is a modern HTTP benchmarking tool capable of generating significant +load when run on a single multi-core CPU. It combines a multithreaded +design with scalable event notification systems such as epoll and kqueue. +An optional LuaJIT script can perform HTTP request generation, response +processing, and custom reporting. Several example scripts are located in +scripts. + +%prep +%autosetup -p1 + +%build +%make_build OPTFLAGS="%{optflags}" WITH_OPENSSL=%{_prefix} + +%install +install -D -m 0755 wrk %{buildroot}%{_bindir}/wrk + +%files +%license LICENSE +%doc README.md NOTICE scripts/ +%{_bindir}/wrk + +%changelog +* Mon Jun 28 2021 huanghaitao - 4.1.0-1 +- Package init