]> git.pld-linux.org Git - packages/lizardfs.git/blame - lizardfs.spec
Release 1. Works for me.
[packages/lizardfs.git] / lizardfs.spec
CommitLineData
69fdf778 1# TODO:
af1a7dda
MK
2# - Fix x32 asm code inside crcutil-1.0
3# - Consider using external libcrcutil package
db568ec4 4# - systemd service files to metalogger, cgiserver packages
18cf1acb 5# - Fix cgiserver
db568ec4
MK
6
7%bcond_without systemd_service
d6cda542 8
19bf9ddd
MK
9Summary: Open Source Distributed File System
10Summary(pl.UTF-8): Rozporoszony system plików Open Source
11Name: lizardfs
12Version: 3.9.4
18cf1acb 13Release: 1
19bf9ddd
MK
14License: GPL v3
15Group: Applications
69fdf778 16Source0: https://github.com/lizardfs/lizardfs/archive/v.%{version}.tar.gz
19bf9ddd 17# Source0-md5: 71766d18a5066506e54d952ab6056bd3
db568ec4
MK
18%if %{with systemd_service}
19Source1: %{name}-master.service
20Source2: %{name}-chunkserver.service
21%endif
69fdf778 22Patch0: %{name}-cmake_fix.patch
19bf9ddd 23URL: https://github.com/lizardfs/lizardfs
7b264090 24BuildRequires: /usr/bin/a2x
69fdf778
MK
25BuildRequires: asciidoc
26BuildRequires: boost-devel
27BuildRequires: cmake >= 3.4.0
28BuildRequires: docbook-dtd45-xml
29BuildRequires: libfuse-devel
30BuildRequires: pkgconfig
7b264090 31BuildRequires: rpmbuild(macros) >= 1.202
69fdf778 32BuildRequires: zlib-devel
db568ec4
MK
33%if %{with systemd_service}
34BuildRequires: rpmbuild(macros) >= 1.647
35Requires(post,preun,postun): systemd-units >= 38
36Requires: systemd-units >= 0.38
37%endif
af1a7dda 38ExclusiveArch: %{ix86} %{x8664}
af1a7dda 39# Requires:
7b264090
ER
40Requires(postun): /usr/sbin/groupdel
41Requires(postun): /usr/sbin/userdel
42Requires(pre): /bin/id
43Requires(pre): /usr/bin/getgid
44Requires(pre): /usr/sbin/groupadd
45Requires(pre): /usr/sbin/useradd
46Provides: group(mfs)
47Provides: user(mfs)
19bf9ddd
MK
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50%description
69fdf778
MK
51LizardFS is a highly reliable, scalable and efficient distributed file
52system. It spreads data over a number of physical servers, making it
53visible to an end user as a single file system.
19bf9ddd
MK
54
55%description -l pl.UTF-8
69fdf778
MK
56LizardFS is jest niezawodnym, skalowalnym i efektywnym rozproszonym
57systemem plików. Rozkłada dane na rózne fizyczne serwery, dająć
58użytkownikowi końcowemu widok pojedynczego systemu plików.
19bf9ddd 59
d6cda542 60%package master
69fdf778
MK
61Summary: Master/shadow metadata server
62Group: Applications
63Requires: %{name} = %{version}-%{release}
64
d6cda542
MK
65%description master
66Master/shadow metadata server
67
db568ec4
MK
68%if %{with systemd_service}
69%post master
70%systemd_post %{name}-master.service
71
72%preun master
73%systemd_preun %{name}-master.service
74
75%postun master
76%systemd_reload
77%endif
78
d6cda542 79%package chunkserver
69fdf778
MK
80Summary: Chunk server
81Group: Applications
82Requires: %{name} = %{version}-%{release}
83
d6cda542
MK
84%description chunkserver
85Chunk server
86
db568ec4
MK
87%if %{with systemd_service}
88%post chunkserver
89%systemd_post %{name}-chunkserver.service
90
91%preun chunkserver
92%systemd_preun %{name}-chunkserver.service
93
94%postun chunkserver
95%systemd_reload
96%endif
97
d6cda542 98%package metalogger
69fdf778
MK
99Summary: Metalogger
100Group: Applications
101Requires: %{name} = %{version}-%{release}
102
d6cda542
MK
103%description metalogger
104Metalogger
105
d6cda542 106%package cgiserver
69fdf778
MK
107Summary: CGI server
108Group: Applications
109Requires: %{name} = %{version}-%{release}
110
d6cda542
MK
111%description cgiserver
112CGI server
113
19bf9ddd 114%prep
69fdf778 115%setup -q -n %{name}-v.%{version}
19bf9ddd
MK
116%patch0 -p1
117
118%build
119install -d build
120cd build
2d1818e1 121%cmake ../ \
18cf1acb
MK
122 -DBUILD_SHARED_LIBS=FALSE \
123 -DCMAKE_INSTALL_PREFIX:PATH=/ \
124 -DENABLE_DEBIAN_PATHS=TRUE
19bf9ddd
MK
125%{__make}
126
127%install
128rm -rf $RPM_BUILD_ROOT
129cd build
130%{__make} install \
131 DESTDIR=$RPM_BUILD_ROOT
69fdf778 132
d6cda542 133install -d $RPM_BUILD_ROOT%{_sysconfdir}
d6cda542 134install -d $RPM_BUILD_ROOT/var/lib/%{name}
152dce4a 135cp $RPM_BUILD_ROOT/var/lib/mfs/metadata.mfs.empty $RPM_BUILD_ROOT%{_sysconfdir}/mfs/
69fdf778
MK
136install -d $RPM_BUILD_ROOT/var/lib/%{name}/master
137install -d $RPM_BUILD_ROOT/var/lib/%{name}/chunkserver
152dce4a 138mv $RPM_BUILD_ROOT/var/lib/mfs/metadata.mfs.empty $RPM_BUILD_ROOT/var/lib/%{name}/master/metadata.mfs
19bf9ddd 139
db568ec4
MK
140%if %{with systemd_service}
141install -d $RPM_BUILD_ROOT%{systemdunitdir}
18cf1acb
MK
142cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-master.service
143cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-chunkserver.service
db568ec4
MK
144%endif
145
19bf9ddd
MK
146%clean
147rm -rf $RPM_BUILD_ROOT
148
d6cda542
MK
149%postun
150if [ "$1" = "0" ]; then
7b264090
ER
151 %userremove mfs
152 %groupremove mfs
d6cda542
MK
153fi
154
19bf9ddd
MK
155%files
156%defattr(644,root,root,755)
157%doc doc COPYING README UPGRADE NEWS INSTALL
69fdf778
MK
158%dir %{_sysconfdir}/mfs
159%dir %attr(750,root,root) /var/lib/%{name}
160%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/globaliolimits.cfg.dist
161%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/iolimits.cfg.dist
162%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsexports.cfg.dist
163%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsgoals.cfg.dist
164%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmount.cfg.dist
165%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfstopology.cfg.dist
d6cda542
MK
166%attr(755,root,root) %{_bindir}/lizardfs-admin
167%attr(755,root,root) %{_bindir}/lizardfs-probe
d6cda542
MK
168%attr(755,root,root) %{_bindir}/mfsappendchunks
169%attr(755,root,root) %{_bindir}/mfscheckfile
170%attr(755,root,root) %{_bindir}/mfsdeleattr
171%attr(755,root,root) %{_bindir}/mfsdirinfo
172%attr(755,root,root) %{_bindir}/mfsfileinfo
d6cda542
MK
173%attr(755,root,root) %{_bindir}/mfsfilerepair
174%attr(755,root,root) %{_bindir}/mfsgeteattr
175%attr(755,root,root) %{_bindir}/mfsgetgoal
176%attr(755,root,root) %{_bindir}/mfsgettrashtime
177%attr(755,root,root) %{_bindir}/mfsmakesnapshot
178%attr(755,root,root) %{_bindir}/mfsmount
179%attr(755,root,root) %{_bindir}/mfsrepquota
180%attr(755,root,root) %{_bindir}/mfsrgetgoal
181%attr(755,root,root) %{_bindir}/mfsrgettrashtime
182%attr(755,root,root) %{_bindir}/mfsrsetgoal
183%attr(755,root,root) %{_bindir}/mfsrsettrashtime
184%attr(755,root,root) %{_bindir}/mfsseteattr
185%attr(755,root,root) %{_bindir}/mfssetgoal
186%attr(755,root,root) %{_bindir}/mfssetquota
187%attr(755,root,root) %{_bindir}/mfssettrashtime
188%attr(755,root,root) %{_bindir}/mfssnapshot
189%attr(755,root,root) %{_bindir}/mfstools
d6cda542
MK
190%attr(755,root,root) %{_sbindir}/mfsmetadump
191%attr(755,root,root) %{_sbindir}/mfsmetarestore
192%attr(755,root,root) %{_sbindir}/mfsrestoremaster
093a7d1a
ER
193%{_mandir}/man1/mfs*.1*
194%{_mandir}/man5/globaliolimits.cfg.5*
195%{_mandir}/man5/iolimits.cfg.5*
196%{_mandir}/man5/mfs*.cfg.5*
197%{_mandir}/man7/lizardfs.7*
198%{_mandir}/man7/mfs.7
199%{_mandir}/man7/moosefs.7
200%{_mandir}/man8/lizardfs-admin.8*
201%{_mandir}/man8/lizardfs-cgiserver.8*
202%{_mandir}/man8/lizardfs-probe.8
203%{_mandir}/man8/mfs*.8*
d6cda542
MK
204
205%files master
206%defattr(644,root,root,755)
207%attr(755,root,root) %{_sbindir}/mfsmaster
69fdf778
MK
208%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmaster.cfg.dist
209%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/metadata.mfs.empty
210%dir %attr(750,mfs,mfs) /var/lib/%{name}/master
211%config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/master/metadata.mfs
db568ec4
MK
212%if %{with systemd_service}
213%{systemdunitdir}/%{name}-master.service
214%endif
215
d6cda542
MK
216%files chunkserver
217%defattr(644,root,root,755)
218%attr(755,root,root) %{_sbindir}/mfschunkserver
69fdf778
MK
219%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfschunkserver.cfg.dist
220%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfshdd.cfg.dist
221%dir %attr(750,mfs,mfs) /var/lib/%{name}/chunkserver
db568ec4
MK
222%if %{with systemd_service}
223%{systemdunitdir}/%{name}-chunkserver.service
224%endif
d6cda542
MK
225
226%files metalogger
227%defattr(644,root,root,755)
228%attr(755,root,root) %{_sbindir}/mfsmetalogger
69fdf778
MK
229%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmetalogger.cfg.dist
230# %dir %attr(750,mfs,mfs) /var/lib/%{name}/metalogger
d6cda542
MK
231
232%files cgiserver
233%defattr(644,root,root,755)
234%attr(755,root,root) %{_sbindir}/lizardfs-cgiserver
235%attr(755,root,root) %{_sbindir}/mfscgiserv
69fdf778 236%{_datadir}/mfscgi/
This page took 0.135452 seconds and 4 git commands to generate.