]> git.pld-linux.org Git - packages/xfsprogs.git/blobdiff - xfsprogs.spec
- updated
[packages/xfsprogs.git] / xfsprogs.spec
index 4e8a3f9d51cc6f1591b053aea15cd455a10a2b3e..5a3cf122c41cfc50b73ed7f58712be2cec38897c 100644 (file)
@@ -1,27 +1,37 @@
-# conditional build
-#  --with static
+#
+# Conditional build:
+%bcond_with    static          # link statically with \-luuid
+%bcond_with    dynamic_exe     # link executables dynamically with xfs libs
+#
 Summary:       Tools for the XFS filesystem
 Summary(pl):   Narzêdzia do systemu plików XFS
 Name:          xfsprogs
-Version:       2.1.2
+Version:       2.8.3
 Release:       1
-License:       GPL
+License:       LGPL v2.1 (libhandle), GPL v2 (the rest)
 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/cmd_tars/%{name}_%{version}-1.tar.gz
+# Source0-md5: 88703cf432f3e958f15a193e508c0e5c
 Patch0:                %{name}-miscfix-v2.patch
 Patch1:                %{name}-install-sh.patch
+Patch2:                %{name}-sharedlibs.patch
+Patch3:                %{name}-dynamic_exe.patch
+URL:           http://oss.sgi.com/projects/xfs/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: bash
-BuildRequires: e2fsprogs-devel
-URL:           http://oss.sgi.com/projects/xfs/
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: gettext-devel
+BuildRequires: libtool
+BuildRequires: libuuid-devel
+%{?with_static:BuildRequires:  libuuid-static}
+%{?with_static:BuildRequires:  sed >= 4.0}
 Obsoletes:     libxfs1
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sbindir        /sbin
 %define                _bindir         /usr/sbin
-%define                _libdir         /lib
-%define                _libexecdir     /usr/lib
+%define                _libdir         /%{_lib}
+%define                _libexecdir     /usr/%{_lib}
 
 %description
 A set of commands to use the XFS filesystem, including mkfs.xfs.
@@ -49,7 +59,8 @@ 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:      libuuid-devel
+Requires:      %{name} = %{version}-%{release}
 Obsoletes:     libxfs1-devel
 
 %description devel
@@ -64,6 +75,7 @@ operuj
 Summary:       Static XFS software libraries
 Summary(pl):   Biblioteki statyczne do XFS
 Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static XFS software libraries.
@@ -72,22 +84,25 @@ Static XFS software libraries.
 Biblioteki statyczne do XFS.
 
 %prep
-%setup  -q
+%setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%{?with_dynamic_exe:%patch3 -p1}
 
 %build
 DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}"
-OPTIMIZER="%{rpmcflags}"
+OPTIMIZER="%{rpmcflags} -DENABLE_GETTEXT"
 export DEBUG OPTIMIZER
-aclocal
+rm -f aclocal.m4
+%{__aclocal} -I m4
 %{__autoconf}
 %configure \
-       %{!?_with_static:--enable-shared-uuid=yes} \
-       %{?_with_static:--disable-shared --disable-shared-uuid}
+       %{!?with_static:--enable-shared-uuid=yes} \
+       %{?with_static:--disable-shared --disable-shared-uuid}
 
 %{__make} \
-       %{?_with_static:LTLINK='$(LIBTOOL) --mode=link %{__cc} -all-static' LDFLAGS=-static}
+       %{?with_static:LTLINK='$(LIBTOOL) --mode=link %{__cc} -all-static' LDFLAGS=-static}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -96,16 +111,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
@@ -113,18 +130,32 @@ 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}/$(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
+
+%{__sed} -e "s|libdir='%{_libdir}'|libdir='%{_libexecdir}'|" \
+       $RPM_BUILD_ROOT%{_libexecdir}/lib{disk,handle,xfs,xlog}.la
+
+%find_lang %{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post   -p /sbin/ldconfig
+%post  -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
-%files
+%files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc doc/{CHANGES,CREDITS,README.*}
-%attr(755,root,root) %{_sbindir}*
+%doc README doc/{CHANGES,CREDITS}
+%attr(755,root,root) %{_sbindir}/*
 %attr(755,root,root) %{_bindir}/*
-%{!?_with_static:%attr(755,root,root) /lib/lib*.so*}
+%{!?with_static:%attr(755,root,root) /%{_lib}/lib*.so.*.*}
 %{_mandir}/man[185]/*
 
 %files devel
@@ -132,8 +163,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/*
 %{_includedir}/disk
 %{_includedir}/xfs
+%if %{without static}
 %{_libexecdir}/*.la
 %attr(755,root,root) %{_libexecdir}/*.so
+%endif
 
 %files static
 %defattr(644,root,root,755)
This page took 0.119152 seconds and 4 git commands to generate.