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