]> git.pld-linux.org Git - packages/xfsprogs.git/blame - xfsprogs.spec
- up to 3.1.4
[packages/xfsprogs.git] / xfsprogs.spec
CommitLineData
00d1530a
JR
1#
2# Conditional build:
3%bcond_without initrd # don't build initrd version
4%bcond_without dietlibc # link initrd version with static glibc instead of dietlibc
5#
80ded214 6Summary: Tools for the XFS filesystem
809af116 7Summary(pl.UTF-8): Narzędzia do systemu plików XFS
80ded214 8Name: xfsprogs
0a7d57d5 9Version: 3.1.4
f337758d 10Release: 1
636af8bd 11License: LGPL v2.1 (libhandle), GPL v2 (the rest)
80ded214 12Group: Applications/System
4ede93fd 13Source0: ftp://linux-xfs.sgi.com/projects/xfs/cmd_tars/%{name}-%{version}.tar.gz
0a7d57d5 14# Source0-md5: 74081975f148bcabcab26c4c3496ede9
bc92c0b0 15Patch0: %{name}-miscfix-v2.patch
6ad71900 16Patch2: %{name}-sharedlibs.patch
21a3d2af
JB
17Patch3: %{name}-pl.po-update.patch
18Patch4: %{name}-dynamic_exe.patch
528ce8b7 19Patch5: %{name}-diet.patch
51a52578 20URL: http://www.xfs.org/
80ded214 21BuildRequires: autoconf
1c0f6863 22BuildRequires: automake
cb58e4a3 23BuildRequires: bash
a86cbc2d
JR
24%if %{with initrd}
25 %if %{with dietlibc}
26BuildRequires: dietlibc-static >= 2:0.31-6
27BuildRequires: libuuid-dietlibc
28 %else
29BuildRequires: glibc-static
30BuildRequires: libuuid-static
31 %endif
32%endif
8c56223e 33BuildRequires: gettext-devel
51a52578 34BuildRequires: libblkid-devel
92a53cbb 35BuildRequires: libtool
a5769371 36BuildRequires: libuuid-devel
99229502 37BuildRequires: readline-devel
dec839eb 38BuildRequires: rpm >= 4.4.9-56
9656c3b9 39BuildRequires: rpmbuild(macros) >= 1.402
c826f244 40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
80ded214 41
dec839eb
ER
42%if "%{pld_release}" == "ac"
43# libtool in ac doesn't do the reordering of args properly
44%define filterout_ld -Wl,--as-needed
45%endif
46
0a7d57d5
AM
47# libxlog uses symbols from binary that links to libxlog
48# libxcmd uses ("program") symbol from binary that links to libxcmd
49%define skip_post_check_so libxlog.so.0.0.0 libxcmd.so.0.0.0
50
b087bbdd
JR
51%define _sbindir /sbin
52%define _bindir /usr/sbin
a19d7677
JK
53%define _libdir /%{_lib}
54%define _libexecdir /usr/%{_lib}
4bf87b58
AF
55# for some reason known only to rpm there must be "\\|" not "\|" here
56%define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/')
57%define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch}
b087bbdd 58
80ded214
AM
59%description
60A set of commands to use the XFS filesystem, including mkfs.xfs.
61
62XFS is a high performance journaling filesystem which originated on
63the SGI IRIX platform. It is completely multi-threaded, can support
64large files and large filesystems, extended attributes, variable block
65sizes, is extent based, and makes extensive use of Btrees
66(directories, extents, free space) to aid both performance and
67scalability.
68
69This implementation is on-disk compatible with the IRIX version of
70XFS.
71
ddc220a9
JR
72%description -l pl.UTF-8
73Zbiór komend do użytku z systemem plików XFS, włączając w to mkfs.xfs.
80ded214 74
ddc220a9
JR
75XFS jest wysoko wydajnym systemem plików z kroniką, który oryginalnie
76był używany na platformie SGI IRIX. Jest to w pełni wielowątkowy,
77obsługujący wielkie pliki oraz wielkie systemy, o rozszerzonych
78atrybutach, zmiennych wielkościach bloków, mocno wykorzystujący
79B-drzewa by uzyskać wysoką wydajność oraz skalowalność.
80ded214
AM
80
81%package devel
82Summary: Header files and libraries to develop XFS software
809af116 83Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki
80ded214 84Group: Development/Libraries
8b4647b2 85Requires: %{name} = %{version}-%{release}
2528905a 86Requires: libuuid-devel
80ded214
AM
87
88%description devel
89Header files and libraries to develop software which operates on XFS
90filesystems.
91
ddc220a9
JR
92%description devel -l pl.UTF-8
93Pliki nagłówkowe i biblioteki potrzebne do rozwoju oprogramowania
94operującego na systemie plików XFS.
80ded214 95
1c0f6863 96%package static
97Summary: Static XFS software libraries
809af116 98Summary(pl.UTF-8): Biblioteki statyczne do XFS
1c0f6863 99Group: Development/Libraries
8b4647b2 100Requires: %{name}-devel = %{version}-%{release}
1c0f6863 101
102%description static
103Static XFS software libraries.
104
ddc220a9 105%description static -l pl.UTF-8
1c0f6863 106Biblioteki statyczne do XFS.
107
a86cbc2d
JR
108%package initrd
109Summary: Tools for the XFS filesystem - initrd version
110Summary(pl.UTF-8): Narzędzia do systemu plików XFS - wersja dla initrd
111Group: Base
112
113%description initrd
114A set of commands to use the XFS filesystem, including mkfs.xfs
115 - initrd version.
116
117%description initrd -l pl.UTF-8
118Zbiór komend do użytku z systemem plików XFS, włączając w to mkfs.xfs
119 - wersja dla initrd.
120
80ded214 121%prep
600886d5 122%setup -q
80ded214 123%patch0 -p1
6ad71900 124%patch2 -p1
4ede93fd
AM
125# currently obsolete until needed again
126# %patch3 -p1
df004a70 127%patch4 -p1
2528905a 128%patch5 -p1
4ede93fd
AM
129
130rm -f include/{builddefs,platform_defs}.h
80ded214
AM
131
132%build
ff9c0a4e 133%{__aclocal} -I m4
00d1530a
JR
134
135%if %{with initrd}
a86cbc2d
JR
136%if %{with dietlibc}
137# dietlibc doesn't have aio.h (and xfsprogs does not need it really)
138# dietlibc has needed librt stuff in libc/libpthread
00d1530a
JR
139sed -i -e 's|^AC_PACKAGE_NEED_AIO_H|dnl AC_PACKAGE_NEED_AIO_H|' \
140 -e 's|^AC_PACKAGE_NEED_LIO_LISTIO|dnl AC_PACKAGE_NEED_LIO_LISTIO|' \
141 configure.in
142sed -i -e 's|\(^LIBRT.*=.*\)|# \1|' include/builddefs.in
143sed -i -e 's|\(^LLDLIBS.*=.*\)|\1 -lcompat|' db/Makefile mkfs/Makefile
a86cbc2d 144%endif
00d1530a
JR
145
146%{__autoconf}
147%configure \
a86cbc2d 148 %{?with_dietlibc:CC="diet %{__cc} -static"} \
a084b099 149 --sbindir=%{_bindir} \
00d1530a
JR
150 --disable-gettext \
151 --disable-readline \
00d1530a 152 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \
1e21e3aa 153 OPTIMIZER="%{rpmcflags} -Wno-deprecated-declarations -Os -D_BSD_SOURCE -D__USE_XOPEN_EXTENDED"
00d1530a 154
4bf87b58
AF
155%{__make} -j1 include libxfs libxlog libxcmd libhandle libdisk \
156 LIBUUID="%{dietlibdir}/libuuid.a"
a86cbc2d 157%{__make} -j1 db growfs logprint mkfs mdrestore repair \
4bf87b58
AF
158 LDFLAGS="%{rpmldflags} -all-static" \
159 LIBUUID="%{dietlibdir}/libuuid.a"
00d1530a 160
9c0b9403
JR
161mkdir -p initrd
162mv -f db/xfs_db initrd/xfs_db
163mv -f growfs/xfs_growfs initrd/xfs_growfs
164mv -f logprint/xfs_logprint initrd/xfs_logprint
165mv -f mkfs/mkfs.xfs initrd/mkfs.xfs
166mv -f mdrestore/xfs_mdrestore initrd/xfs_mdrestore
167mv -f repair/xfs_repair initrd/xfs_repair
a86cbc2d
JR
168
169%if %{with dietlibc}
00d1530a
JR
170sed -i -e 's|^dnl AC_PACKAGE_NEED_AIO_H|AC_PACKAGE_NEED_AIO_H|' \
171 -e 's|^dnl AC_PACKAGE_NEED_LIO_LISTIO|AC_PACKAGE_NEED_LIO_LISTIO|' \
172 configure.in
a86cbc2d 173sed -i -e 's|^# \(LIBRT.*=.*\)|\1|' include/builddefs.in
00d1530a 174sed -i -e 's|\(^LLDLIBS.*=.*\) -lcompat|\1|' db/Makefile mkfs/Makefile
a86cbc2d 175%endif
00d1530a 176
a86cbc2d 177%{__make} clean
00d1530a
JR
178%endif
179
551b0d1f 180%{__autoconf}
1c0f6863 181%configure \
a084b099 182 --sbindir=%{_bindir}\
4ede93fd
AM
183 --enable-gettext \
184 --enable-readline \
528ce8b7 185 --enable-blkid \
0c1d4bf9 186 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \
4ede93fd 187 OPTIMIZER="%{rpmcflags}"
00d1530a 188
4ede93fd 189%{__make} -j1
80ded214
AM
190
191%install
192rm -rf $RPM_BUILD_ROOT
193
df004a70
BZ
194install -d $RPM_BUILD_ROOT%{_libexecdir}
195
9656c3b9
ER
196DIST_ROOT=$RPM_BUILD_ROOT
197DIST_INSTALL=$(pwd)/install.manifest
198DIST_INSTALL_DEV=$(pwd)/install-dev.manifest
59aa30e8 199export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
ff9c0a4e
JB
200
201%{__make} install \
202 DIST_MANIFEST="$DIST_INSTALL"
203%{__make} install-dev \
204 DIST_MANIFEST="$DIST_INSTALL_DEV"
80ded214 205
9656c3b9 206ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libhandle.so.*.*.*) \
ff9c0a4e 207 $RPM_BUILD_ROOT%{_libexecdir}/libhandle.so
0c1d4bf9
JB
208ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxcmd.so.*.*.*) \
209 $RPM_BUILD_ROOT%{_libexecdir}/libxcmd.so
9656c3b9 210ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxfs.so.*.*.*) \
ff9c0a4e 211 $RPM_BUILD_ROOT%{_libexecdir}/libxfs.so
9656c3b9 212ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxlog.so.*.*.*) \
ff9c0a4e 213 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.so
cb190f67 214
51a52578
AM
215mv $RPM_BUILD_ROOT%{_libdir}/lib*.la $RPM_BUILD_ROOT%{_libexecdir}
216mv $RPM_BUILD_ROOT%{_libdir}/lib*.a $RPM_BUILD_ROOT%{_libexecdir}
217
4ede93fd 218%{__sed} -i -e "s|libdir='%{_libdir}'|libdir='%{_libexecdir}'|" \
51a52578 219 $RPM_BUILD_ROOT%{_libexecdir}/lib{handle,xcmd,xfs,xlog}.la
b13dd065
AM
220%{__sed} -i -e "s| %{_libdir}/libxfs.la | %{_libexecdir}/libxfs.la |" \
221 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.la
b756248b 222
a86cbc2d 223%if %{with initrd}
9c0b9403
JR
224install -d $RPM_BUILD_ROOT%{_libexecdir}/initrd
225install initrd/* $RPM_BUILD_ROOT%{_libexecdir}/initrd/
a86cbc2d
JR
226%endif
227
01483858
JB
228%find_lang %{name}
229
5e040522
ER
230rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
231
9656c3b9 232# already in /usr
9656c3b9 233rm -f $RPM_BUILD_ROOT%{_libdir}/libhandle.{a,la,so}
0c1d4bf9 234rm -f $RPM_BUILD_ROOT%{_libdir}/libxcmd.{a,la,so}
9656c3b9 235rm -f $RPM_BUILD_ROOT%{_libdir}/libxfs.{a,la,so}
9656c3b9
ER
236rm -f $RPM_BUILD_ROOT%{_libdir}/libxlog.{a,la,so}
237
80ded214
AM
238%clean
239rm -rf $RPM_BUILD_ROOT
240
c5b3782d 241%post -p /sbin/ldconfig
c7083593
JR
242%postun -p /sbin/ldconfig
243
01483858 244%files -f %{name}.lang
80ded214 245%defattr(644,root,root,755)
636af8bd 246%doc README doc/{CHANGES,CREDITS}
0c1d4bf9
JB
247%attr(755,root,root) %{_sbindir}/fsck.xfs
248%attr(755,root,root) %{_sbindir}/mkfs.xfs
249%attr(755,root,root) %{_sbindir}/xfs_repair
250%attr(755,root,root) %{_bindir}/xfs_*
9656c3b9 251%attr(755,root,root) %{_libdir}/libhandle.so.*.*
423c4374 252%attr(755,root,root) %{_libdir}/libxcmd.so.*.*
9656c3b9
ER
253%attr(755,root,root) %{_libdir}/libxfs.so.*.*
254%attr(755,root,root) %{_libdir}/libxlog.so.*.*
9656c3b9 255%attr(755,root,root) %ghost %{_libdir}/libhandle.so.1
423c4374 256%attr(755,root,root) %ghost %{_libdir}/libxcmd.so.0
9656c3b9
ER
257%attr(755,root,root) %ghost %{_libdir}/libxfs.so.0
258%attr(755,root,root) %ghost %{_libdir}/libxlog.so.0
275db5b4
AM
259%{_mandir}/man5/projects.5*
260%{_mandir}/man5/projid.5*
0c1d4bf9
JB
261%{_mandir}/man5/xfs.5*
262%{_mandir}/man8/fsck.xfs.8*
263%{_mandir}/man8/mkfs.xfs.8*
264%{_mandir}/man8/xfs_*.8*
80ded214
AM
265
266%files devel
267%defattr(644,root,root,755)
0c1d4bf9
JB
268%attr(755,root,root) %{_libexecdir}/libhandle.so
269%attr(755,root,root) %{_libexecdir}/libxcmd.so
270%attr(755,root,root) %{_libexecdir}/libxfs.so
271%attr(755,root,root) %{_libexecdir}/libxlog.so
0c1d4bf9
JB
272%{_libexecdir}/libhandle.la
273%{_libexecdir}/libxcmd.la
274%{_libexecdir}/libxfs.la
275%{_libexecdir}/libxlog.la
353bc53d 276%{_includedir}/xfs
0c1d4bf9
JB
277%{_mandir}/man3/*handle.3*
278%{_mandir}/man3/xfsctl.3*
1c0f6863 279
280%files static
281%defattr(644,root,root,755)
0c1d4bf9
JB
282%{_libexecdir}/libhandle.a
283%{_libexecdir}/libxcmd.a
284%{_libexecdir}/libxfs.a
285%{_libexecdir}/libxlog.a
a86cbc2d
JR
286
287%if %{with initrd}
288%files initrd
289%defattr(644,root,root,755)
9c0b9403
JR
290%attr(755,root,root) %{_libexecdir}/initrd/mkfs.xfs
291%attr(755,root,root) %{_libexecdir}/initrd/xfs_db
292%attr(755,root,root) %{_libexecdir}/initrd/xfs_growfs
293%attr(755,root,root) %{_libexecdir}/initrd/xfs_logprint
294%attr(755,root,root) %{_libexecdir}/initrd/xfs_mdrestore
295%attr(755,root,root) %{_libexecdir}/initrd/xfs_repair
a86cbc2d 296%endif
This page took 0.13429 seconds and 4 git commands to generate.