]> git.pld-linux.org Git - packages/xfsprogs.git/blame - xfsprogs.spec
- rel 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
4ede93fd 9Version: 3.0.0
57c43116 10Release: 4
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}" \
a86cbc2d 143 OPTIMIZER="-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
a86cbc2d
JR
149mv -f db/xfs_db initrd-xfs_db
150mv -f growfs/xfs_growfs initrd-xfs_growfs
151mv -f logprint/xfs_logprint initrd-xfs_logprint
152mv -f mkfs/mkfs.xfs initrd-mkfs.xfs
153mv -f mdrestore/xfs_mdrestore initrd-xfs_mdrestore
154mv -f repair/xfs_repair initrd-xfs_repair
155
156%if %{with dietlibc}
00d1530a
JR
157sed -i -e 's|^dnl AC_PACKAGE_NEED_AIO_H|AC_PACKAGE_NEED_AIO_H|' \
158 -e 's|^dnl AC_PACKAGE_NEED_LIO_LISTIO|AC_PACKAGE_NEED_LIO_LISTIO|' \
159 configure.in
a86cbc2d 160sed -i -e 's|^# \(LIBRT.*=.*\)|\1|' include/builddefs.in
00d1530a 161sed -i -e 's|\(^LLDLIBS.*=.*\) -lcompat|\1|' db/Makefile mkfs/Makefile
a86cbc2d 162%endif
00d1530a 163
a86cbc2d 164%{__make} clean
00d1530a
JR
165%endif
166
551b0d1f 167%{__autoconf}
1c0f6863 168%configure \
4ede93fd
AM
169 --enable-gettext \
170 --enable-readline \
0c1d4bf9 171 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \
4ede93fd 172 OPTIMIZER="%{rpmcflags}"
00d1530a 173
4ede93fd 174%{__make} -j1
80ded214
AM
175
176%install
177rm -rf $RPM_BUILD_ROOT
178
9656c3b9
ER
179DIST_ROOT=$RPM_BUILD_ROOT
180DIST_INSTALL=$(pwd)/install.manifest
181DIST_INSTALL_DEV=$(pwd)/install-dev.manifest
59aa30e8 182export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
ff9c0a4e
JB
183
184%{__make} install \
185 DIST_MANIFEST="$DIST_INSTALL"
186%{__make} install-dev \
187 DIST_MANIFEST="$DIST_INSTALL_DEV"
80ded214 188
9656c3b9 189ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libhandle.so.*.*.*) \
ff9c0a4e 190 $RPM_BUILD_ROOT%{_libexecdir}/libhandle.so
9656c3b9 191ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libdisk.so.*.*.*) \
ff9c0a4e 192 $RPM_BUILD_ROOT%{_libexecdir}/libdisk.so
0c1d4bf9
JB
193ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxcmd.so.*.*.*) \
194 $RPM_BUILD_ROOT%{_libexecdir}/libxcmd.so
9656c3b9 195ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxfs.so.*.*.*) \
ff9c0a4e 196 $RPM_BUILD_ROOT%{_libexecdir}/libxfs.so
9656c3b9 197ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxlog.so.*.*.*) \
ff9c0a4e 198 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.so
cb190f67 199
4ede93fd 200%{__sed} -i -e "s|libdir='%{_libdir}'|libdir='%{_libexecdir}'|" \
0c1d4bf9 201 $RPM_BUILD_ROOT%{_libexecdir}/lib{disk,handle,xcmd,xfs,xlog}.la
b13dd065
AM
202%{__sed} -i -e "s| %{_libdir}/libxfs.la | %{_libexecdir}/libxfs.la |" \
203 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.la
b756248b 204
a86cbc2d
JR
205%if %{with initrd}
206install initrd-xfs_db $RPM_BUILD_ROOT%{_sbindir}
207install initrd-xfs_growfs $RPM_BUILD_ROOT%{_sbindir}
208install initrd-xfs_logprint $RPM_BUILD_ROOT%{_sbindir}
209install initrd-mkfs.xfs $RPM_BUILD_ROOT%{_sbindir}
210install initrd-xfs_mdrestore $RPM_BUILD_ROOT%{_sbindir}
211install initrd-xfs_repair $RPM_BUILD_ROOT%{_sbindir}
212%endif
213
01483858
JB
214%find_lang %{name}
215
5e040522
ER
216rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
217
9656c3b9
ER
218# already in /usr
219rm -f $RPM_BUILD_ROOT%{_libdir}/libdisk.{a,la,so}
220rm -f $RPM_BUILD_ROOT%{_libdir}/libhandle.{a,la,so}
0c1d4bf9 221rm -f $RPM_BUILD_ROOT%{_libdir}/libxcmd.{a,la,so}
9656c3b9 222rm -f $RPM_BUILD_ROOT%{_libdir}/libxfs.{a,la,so}
9656c3b9
ER
223rm -f $RPM_BUILD_ROOT%{_libdir}/libxlog.{a,la,so}
224
80ded214
AM
225%clean
226rm -rf $RPM_BUILD_ROOT
227
c5b3782d 228%post -p /sbin/ldconfig
c7083593
JR
229%postun -p /sbin/ldconfig
230
01483858 231%files -f %{name}.lang
80ded214 232%defattr(644,root,root,755)
636af8bd 233%doc README doc/{CHANGES,CREDITS}
0c1d4bf9
JB
234%attr(755,root,root) %{_sbindir}/fsck.xfs
235%attr(755,root,root) %{_sbindir}/mkfs.xfs
236%attr(755,root,root) %{_sbindir}/xfs_repair
237%attr(755,root,root) %{_bindir}/xfs_*
9656c3b9
ER
238%attr(755,root,root) %{_libdir}/libdisk.so.*.*
239%attr(755,root,root) %{_libdir}/libhandle.so.*.*
423c4374 240%attr(755,root,root) %{_libdir}/libxcmd.so.*.*
9656c3b9
ER
241%attr(755,root,root) %{_libdir}/libxfs.so.*.*
242%attr(755,root,root) %{_libdir}/libxlog.so.*.*
243%attr(755,root,root) %ghost %{_libdir}/libdisk.so.0
244%attr(755,root,root) %ghost %{_libdir}/libhandle.so.1
423c4374 245%attr(755,root,root) %ghost %{_libdir}/libxcmd.so.0
9656c3b9
ER
246%attr(755,root,root) %ghost %{_libdir}/libxfs.so.0
247%attr(755,root,root) %ghost %{_libdir}/libxlog.so.0
0c1d4bf9
JB
248%{_mandir}/man5/xfs.5*
249%{_mandir}/man8/fsck.xfs.8*
250%{_mandir}/man8/mkfs.xfs.8*
251%{_mandir}/man8/xfs_*.8*
80ded214
AM
252
253%files devel
254%defattr(644,root,root,755)
0c1d4bf9
JB
255%attr(755,root,root) %{_libexecdir}/libdisk.so
256%attr(755,root,root) %{_libexecdir}/libhandle.so
257%attr(755,root,root) %{_libexecdir}/libxcmd.so
258%attr(755,root,root) %{_libexecdir}/libxfs.so
259%attr(755,root,root) %{_libexecdir}/libxlog.so
260%{_libexecdir}/libdisk.la
261%{_libexecdir}/libhandle.la
262%{_libexecdir}/libxcmd.la
263%{_libexecdir}/libxfs.la
264%{_libexecdir}/libxlog.la
353bc53d 265%{_includedir}/xfs
0c1d4bf9
JB
266%{_mandir}/man3/*handle.3*
267%{_mandir}/man3/xfsctl.3*
1c0f6863 268
269%files static
270%defattr(644,root,root,755)
0c1d4bf9
JB
271%{_libexecdir}/libdisk.a
272%{_libexecdir}/libhandle.a
273%{_libexecdir}/libxcmd.a
274%{_libexecdir}/libxfs.a
275%{_libexecdir}/libxlog.a
a86cbc2d
JR
276
277%if %{with initrd}
278%files initrd
279%defattr(644,root,root,755)
280%attr(755,root,root) %{_sbindir}/initrd-*
281%endif
This page took 0.119704 seconds and 4 git commands to generate.