]> git.pld-linux.org Git - packages/xfsprogs.git/blame - xfsprogs.spec
- up to 3.1.6
[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
1d010a37
AM
9Version: 3.1.6
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
1d010a37 14# Source0-md5: fbd2c1c5abed4b11047bea6ce53bc6e4
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
ef308c8f 125%patch3 -p1
df004a70 126%patch4 -p1
2528905a 127%patch5 -p1
4ede93fd 128
80ded214 129%build
ff9c0a4e 130%{__aclocal} -I m4
00d1530a
JR
131
132%if %{with initrd}
a86cbc2d
JR
133%if %{with dietlibc}
134# dietlibc doesn't have aio.h (and xfsprogs does not need it really)
135# dietlibc has needed librt stuff in libc/libpthread
00d1530a
JR
136sed -i -e 's|^AC_PACKAGE_NEED_AIO_H|dnl AC_PACKAGE_NEED_AIO_H|' \
137 -e 's|^AC_PACKAGE_NEED_LIO_LISTIO|dnl AC_PACKAGE_NEED_LIO_LISTIO|' \
138 configure.in
139sed -i -e 's|\(^LIBRT.*=.*\)|# \1|' include/builddefs.in
140sed -i -e 's|\(^LLDLIBS.*=.*\)|\1 -lcompat|' db/Makefile mkfs/Makefile
a86cbc2d 141%endif
00d1530a
JR
142
143%{__autoconf}
144%configure \
a86cbc2d 145 %{?with_dietlibc:CC="diet %{__cc} -static"} \
a084b099 146 --sbindir=%{_bindir} \
00d1530a
JR
147 --disable-gettext \
148 --disable-readline \
00d1530a 149 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \
1e21e3aa 150 OPTIMIZER="%{rpmcflags} -Wno-deprecated-declarations -Os -D_BSD_SOURCE -D__USE_XOPEN_EXTENDED"
00d1530a 151
4bf87b58 152%{__make} -j1 include libxfs libxlog libxcmd libhandle libdisk \
03dcab3f
JB
153 LIBUUID="%{dietlibdir}/libuuid.a" \
154 V=1
a86cbc2d 155%{__make} -j1 db growfs logprint mkfs mdrestore repair \
4bf87b58 156 LDFLAGS="%{rpmldflags} -all-static" \
03dcab3f
JB
157 LIBUUID="%{dietlibdir}/libuuid.a" \
158 V=1
00d1530a 159
9c0b9403
JR
160mkdir -p initrd
161mv -f db/xfs_db initrd/xfs_db
162mv -f growfs/xfs_growfs initrd/xfs_growfs
163mv -f logprint/xfs_logprint initrd/xfs_logprint
164mv -f mkfs/mkfs.xfs initrd/mkfs.xfs
165mv -f mdrestore/xfs_mdrestore initrd/xfs_mdrestore
166mv -f repair/xfs_repair initrd/xfs_repair
a86cbc2d
JR
167
168%if %{with dietlibc}
00d1530a
JR
169sed -i -e 's|^dnl AC_PACKAGE_NEED_AIO_H|AC_PACKAGE_NEED_AIO_H|' \
170 -e 's|^dnl AC_PACKAGE_NEED_LIO_LISTIO|AC_PACKAGE_NEED_LIO_LISTIO|' \
171 configure.in
a86cbc2d 172sed -i -e 's|^# \(LIBRT.*=.*\)|\1|' include/builddefs.in
00d1530a 173sed -i -e 's|\(^LLDLIBS.*=.*\) -lcompat|\1|' db/Makefile mkfs/Makefile
a86cbc2d 174%endif
00d1530a 175
a86cbc2d 176%{__make} clean
00d1530a
JR
177%endif
178
551b0d1f 179%{__autoconf}
1c0f6863 180%configure \
a084b099 181 --sbindir=%{_bindir}\
4ede93fd
AM
182 --enable-gettext \
183 --enable-readline \
528ce8b7 184 --enable-blkid \
0c1d4bf9 185 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \
4ede93fd 186 OPTIMIZER="%{rpmcflags}"
00d1530a 187
03dcab3f
JB
188%{__make} -j1 \
189 V=1
80ded214
AM
190
191%install
192rm -rf $RPM_BUILD_ROOT
0efa133e 193install -d $RPM_BUILD_ROOT{%{_libexecdir},/etc}
df004a70 194
9656c3b9
ER
195DIST_ROOT=$RPM_BUILD_ROOT
196DIST_INSTALL=$(pwd)/install.manifest
197DIST_INSTALL_DEV=$(pwd)/install-dev.manifest
59aa30e8 198export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
ff9c0a4e
JB
199
200%{__make} install \
201 DIST_MANIFEST="$DIST_INSTALL"
202%{__make} install-dev \
203 DIST_MANIFEST="$DIST_INSTALL_DEV"
80ded214 204
9656c3b9 205ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libhandle.so.*.*.*) \
ff9c0a4e 206 $RPM_BUILD_ROOT%{_libexecdir}/libhandle.so
0c1d4bf9
JB
207ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxcmd.so.*.*.*) \
208 $RPM_BUILD_ROOT%{_libexecdir}/libxcmd.so
9656c3b9 209ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxfs.so.*.*.*) \
ff9c0a4e 210 $RPM_BUILD_ROOT%{_libexecdir}/libxfs.so
9656c3b9 211ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libxlog.so.*.*.*) \
ff9c0a4e 212 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.so
cb190f67 213
51a52578
AM
214mv $RPM_BUILD_ROOT%{_libdir}/lib*.la $RPM_BUILD_ROOT%{_libexecdir}
215mv $RPM_BUILD_ROOT%{_libdir}/lib*.a $RPM_BUILD_ROOT%{_libexecdir}
216
4ede93fd 217%{__sed} -i -e "s|libdir='%{_libdir}'|libdir='%{_libexecdir}'|" \
51a52578 218 $RPM_BUILD_ROOT%{_libexecdir}/lib{handle,xcmd,xfs,xlog}.la
b13dd065
AM
219%{__sed} -i -e "s| %{_libdir}/libxfs.la | %{_libexecdir}/libxfs.la |" \
220 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.la
b756248b 221
a86cbc2d 222%if %{with initrd}
9c0b9403 223install -d $RPM_BUILD_ROOT%{_libexecdir}/initrd
03dcab3f 224install initrd/* $RPM_BUILD_ROOT%{_libexecdir}/initrd
a86cbc2d
JR
225%endif
226
6e781c10
PG
227echo "#10:/mnt/ftp/roman" >> $RPM_BUILD_ROOT/etc/projects
228echo "#ftproman:10" >> $RPM_BUILD_ROOT/etc/projid
229
01483858
JB
230%find_lang %{name}
231
03dcab3f 232%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
5e040522 233
9656c3b9 234# already in /usr
03dcab3f 235%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{handle,xcmd,xfs,xlog}.so
9656c3b9 236
80ded214
AM
237%clean
238rm -rf $RPM_BUILD_ROOT
239
c5b3782d 240%post -p /sbin/ldconfig
c7083593
JR
241%postun -p /sbin/ldconfig
242
01483858 243%files -f %{name}.lang
80ded214 244%defattr(644,root,root,755)
636af8bd 245%doc README doc/{CHANGES,CREDITS}
6e781c10
PG
246%config(noreplace) %verify(not md5 mtime size) /etc/projects
247%config(noreplace) %verify(not md5 mtime size) /etc/projid
0c1d4bf9
JB
248%attr(755,root,root) %{_sbindir}/fsck.xfs
249%attr(755,root,root) %{_sbindir}/mkfs.xfs
250%attr(755,root,root) %{_sbindir}/xfs_repair
251%attr(755,root,root) %{_bindir}/xfs_*
9656c3b9 252%attr(755,root,root) %{_libdir}/libhandle.so.*.*
423c4374 253%attr(755,root,root) %{_libdir}/libxcmd.so.*.*
9656c3b9
ER
254%attr(755,root,root) %{_libdir}/libxfs.so.*.*
255%attr(755,root,root) %{_libdir}/libxlog.so.*.*
9656c3b9 256%attr(755,root,root) %ghost %{_libdir}/libhandle.so.1
423c4374 257%attr(755,root,root) %ghost %{_libdir}/libxcmd.so.0
9656c3b9
ER
258%attr(755,root,root) %ghost %{_libdir}/libxfs.so.0
259%attr(755,root,root) %ghost %{_libdir}/libxlog.so.0
275db5b4
AM
260%{_mandir}/man5/projects.5*
261%{_mandir}/man5/projid.5*
0c1d4bf9
JB
262%{_mandir}/man5/xfs.5*
263%{_mandir}/man8/fsck.xfs.8*
264%{_mandir}/man8/mkfs.xfs.8*
265%{_mandir}/man8/xfs_*.8*
80ded214
AM
266
267%files devel
268%defattr(644,root,root,755)
0c1d4bf9
JB
269%attr(755,root,root) %{_libexecdir}/libhandle.so
270%attr(755,root,root) %{_libexecdir}/libxcmd.so
271%attr(755,root,root) %{_libexecdir}/libxfs.so
272%attr(755,root,root) %{_libexecdir}/libxlog.so
0c1d4bf9
JB
273%{_libexecdir}/libhandle.la
274%{_libexecdir}/libxcmd.la
275%{_libexecdir}/libxfs.la
276%{_libexecdir}/libxlog.la
353bc53d 277%{_includedir}/xfs
0c1d4bf9
JB
278%{_mandir}/man3/*handle.3*
279%{_mandir}/man3/xfsctl.3*
1c0f6863 280
281%files static
282%defattr(644,root,root,755)
0c1d4bf9
JB
283%{_libexecdir}/libhandle.a
284%{_libexecdir}/libxcmd.a
285%{_libexecdir}/libxfs.a
286%{_libexecdir}/libxlog.a
a86cbc2d
JR
287
288%if %{with initrd}
289%files initrd
290%defattr(644,root,root,755)
9c0b9403
JR
291%attr(755,root,root) %{_libexecdir}/initrd/mkfs.xfs
292%attr(755,root,root) %{_libexecdir}/initrd/xfs_db
293%attr(755,root,root) %{_libexecdir}/initrd/xfs_growfs
294%attr(755,root,root) %{_libexecdir}/initrd/xfs_logprint
295%attr(755,root,root) %{_libexecdir}/initrd/xfs_mdrestore
296%attr(755,root,root) %{_libexecdir}/initrd/xfs_repair
a86cbc2d 297%endif
This page took 0.094855 seconds and 4 git commands to generate.