forked from chaos/diod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diod.spec.in
68 lines (56 loc) · 1.58 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
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
%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}/*
/sbin/*
%{_mandir}/man8/*
%{_mandir}/man5/*
%attr(0755,root,root) %{_sysconfdir}/systemd/system/diod.service
%config(noreplace) %attr(0755,root,root) %{_sysconfdir}/auto.diod
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/diod.conf