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