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