-
Notifications
You must be signed in to change notification settings - Fork 86
/
FastCFS.spec.in
184 lines (144 loc) · 4.68 KB
/
FastCFS.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
%define FastCFSFused FastCFS-fused
%define FastCFSUtils FastCFS-utils
%define FastCFSAPI FastCFS-api-libs
%define FastCFSAPITests FastCFS-api-tests
%define FastCFSAuthServer FastCFS-auth-server
%define FastCFSVoteServer FastCFS-vote-server
%define FastCFSAPIDevel FastCFS-api-devel
%define FastCFSFuseConfig FastCFS-fuse-config
%define CommitVersion %(echo $COMMIT_VERSION)
Name: FastCFS
Version: 5.3.2
Release: 1%{?dist}
Summary: a high performance cloud native distributed file system for databases, KVM and K8s
License: AGPL v3.0
Group: Arch/Tech
URL: http://github.com/happyfish100/FastCFS/
Source: http://github.com/happyfish100/FastCFS/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: fastDIR-devel >= 5.3.2
BuildRequires: faststore-devel >= 5.3.2
BuildRequires: fuse3-devel >= 3.10.5
Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
Requires: %{FastCFSFused} = %{version}-%{release}
Requires: %{FastCFSUtils} = %{version}-%{release}
Requires: %{FastCFSAPITests} = %{version}-%{release}
%description
a high performance distributed file system which can be used as the back-end storage of databases and cloud platforms.
commit version: %{CommitVersion}
%package -n %{FastCFSFused}
Requires: fuse3 >= 3.10.5
Requires: %{FastCFSAPI} = %{version}-%{release}
Requires: %{FastCFSFuseConfig} >= 1.0.0
Summary: FastCFS fuse
%package -n %{FastCFSUtils}
Requires: %{FastCFSAPI} = %{version}-%{release}
Summary: FastCFS utils
%package -n %{FastCFSAPI}
Requires: fastDIR-client >= 5.3.2
Requires: faststore-client >= 5.3.2
Summary: FastCFS api library
%package -n %{FastCFSAPITests}
Requires: %{FastCFSAPI} = %{version}-%{release}
Requires: %{FastCFSFuseConfig} >= 1.0.0
Summary: FastCFS api tests
%package -n %{FastCFSAPIDevel}
Requires: %{FastCFSAPI} = %{version}-%{release}
Summary: header files of FastCFS api library
%package -n %{FastCFSAuthServer}
Requires: fastDIR-client >= 5.3.2
Requires: FastCFS-auth-config >= 2.0.0
Summary: FastCFS auth server
%package -n %{FastCFSVoteServer}
Requires: libserverframe >= 1.2.4
Requires: FastCFS-vote-config >= 3.5.0
Summary: FastCFS vote server
%package -n %{FastCFSFuseConfig}
Requires: faststore-config >= 1.0.0
Summary: FastCFS fuse config files for sample
%description -n %{FastCFSFused}
FastCFS fuse
commit version: %{CommitVersion}
%description -n %{FastCFSUtils}
FastCFS utils
commit version: %{CommitVersion}
%description -n %{FastCFSAPI}
FastCFS api library
commit version: %{CommitVersion}
%description -n %{FastCFSAPITests}
FastCFS api tests
commit version: %{CommitVersion}
%description -n %{FastCFSAPIDevel}
This package provides the header files of libfcfsapi
commit version: %{CommitVersion}
%description -n %{FastCFSAuthServer}
FastCFS auth server
commit version: %{CommitVersion}
%description -n %{FastCFSVoteServer}
FastCFS vote server
commit version: %{CommitVersion}
%description -n %{FastCFSFuseConfig}
FastCFS fuse config files for sample
commit version: %{CommitVersion}
%prep
%setup -q
%build
./make.sh clean && ./make.sh --exclude=client
%install
rm -rf %{buildroot}
DESTDIR=$RPM_BUILD_ROOT ./make.sh --exclude=client install
FUSE_CONFDIR=%{buildroot}/etc/fastcfs/fcfs/
SYSTEMDIR=%{buildroot}/usr/lib/systemd/system/
mkdir -p $FUSE_CONFDIR
mkdir -p $SYSTEMDIR
cp conf/*.conf $FUSE_CONFDIR
cp systemd/fastcfs.service $SYSTEMDIR
cp systemd/fastauth.service $SYSTEMDIR
cp systemd/fastvote.service $SYSTEMDIR
%post
%preun
%postun
%clean
rm -rf %{buildroot}
%files
%post -n %{FastCFSFused}
mkdir -p /opt/fastcfs/fcfs
mkdir -p /opt/fastcfs/fuse
systemctl enable fastcfs
%files -n %{FastCFSFused}
/usr/bin/fcfs_fused
%config(noreplace) /usr/lib/systemd/system/fastcfs.service
%files -n %{FastCFSUtils}
/usr/bin/fcfs_active_test
/usr/bin/fcfs_pool_stat
%files -n %{FastCFSAPI}
%defattr(-,root,root,-)
/usr/lib64/libfcfsapi.so*
/usr/lib64/libfcfspreload.so*
%files -n %{FastCFSAPITests}
/usr/bin/fcfs_beachmark
/usr/bin/fcfs_test_file_op
/usr/bin/fcfs_test_file_copy
/usr/bin/fcfs_test_papi_copy
/usr/bin/fcfs_test_read_ahead
%files -n %{FastCFSAPIDevel}
%defattr(-,root,root,-)
/usr/include/fastcfs/api/*
%post -n %{FastCFSAuthServer}
mkdir -p /opt/fastcfs/auth
systemctl enable fastauth
%post -n %{FastCFSVoteServer}
mkdir -p /opt/fastcfs/vote
systemctl enable fastvote
%files -n %{FastCFSAuthServer}
/usr/bin/fcfs_authd
%config(noreplace) /usr/lib/systemd/system/fastauth.service
%files -n %{FastCFSVoteServer}
/usr/bin/fcfs_voted
%config(noreplace) /usr/lib/systemd/system/fastvote.service
%files -n %{FastCFSFuseConfig}
%defattr(-,root,root,-)
%config(noreplace) /etc/fastcfs/fcfs/*.conf
%changelog
* Fri Jan 1 2021 YuQing <384681@qq.com>
- first RPM release (1.0)