3 %bcond_without tcmalloc # don't use tcmalloc
5 Summary: Tools for the XFS filesystem
6 Summary(pl.UTF-8): Narzędzia do systemu plików XFS
10 License: LGPL v2.1 (libhandle), GPL v2 (the rest)
11 Group: Applications/System
12 Source0: ftp://linux-xfs.sgi.com/projects/xfs/cmd_tars/%{name}-%{version}.tar.gz
13 # Source0-md5: de9f1f45026c2f4e0776058d429ff4b6
15 Patch0: %{name}-miscfix-v2.patch
16 Patch2: %{name}-sharedlibs.patch
17 Patch3: %{name}-pl.po-update.patch
18 Patch4: %{name}-dynamic_exe.patch
19 Patch5: %{name}-diet.patch
20 Patch6: %{name}-repair-tcmalloc.patch
21 Patch7: %{name}-noquotasync.patch
22 Patch8: %{name}-sb.patch
23 URL: http://www.xfs.org/
24 BuildRequires: autoconf
25 BuildRequires: automake
27 BuildRequires: gettext-devel
28 BuildRequires: libblkid-devel
29 %{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
30 BuildRequires: libtool
31 BuildRequires: libuuid-devel
32 BuildRequires: readline-devel
33 BuildRequires: rpm >= 4.4.9-56
34 BuildRequires: rpmbuild(macros) >= 1.402
35 %{?with_tcmalloc:Requires: libtcmalloc >= 1.8.3-3}
36 Obsoletes: xfsprogs-initrd
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %if "%{pld_release}" == "ac"
40 # libtool in ac doesn't do the reordering of args properly
41 %define filterout_ld -Wl,--as-needed
44 # libxlog uses symbols from binary that links to libxlog
45 # libxcmd uses ("program") symbol from binary that links to libxcmd
46 %define skip_post_check_so libxlog.so.0.0.0 libxcmd.so.0.0.0
48 %define _sbindir /sbin
49 %define _bindir /usr/sbin
50 %define _libdir /%{_lib}
51 %define _libexecdir /usr/%{_lib}
52 # for some reason known only to rpm there must be "\\|" not "\|" here
53 %define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/')
54 %define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch}
57 A set of commands to use the XFS filesystem, including mkfs.xfs.
59 XFS is a high performance journaling filesystem which originated on
60 the SGI IRIX platform. It is completely multi-threaded, can support
61 large files and large filesystems, extended attributes, variable block
62 sizes, is extent based, and makes extensive use of Btrees
63 (directories, extents, free space) to aid both performance and
66 This implementation is on-disk compatible with the IRIX version of
69 %description -l pl.UTF-8
70 Zbiór komend do użytku z systemem plików XFS, włączając w to mkfs.xfs.
72 XFS jest wysoko wydajnym systemem plików z kroniką, który oryginalnie
73 był używany na platformie SGI IRIX. Jest to w pełni wielowątkowy,
74 obsługujący wielkie pliki oraz wielkie systemy, o rozszerzonych
75 atrybutach, zmiennych wielkościach bloków, mocno wykorzystujący
76 B-drzewa by uzyskać wysoką wydajność oraz skalowalność.
79 Summary: Header files and libraries to develop XFS software
80 Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki
81 Group: Development/Libraries
82 Requires: %{name} = %{version}-%{release}
83 Requires: libuuid-devel
86 Header files and libraries to develop software which operates on XFS
89 %description devel -l pl.UTF-8
90 Pliki nagłówkowe i biblioteki potrzebne do rozwoju oprogramowania
91 operującego na systemie plików XFS.
94 Summary: Static XFS software libraries
95 Summary(pl.UTF-8): Biblioteki statyczne do XFS
96 Group: Development/Libraries
97 Requires: %{name}-devel = %{version}-%{release}
100 Static XFS software libraries.
102 %description static -l pl.UTF-8
103 Biblioteki statyczne do XFS.
112 %{?with_tcmalloc:%patch6 -p1}
120 --sbindir=%{_bindir}\
124 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \
125 OPTIMIZER="%{rpmcflags}"
131 rm -rf $RPM_BUILD_ROOT
132 install -d $RPM_BUILD_ROOT{%{_libexecdir},/etc}
134 DIST_ROOT=$RPM_BUILD_ROOT
135 DIST_INSTALL=$(pwd)/install.manifest
136 DIST_INSTALL_DEV=$(pwd)/install-dev.manifest
137 export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
140 DIST_MANIFEST="$DIST_INSTALL"
141 %{__make} install-dev \
142 DIST_MANIFEST="$DIST_INSTALL_DEV"
144 install %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/xfs_lsprojid
146 ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libhandle.so.*.*.*) \
147 $RPM_BUILD_ROOT%{_libexecdir}/libhandle.so
148 ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxcmd.so.*.*.*) \
149 $RPM_BUILD_ROOT%{_libexecdir}/libxcmd.so
150 ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxfs.so.*.*.*) \
151 $RPM_BUILD_ROOT%{_libexecdir}/libxfs.so
152 ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxlog.so.*.*.*) \
153 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.so
155 mv $RPM_BUILD_ROOT%{_libdir}/lib*.la $RPM_BUILD_ROOT%{_libexecdir}
156 mv $RPM_BUILD_ROOT%{_libdir}/lib*.a $RPM_BUILD_ROOT%{_libexecdir}
158 %{__sed} -i -e "s|libdir='%{_libdir}'|libdir='%{_libexecdir}'|" \
159 $RPM_BUILD_ROOT%{_libexecdir}/lib{handle,xcmd,xfs,xlog}.la
160 %{__sed} -i -e "s| %{_libdir}/libxfs.la | %{_libexecdir}/libxfs.la |" \
161 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.la
163 echo "#10:/mnt/ftp/roman" >> $RPM_BUILD_ROOT/etc/projects
164 echo "#ftproman:10" >> $RPM_BUILD_ROOT/etc/projid
168 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
171 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{handle,xcmd,xfs,xlog}.so
174 rm -rf $RPM_BUILD_ROOT
176 %post -p /sbin/ldconfig
177 %postun -p /sbin/ldconfig
179 %files -f %{name}.lang
180 %defattr(644,root,root,755)
181 %doc README doc/{CHANGES,CREDITS}
182 %config(noreplace) %verify(not md5 mtime size) /etc/projects
183 %config(noreplace) %verify(not md5 mtime size) /etc/projid
184 %attr(755,root,root) %{_sbindir}/fsck.xfs
185 %attr(755,root,root) %{_sbindir}/mkfs.xfs
186 %attr(755,root,root) %{_sbindir}/xfs_repair
187 %attr(755,root,root) %{_bindir}/xfs_*
188 %attr(755,root,root) %{_libdir}/libhandle.so.*.*
189 %attr(755,root,root) %{_libdir}/libxcmd.so.*.*
190 %attr(755,root,root) %{_libdir}/libxfs.so.*.*
191 %attr(755,root,root) %{_libdir}/libxlog.so.*.*
192 %attr(755,root,root) %ghost %{_libdir}/libhandle.so.1
193 %attr(755,root,root) %ghost %{_libdir}/libxcmd.so.0
194 %attr(755,root,root) %ghost %{_libdir}/libxfs.so.0
195 %attr(755,root,root) %ghost %{_libdir}/libxlog.so.0
196 %{_mandir}/man5/projects.5*
197 %{_mandir}/man5/projid.5*
198 %{_mandir}/man5/xfs.5*
199 %{_mandir}/man8/fsck.xfs.8*
200 %{_mandir}/man8/mkfs.xfs.8*
201 %{_mandir}/man8/xfs_*.8*
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_libexecdir}/libhandle.so
206 %attr(755,root,root) %{_libexecdir}/libxcmd.so
207 %attr(755,root,root) %{_libexecdir}/libxfs.so
208 %attr(755,root,root) %{_libexecdir}/libxlog.so
209 %{_libexecdir}/libhandle.la
210 %{_libexecdir}/libxcmd.la
211 %{_libexecdir}/libxfs.la
212 %{_libexecdir}/libxlog.la
214 %{_mandir}/man3/*handle.3*
215 %{_mandir}/man3/xfsctl.3*
218 %defattr(644,root,root,755)
219 %{_libexecdir}/libhandle.a
220 %{_libexecdir}/libxcmd.a
221 %{_libexecdir}/libxfs.a
222 %{_libexecdir}/libxlog.a