commit
573e25f2a7
61
lmbench.spec
Normal file
61
lmbench.spec
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
Name: lmbench
|
||||||
|
Version: 3
|
||||||
|
Release: 1
|
||||||
|
Summary: Tools for Performance Analysis
|
||||||
|
License: GPLv2
|
||||||
|
URL: http://www.bitmover.com/lmbench/
|
||||||
|
Source0: http://www.bitmover.com/lmbench/%{name}%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: lmbench3-fix-llseek-and-remove-bk-in-Makefile.patch
|
||||||
|
Patch1: lmbench3-add-HOWTO-to-indicate-howto-use-this-package.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc
|
||||||
|
|
||||||
|
%description
|
||||||
|
A userspace utility for testing the memory subsystem for faults. It's portable and should compile and work on any 32- or 64-bit Unix-like system. (Yes, even weird, proprietary Unices, and even Mac OS X.) For hardware developers, memtester can be told to test memory starting at a particular physical address as of memtester version 4.1.0.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}%{version}/
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}/opt/%{name}/{bin,doc,scripts,results,src}
|
||||||
|
find bin/ -name *.o | xargs rm -rf
|
||||||
|
find bin/ -name *.a | xargs rm -rf
|
||||||
|
cp -r bin/* %{buildroot}/opt/%{name}/bin/
|
||||||
|
|
||||||
|
install -m 0644 src/* %{buildroot}/opt/%{name}/src
|
||||||
|
|
||||||
|
install -m 0755 scripts/* %{buildroot}/opt/%{name}/scripts/
|
||||||
|
install -m 0644 scripts/Makefile %{buildroot}/opt/%{name}/scripts/
|
||||||
|
install -m 0644 scripts/README %{buildroot}/opt/%{name}/scripts/
|
||||||
|
|
||||||
|
install -m 0644 doc/* %{buildroot}/opt/%{name}/doc/
|
||||||
|
|
||||||
|
install -m 0644 Makefile %{buildroot}/opt/%{name}/
|
||||||
|
|
||||||
|
install -m 0644 results/Makefile %{buildroot}/opt/%{name}/results
|
||||||
|
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%preun
|
||||||
|
%post
|
||||||
|
%postun
|
||||||
|
|
||||||
|
%check
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license COPYING COPYING-2
|
||||||
|
%doc README HOWTO
|
||||||
|
/opt/%{name}/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Mar 29 2020 Wei Xiong <myeuler@163.com>
|
||||||
|
- Package init
|
||||||
|
|
||||||
11
lmbench3-add-HOWTO-to-indicate-howto-use-this-package.patch
Normal file
11
lmbench3-add-HOWTO-to-indicate-howto-use-this-package.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -urN lmbench3/HOWTO lmbench3-bak/HOWTO
|
||||||
|
--- lmbench3/HOWTO 1970-01-01 08:00:00.000000000 +0800
|
||||||
|
+++ lmbench3-bak/HOWTO 2020-05-03 14:25:32.662989266 +0800
|
||||||
|
@@ -0,0 +1,7 @@
|
||||||
|
+For the reason that lmbench is not a packaging frindly software.
|
||||||
|
+Put lmbench on /opt/lmbench dir which including all the contents.
|
||||||
|
+
|
||||||
|
+if try to use it. just create a new dir and copy everything in the new dir
|
||||||
|
+and rum make.
|
||||||
|
+
|
||||||
|
+This is a stupid way, but anyway, this is a way
|
||||||
26
lmbench3-fix-llseek-and-remove-bk-in-Makefile.patch
Normal file
26
lmbench3-fix-llseek-and-remove-bk-in-Makefile.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
diff -urN lmbench3/src/disk.c lmbench3-bak/src/disk.c
|
||||||
|
--- lmbench3/src/disk.c 2005-08-23 08:19:54.000000000 +0800
|
||||||
|
+++ lmbench3-bak/src/disk.c 2020-05-03 12:33:37.837715349 +0800
|
||||||
|
@@ -289,9 +289,7 @@
|
||||||
|
seekto(int fd, uint64 off)
|
||||||
|
{
|
||||||
|
#ifdef __linux__
|
||||||
|
- extern loff_t llseek(int, loff_t, int);
|
||||||
|
-
|
||||||
|
- if (llseek(fd, (loff_t)off, SEEK_SET) == (loff_t)-1) {
|
||||||
|
+ if (lseek(fd, (loff_t)off, SEEK_SET) == (loff_t)-1) {
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
diff -urN lmbench3/src/Makefile lmbench3-bak/src/Makefile
|
||||||
|
--- lmbench3/src/Makefile 2005-08-23 08:19:54.000000000 +0800
|
||||||
|
+++ lmbench3-bak/src/Makefile 2020-05-03 12:33:32.148802834 +0800
|
||||||
|
@@ -228,7 +228,7 @@
|
||||||
|
install install-target dist get edit get-e clean clobber \
|
||||||
|
share depend testmake
|
||||||
|
|
||||||
|
-$O/lmbench : ../scripts/lmbench bk.ver
|
||||||
|
+$O/lmbench : ../scripts/lmbench
|
||||||
|
rm -f $O/lmbench
|
||||||
|
sed -e "s/<version>/`cat bk.ver`/g" < ../scripts/lmbench > $O/lmbench
|
||||||
|
chmod +x $O/lmbench
|
||||||
BIN
lmbench3.tar.gz
Normal file
BIN
lmbench3.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user