forked from gluster/gluster-block
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gluster-block.spec.in
123 lines (97 loc) · 3.44 KB
/
gluster-block.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
##-----------------------------------------------------------------------------
## All %%global definitions should be placed here and keep them sorted
##
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) || ( 0%{?centos_version} && 0%{?centos_version} > 6)
%global _with_systemd true
%else
%global _with_initd true
%endif
##-----------------------------------------------------------------------------
## All package definitions should be placed here
##
Summary: Gluster block storage utility
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: @PACKAGE_RELEASE@
License: GPLv2 or LGPLv3+
URL: https://github.com/gluster/gluster-block
Source0: @PACKAGE_NAME@-@[email protected]
BuildRequires: pkgconfig(glusterfs-api)
BuildRequires: pkgconfig(json-c)
BuildRequires: help2man >= 1.36
%if ( 0%{?_with_systemd:1} )
%{?systemd_requires}
BuildRequires: systemd
%endif
Requires: tcmu-runner >= 1.0.4
Requires: targetcli >= 2.1.fb43
Requires: rpcbind
%description
gluster-block is a CLI utility, which aims at making gluster backed block
storage creation and maintenance as simple as possible.
%prep
%setup -q
%build
%configure
%make_build
%install
%make_install
%if ( 0%{?_with_initd:1} )
mv %{buildroot}/%{_initddir}/gluster-blockd.initd %{buildroot}/%{_initddir}/gluster-blockd
%endif
%if ( 0%{?_with_systemd:1} )
%post
%systemd_post gluster-blockd.service
%preun
%systemd_preun gluster-blockd.service
%postun
%systemd_postun_with_restart gluster-blockd.service
%endif
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%doc README.md
%if ( 0%{?_with_initd:1} )
%doc COPYING-GPLV2 COPYING-LGPLV3
%else
%license COPYING-GPLV2 COPYING-LGPLV3
%endif
%{_sbindir}/gluster-block
%{_sbindir}/gluster-blockd
%{_mandir}/man8/gluster-block*.8*
%if ( 0%{?_with_systemd:1} )
%{_unitdir}/gluster-blockd.service
%{_unitdir}/gluster-block-target.service
%else
%attr(755, root, root) %{_initddir}/gluster-blockd
%endif
%config(noreplace) %{_sysconfdir}/sysconfig/gluster-blockd
%changelog
* Mon Sep 25 2017 Prasanna Kumar Kalever <[email protected]>
- Fix Unclosed %if block in the spec file
* Thu Sep 21 2017 Niels de Vos <[email protected]>
- added systemd macros in the scriptlets
- use pkgconfig for BuildRequires
- run setup in quiet mode
- run make_* macros instead of make commands in build/install section
- drop the INSTALL file from the documentation
* Fri Sep 15 2017 Ji-Hyeon Gim <[email protected]>
- update with sysconfig handling for non-systemd distros
* Fri Aug 11 2017 Prasanna Kumar Kalever <[email protected]>
- add wrapper target service unit
* Tue Jun 22 2017 Prasanna Kumar Kalever <[email protected]>
- update with missing dependencies
* Tue Jun 06 2017 Prasanna Kumar Kalever <[email protected]>
- add gluster-blockd sysconfig template
* Mon Mar 27 2017 Prasanna Kumar Kalever <[email protected]>
- add json-c-devel to build dependency list
* Mon Mar 6 2017 Prasanna Kumar Kalever <[email protected]>
- conditionally enable with_systemd flag
* Mon Feb 27 2017 Prasanna Kumar Kalever <[email protected]>
- add INSTALL
* Mon Feb 27 2017 Prasanna Kumar Kalever <[email protected]>
- add Man page entry
* Thu Feb 23 2017 Niels de Vos <[email protected]>
- cleanup and add licenses and README.md to the package
* Sun Feb 5 2017 Prasanna Kumar Kalever <[email protected]>
- Initial spec file