]> git.pld-linux.org Git - packages/xfsprogs.git/blobdiff - xfsprogs.spec
- static bcond requires new sed
[packages/xfsprogs.git] / xfsprogs.spec
index 1432a7c8ba95904bea5005f37cdf2ec152cd790e..f5fc201da84c65ee0aab06c9e4729bee01fc25c2 100644 (file)
@@ -1,22 +1,27 @@
-# conditional build
-#  --with static
+#
+# Conditional build:
+# _with_static - link statically with -luuid
+#
 Summary:       Tools for the XFS filesystem
 Summary(pl):   Narzêdzia do systemu plików XFS
 Name:          xfsprogs
-Version:       2.3.9
-Release:       1
+Version:       2.5.6
+Release:       2
 License:       GPL
 Group:         Applications/System
-Source0:       ftp://linux-xfs.sgi.com/projects/xfs/download/cmd_tars/%{name}-%{version}.src.tar.gz
+Source0:       ftp://linux-xfs.sgi.com/projects/xfs/download/Release-1.3/cmd_tars/%{name}-%{version}.src.tar.gz
+# Source0-md5: 4b21a904e5511bd97d87484ba403b120
 Patch0:                %{name}-miscfix-v2.patch
 Patch1:                %{name}-install-sh.patch
 Patch2:                %{name}-sharedlibs.patch
+URL:           http://oss.sgi.com/projects/xfs/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: bash
-BuildRequires: libtool
 BuildRequires: e2fsprogs-devel
-URL:           http://oss.sgi.com/projects/xfs/
+%{?_with_static:BuildRequires: e2fsprogs-static}
+BuildRequires: libtool
+%{?_with_static:BuildRequires: sed >= 4.0}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     libxfs1
 
@@ -51,7 +56,7 @@ B-drzewa by uzyska
 Summary:       Header files and libraries to develop XFS software
 Summary(pl):   Pliki nag³ówkowe i biblioteki
 Group:         Development/Libraries
-Requires:       %{name} = %{version}
+Requires:      %{name} = %{version}
 Obsoletes:     libxfs1-devel
 
 %description devel
@@ -66,6 +71,7 @@ operuj
 Summary:       Static XFS software libraries
 Summary(pl):   Biblioteki statyczne do XFS
 Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}
 
 %description static
 Static XFS software libraries.
@@ -83,7 +89,8 @@ Biblioteki statyczne do XFS.
 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}"
 OPTIMIZER="%{rpmcflags}"
 export DEBUG OPTIMIZER
-%{__aclocal}
+rm -f aclocal.m4
+%{__aclocal} -I m4
 %{__autoconf}
 %configure \
        %{!?_with_static:--enable-shared-uuid=yes} \
@@ -99,16 +106,18 @@ DIST_ROOT="$RPM_BUILD_ROOT"
 DIST_INSTALL=`pwd`/install.manifest
 DIST_INSTALL_DEV=`pwd`/install-dev.manifest
 export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
-%{?_with_static:cp include/builddefs include/builddefs.tmp}
-%{?_with_static:sed -e 's/\.lai/.la/' include/builddefs.tmp > include/builddefs}
-%{__make} install DIST_MANIFEST="$DIST_INSTALL"
-%{__make} install-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
+%{?_with_static:sed -i -e 's/\.lai/.la/' include/buildmacros}
+
+%{__make} install \
+       DIST_MANIFEST="$DIST_INSTALL"
+%{__make} install-dev \
+       DIST_MANIFEST="$DIST_INSTALL_DEV"
 
 for man in attr_list_by_handle.3 attr_multi_by_handle.3 \
-           fd_to_handle.3 free_handle.3 fssetdm_by_handle.3 \
-          handle_to_fshandle.3 open_by_handle.3 path_to_fshandle.3 \
-          readlink_by_handle.3; do
-               rm -f $RPM_BUILD_ROOT%{_mandir}/man3/$man
+       fd_to_handle.3 free_handle.3 fssetdm_by_handle.3 \
+       handle_to_fshandle.3 open_by_handle.3 path_to_fshandle.3 \
+       readlink_by_handle.3; do
+               rm -f $RPM_BUILD_ROOT%{_mandir}/man3/$man
                echo ".so path_to_handle.3" \
                        > $RPM_BUILD_ROOT%{_mandir}/man3/$man
 done
@@ -116,10 +125,14 @@ done
 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/xfs_info.8
 echo ".so xfs_growfs.8" > $RPM_BUILD_ROOT%{_mandir}/man8/xfs_info.8
 
-ln -sf %{_libdir}/libhandle.so.1.0.1 $RPM_BUILD_ROOT%{_libexecdir}/libhandle.so
-ln -sf %{_libdir}/libdisk.so.0.0.0 $RPM_BUILD_ROOT%{_libexecdir}/libdisk.so
-ln -sf %{_libdir}/libxfs.so.0.0.0 $RPM_BUILD_ROOT%{_libexecdir}/libxfs.so
-ln -sf %{_libdir}/libxlog.so.0.0.0 $RPM_BUILD_ROOT%{_libexecdir}/libxlog.so
+ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir}; echo libhandle.so.*.*.*) \
+        $RPM_BUILD_ROOT%{_libexecdir}/libhandle.so
+ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir}; echo libdisk.so.*.*.*) \
+       $RPM_BUILD_ROOT%{_libexecdir}/libdisk.so
+ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir}; echo libxfs.so.*.*.*) \
+       $RPM_BUILD_ROOT%{_libexecdir}/libxfs.so
+ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir}; echo libxlog.so.*.*.*) \
+       $RPM_BUILD_ROOT%{_libexecdir}/libxlog.so
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -130,7 +143,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc doc/{CHANGES,CREDITS,README.*}
-%attr(755,root,root) %{_sbindir}*
+%attr(755,root,root) %{_sbindir}/*
 %attr(755,root,root) %{_bindir}/*
 %{!?_with_static:%attr(755,root,root) /lib/lib*.so.*.*}
 %{_mandir}/man[185]/*
@@ -140,7 +153,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/*
 %{_includedir}/disk
 %{_includedir}/xfs
-%{_libexecdir}/*.la
+%{!?_with_static:%{_libexecdir}/*.la}
 %attr(755,root,root) %{_libexecdir}/*.so
 
 %files static
This page took 0.051386 seconds and 4 git commands to generate.