-
Notifications
You must be signed in to change notification settings - Fork 56
/
diod.spec.in
83 lines (68 loc) · 1.9 KB
/
diod.spec.in
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1%{?dist}
Summary: I/O forwarding server for 9P.
License: GPL
Group: Applications/System
URL: http://github.com/chaos/diod
Source0: %{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: tcp_wrappers-devel
BuildRequires: lua-devel
BuildRequires: munge-devel
BuildRequires: ncurses-devel
BuildRequires: libcap-devel
#BuildRequires: libibverbs-devel librdmacm-devel
#BuildRequires: gperftools-devel
BuildRequires: libattr-devel attr
BuildRequires: systemd
%description
diod is a 9P server used in combination with the kernel v9fs file
system for I/O forwarding on Linux clusters.
%prep
%setup -q
%build
%configure
make CFLAGS="-Werror -O2 -g"
%check
make check CFLAGS=-Werror
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# Kludge to install diodmount as a mount helper.
mkdir -p $RPM_BUILD_ROOT/sbin
mv $RPM_BUILD_ROOT%{_sbindir}/diodmount \
$RPM_BUILD_ROOT/sbin/mount.diod
mv $RPM_BUILD_ROOT%{_mandir}/man8/diodmount.8 \
$RPM_BUILD_ROOT%{_mandir}/man8/mount.diod.8
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
/usr/bin/systemctl enable diod
%preun
if [ "$1" = 0 ]; then
/usr/bin/systemctl stop diod
/usr/bin/systemctl disable diod
fi
%files
%defattr(-,root,root)
%doc AUTHORS COPYING README INSTALL ChangeLog
%{_sbindir}/diod
%{_mandir}/man8/diod.*
%{_mandir}/man5/diod.*
%attr(0755,root,root) %{_unitdir}/diod.service
%config(noreplace) %attr(0755,root,root) %{_sysconfdir}/auto.diod
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/diod.conf
%package utils
Summary: Utilities for diod, a I/O forwarding server for 9P
%description utils
Utilities related to the diod 9P file server.
%files utils
%defattr(-,root,root)
/sbin/mount.diod
%{_sbindir}/diod?*
%{_sbindir}/dtop
%{_mandir}/man8/diod?*.8.gz
%{_mandir}/man8/dtop.8.gz
%{_mandir}/man8/mount.diod.8.gz