]> git.pld-linux.org Git - packages/anyfs-tools.git/blobdiff - anyfs-tools.spec
- proper kernel-module-build version
[packages/anyfs-tools.git] / anyfs-tools.spec
index 65b5a5157eeece9287a8c4788ce73a6595084c57..d44a97a1deb8947b4ea36278811e3bb4f558f515 100644 (file)
@@ -3,9 +3,12 @@
 # - fix make anyfs_module
 # - make subpackage for libany.a ( -libany or just -static)
 
+#
+# Conditional build:
 %bcond_without dist_kernel     # allow non-distribution kernel
 %bcond_without kernel          # don't build 'any' kernel module
-
+%bcond_without userspace       # don't build userspace utilities
+#
 Summary:       anyfs-tools - a unix-like toolset for recovering and converting filesystems
 Summary(pl.UTF-8):     anyfs-tools - uniksowy zestaw narzędzi do odzyskiwania i konwersji systemów plików
 Name:          anyfs-tools
@@ -16,16 +19,17 @@ Group:              Applications/System
 Source0:       http://dl.sourceforge.net/anyfs-tools/%{name}-%{version}.tar.bz2
 # Source0-md5: c5d13e636b0097386f5aebf4c445d627
 Patch0:                %{name}-DFL_RTEXTSIZE.patch
+Patch1:                %{name}-blksize.patch
 URL:           http://anyfs-tools.sourceforge.net/
 BuildRequires: e2fsprogs-devel >= 1.38
 %if %{with kernel}
-%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.9}
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRequires: rpmbuild(macros) >= 1.379
 %endif
 BuildRequires: libfuse-devel >= 2.5
 BuildRequires: mjpegtools-devel
 BuildRequires: mpeg2dec-devel
-BuildRequires: xfsprogs-devel
+BuildRequires: xfsprogs-devel >= 2.8.11
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -103,9 +107,21 @@ uprawnień do plików. Wszystkie zmiany są wykonywane na zewnętrznej
 tabeli i-węzłów przy odmontowywaniu systemu plików, bez zmiany danych
 na urządzeniu blokowym.
 
+%package devel
+Summary:       Header files for anyfs-tools
+Summary(pl.UTF-8):     Pliki nagłówkowe anyfs-tools
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for anyfs-tools.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe anyfs-tools.
+
 %package -n kernel%{_alt_kernel}-misc-any
-Summary:        AnyFS kernel module
-Summary(pl.UTF-8):      Modul AnyFS
+Summary:        AnyFS Linux kernel module
+Summary(pl.UTF-8):      Moduł jądra Linuksa AnyFS
 Release:        %{_rel}@%{_kernel_ver_str}
 License:        GPL v2
 Group:          Base/Kernel
@@ -119,32 +135,30 @@ Provides:       kernel-misc-any
 %endif
 
 %description -n kernel%{_alt_kernel}-misc-any
-This package contains the AnyFS kernel module.
-
-%package devel
-Summary:       Header files for anyfs-tools
-Summary(pl.UTF-8):     Pliki nagłówkowe anyfs-tools
-Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
-
-%description devel
-Header files for anyfs-tools.
+This package contains the AnyFS Linux kernel module.
 
-%description devel -l pl.UTF-8
-Pliki nagłówkowe anyfs-tools.
+%description -n kernel%{_alt_kernel}-misc-any -l pl.UTF-8
+Ten pakiet zawiera moduł jądra Linuksa AnyFS.
 
 %prep
 %setup -q
 %patch0 -p0
+%patch1 -p0
+
+%if %{with kernel}
 cat > anyfs/Makefile <<'EOF'
 obj-m += any.o
 any-objs := inode.o file.o dir.o namei.o symlink.o
 EOF
+%endif
 
 %build
+%if %{with userspace}
 %configure
 %{__make} libany
 %{__make} progs
+%endif
+
 %if %{with kernel}
 %build_kernel_modules -C anyfs -m any
 %endif
@@ -152,8 +166,10 @@ EOF
 %install
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with userspace}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
+%endif
 
 %if %{with kernel}
 %install_kernel_modules -m anyfs/any -d kernel/fs -n any -s current
@@ -164,6 +180,13 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post -n kernel%{_alt_kernel}-misc-any
+%depmod %{_kernel_ver}
+
+%postun -n kernel%{_alt_kernel}-misc-any
+%depmod %{_kernel_ver}
+
+%if %{with userspace}
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc README THANKS
@@ -174,16 +197,17 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man5/*
 %{_mandir}/man8/*
 %lang(ru) %{_mandir}/ru/man3/*
-%lang(ru) %{_mandir}/ru/man3/*
 %lang(ru) %{_mandir}/ru/man5/*
 %lang(ru) %{_mandir}/ru/man8/*
 
-%if %{with kernel}
-%files -n kernel%{_alt_kernel}-misc-any
+%files devel
 %defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}/kernel/fs/any.ko*
+%{_includedir}/anyfs-tools
 %endif
 
-%files devel
+%if %{with kernel}
+%files -n kernel%{_alt_kernel}-misc-any
 %defattr(644,root,root,755)
-%{_includedir}/anyfs-tools
+/etc/modprobe.d/%{_kernel_ver}/any.conf
+/lib/modules/%{_kernel_ver}/kernel/fs/any-current.ko*
+%endif
This page took 0.481374 seconds and 4 git commands to generate.