-
Notifications
You must be signed in to change notification settings - Fork 0
/
pathwalk.spec
57 lines (42 loc) · 1.04 KB
/
pathwalk.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Name:
Version:
Release:
%define debug_package %{nil}
Summary: Pathwalk - simulate path search
License: GPL
Group: Applications/System
Url: https://github.com/garlick/pathwalk
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%package data
Summary: Data for pathwalk benchmark
Group: Applications/System
AutoReq: no
%description
Pathwalk simulates the file system load created by path search.
%description data
Data for pathwalk benchmark
%prep
%setup
%build
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/opt/pathwalk/bin
cp pathwalk $RPM_BUILD_ROOT/opt/pathwalk/bin/
./pathwalk -c $RPM_BUILD_ROOT/opt/pathwalk/data/
cd $RPM_BUILD_ROOT/opt/pathwalk && tar cf data.tar data
rm -rf $RPM_BUILD_ROOT/opt/pathwalk/data
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,0755)
/opt/pathwalk/bin
%files data
%defattr(-,root,root,0644)
/opt/pathwalk/data.tar
%post data
umask 022
cd /opt/pathwalk && tar --no-same-owner -xf data.tar
%preun data
rm -rf /opt/pathwalk/data