%define glfs glfs7
Summary: Linux kernel module for FUSE (Filesystem in Userspace)
Name: dkms-fuse
Version: 2.7.2
Release: 1.%{glfs}
License: GPL
Group: System Environment/Kernel
URL: http://fuse.sourceforge.net/
Source: http://dl.sf.net/fuse/fuse-%{version}.tar.gz
Patch0: fuse-2.7.2-%{glfs}.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
Requires: gcc, make
Requires(post): dkms
Requires(preun): dkms
%description
With FUSE it is possible to implement a fully functional filesystem in a
userspace program. This package contains the FUSE userspace tools to
mount a FUSE filesystem.
%prep
%setup -q -n fuse-%{version}
%patch0 -p1 -b .glfs
# Include glfs version for it to show up when kernel module loads
sed -i 's|2.7.0|2.7.0-%{glfs}|g' configure*
%build
%install
%{__rm} -rf %{buildroot}
%define dkms_name fuse
%define dkms_vers %{version}-%{release}
%define quiet -q
# Kernel module sources install for dkms
%{__mkdir_p} %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/
%{__cp} -a kernel/* %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/
# Configuration for dkms
%{__cat} > %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/dkms.conf << 'EOF'
PACKAGE_NAME=%{dkms_name}
PACKAGE_VERSION=%{dkms_vers}
MAKE[0]="./configure --enable-kernel-module --with-kernel=${kernel_source_dir} && make"
BUILT_MODULE_NAME[0]=fuse
DEST_MODULE_LOCATION[0]=/kernel/drivers/fs/fuse
AUTOINSTALL="YES"
EOF
%clean
%{__rm} -rf %{buildroot}
%post
# Add to DKMS registry
dkms add -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
# Rebuild and make available for the currenty running kernel
dkms build -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
dkms install -m %{dkms_name} -v %{dkms_vers} %{?quiet} --force || :
%preun
# Remove all versions from DKMS registry
dkms remove -m %{dkms_name} -v %{dkms_vers} %{?quiet} --all || :
%files
%defattr(-,root,root,0755)
%{_usrsrc}/%{dkms_name}-%{dkms_vers}/
%changelog
* Sun Dec 30 2007 Matthias Saou 2.7.2-1.glfs7
- Update to 2.7.2 and glfs7 patch.
* Thu Nov 22 2007 Matthias Saou 2.7.0-2.glfs6
- Include glfs6 string in the fuse version to show this is a patched version.
* Wed Nov 21 2007 Matthias Saou 2.7.0-1.glfs6
- Include glusterfs patch.
* Tue Oct 2 2007 Matthias Saou 2.7.0-1
- Update to 2.7.0.
* Thu Feb 22 2007 Matthias Saou 2.6.3-1
- Initial RPM release.