3 %bcond_with static # link statically with \-luuid
4 %bcond_with dynamic_exe # link executables dynamically with xfs libs
6 Summary: Tools for the XFS filesystem
7 Summary(pl.UTF-8): Narzędzia do systemu plików XFS
11 License: LGPL v2.1 (libhandle), GPL v2 (the rest)
12 Group: Applications/System
13 Source0: ftp://linux-xfs.sgi.com/projects/xfs/download/cmd_tars/%{name}_%{version}-1.tar.gz
14 # Source0-md5: 363b5c25ba725984cfe72908eece7d0d
15 Source1: xfs_metadump.h
16 Patch0: %{name}-miscfix-v2.patch
17 Patch1: %{name}-install-sh.patch
18 Patch2: %{name}-sharedlibs.patch
19 Patch3: %{name}-pl.po-update.patch
20 Patch4: %{name}-dynamic_exe.patch
21 Patch5: %{name}-LDFLAGS.patch
22 Patch6: %{name}-libtool.patch
23 Patch7: %{name}-gettext.patch
24 URL: http://oss.sgi.com/projects/xfs/
25 BuildRequires: autoconf
26 BuildRequires: automake
28 BuildRequires: gettext-devel
29 BuildRequires: libtool
30 BuildRequires: libuuid-devel
31 %{?with_static:BuildRequires: libuuid-static}
32 %{?with_static:BuildRequires: sed >= 4.0}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _sbindir /sbin
37 %define _bindir /usr/sbin
38 %define _libdir /%{_lib}
39 %define _libexecdir /usr/%{_lib}
42 A set of commands to use the XFS filesystem, including mkfs.xfs.
44 XFS is a high performance journaling filesystem which originated on
45 the SGI IRIX platform. It is completely multi-threaded, can support
46 large files and large filesystems, extended attributes, variable block
47 sizes, is extent based, and makes extensive use of Btrees
48 (directories, extents, free space) to aid both performance and
51 This implementation is on-disk compatible with the IRIX version of
54 %description -l pl.UTF-8
55 Zbiór komend do użytku z systemem plików XFS, włączając w to mkfs.xfs.
57 XFS jest wysoko wydajnym systemem plików z kroniką, który oryginalnie
58 był używany na platformie SGI IRIX. Jest to w pełni wielowątkowy,
59 obsługujący wielkie pliki oraz wielkie systemy, o rozszerzonych
60 atrybutach, zmiennych wielkościach bloków, mocno wykorzystujący
61 B-drzewa by uzyskać wysoką wydajność oraz skalowalność.
64 Summary: Header files and libraries to develop XFS software
65 Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
68 Requires: libuuid-devel
69 Obsoletes: libxfs1-devel
72 Header files and libraries to develop software which operates on XFS
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe i biblioteki potrzebne do rozwoju oprogramowania
77 operującego na systemie plików XFS.
80 Summary: Static XFS software libraries
81 Summary(pl.UTF-8): Biblioteki statyczne do XFS
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{version}-%{release}
86 Static XFS software libraries.
88 %description static -l pl.UTF-8
89 Biblioteki statyczne do XFS.
97 %{?with_dynamic_exe:%patch4 -p1}
102 [ -f include/xfs_metadump.h ] && echo "xfs_metadump.h already exists" && exit 1
103 install %{SOURCE1} include/xfs_metadump.h
106 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}"
107 OPTIMIZER="%{rpmcflags} -DENABLE_GETTEXT"
108 export DEBUG OPTIMIZER
113 %{!?with_static:--enable-shared-uuid=yes} \
114 %{?with_static:--disable-shared --disable-shared-uuid}
117 %{?with_static:LTLINK='$(LIBTOOL) --mode=link %{__cc} -all-static' LDFLAGS=-static}
120 rm -rf $RPM_BUILD_ROOT
122 DIST_ROOT="$RPM_BUILD_ROOT"
123 DIST_INSTALL=`pwd`/install.manifest
124 DIST_INSTALL_DEV=`pwd`/install-dev.manifest
125 export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
126 %{?with_static:sed -i -e 's/\.lai/.la/' include/buildmacros}
129 DIST_MANIFEST="$DIST_INSTALL"
130 %{__make} install-dev \
131 DIST_MANIFEST="$DIST_INSTALL_DEV"
133 for man in attr_list_by_handle.3 attr_multi_by_handle.3 \
134 fd_to_handle.3 free_handle.3 fssetdm_by_handle.3 \
135 getparentpaths_by_handle.3 getparents_by_handle.3 \
136 handle_to_fshandle.3 open_by_handle.3 path_to_fshandle.3 \
137 readlink_by_handle.3; do
138 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/$man
139 echo ".so path_to_handle.3" \
140 > $RPM_BUILD_ROOT%{_mandir}/man3/$man
143 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/xfs_info.8
144 echo ".so xfs_growfs.8" > $RPM_BUILD_ROOT%{_mandir}/man8/xfs_info.8
146 ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir}; echo libhandle.so.*.*.*) \
147 $RPM_BUILD_ROOT%{_libexecdir}/libhandle.so
148 ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir}; echo libdisk.so.*.*.*) \
149 $RPM_BUILD_ROOT%{_libexecdir}/libdisk.so
150 ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir}; echo libxfs.so.*.*.*) \
151 $RPM_BUILD_ROOT%{_libexecdir}/libxfs.so
152 ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir}; echo libxlog.so.*.*.*) \
153 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.so
155 %{__sed} -e "s|libdir='%{_libdir}'|libdir='%{_libexecdir}'|" \
156 $RPM_BUILD_ROOT%{_libexecdir}/lib{disk,handle,xfs,xlog}.la
161 rm -rf $RPM_BUILD_ROOT
163 %post -p /sbin/ldconfig
164 %postun -p /sbin/ldconfig
166 %files -f %{name}.lang
167 %defattr(644,root,root,755)
168 %doc README doc/{CHANGES,CREDITS}
169 %attr(755,root,root) %{_sbindir}/*
170 %attr(755,root,root) %{_bindir}/*
171 %{!?with_static:%attr(755,root,root) /%{_lib}/lib*.so.*.*}
172 %{_mandir}/man[185]/*
175 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_libexecdir}/lib*.so
178 %{_libexecdir}/lib*.la
185 %defattr(644,root,root,755)
186 %{_libexecdir}/lib*.a