rpm support
diff --git a/ChangeLog b/ChangeLog
index 28a1ca2..59cc820 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-01-14 Miklos Szeredi <mszeredi@inf.bme.hu>
+
+ * RPM support by Achim Settelmeier
+
2002-01-09 Miklos Szeredi <mszeredi@inf.bme.hu>
* Version 0.95 released
diff --git a/fuse.spec b/fuse.spec
new file mode 100644
index 0000000..fc6ed09
--- /dev/null
+++ b/fuse.spec
@@ -0,0 +1,65 @@
+%define kernelversion %(uname -r)
+%define fusemoduledir /lib/modules/%{kernelversion}/kernel/fs/fuse
+
+Name: fuse
+Version: 0.95
+Release: 1
+Summary: Filesystem in Userspace
+Source: %{name}-%{version}.tar.gz
+Copyright: GPL
+Group: Utilities/System
+URL: http://sourceforge.net/projects/avf
+Buildroot: %{_tmppath}/%{name}-root
+Prefix: /usr
+Packager: Achim Settelmeier <settel@sirlab.de>
+
+%description
+FUSE (Filesystem in Userspace) is a simple interface for userspace
+programs to export a virtual filesystem to the linux kernel. FUSE
+also aims to provide a secure method for non privileged users to
+create and mount their own filesystem implementations.
+
+
+%clean
+case "$RPM_BUILD_ROOT" in *-root) rm -rf $RPM_BUILD_ROOT ;; esac
+
+%prep
+%setup
+%patch -p1
+
+%build
+./configure \
+ --with-kernel=/usr/src/linux-%{kernelversion}\
+ --prefix=%{prefix}
+make
+
+%install
+case "$RPM_BUILD_ROOT" in *-root) rm -rf $RPM_BUILD_ROOT ;; esac
+make install \
+ prefix=$RPM_BUILD_ROOT%{prefix} \
+ fusemoduledir=$RPM_BUILD_ROOT%{fusemoduledir}
+
+# remove binaries form example folder so we can include it
+# as a form of documentation into the package
+make -C example clean
+
+
+%post
+/sbin/depmod -a
+
+%postun
+/sbin/depmod -a
+
+%files
+%defattr(-,root,root)
+%doc README TODO NEWS INSTALL ChangeLog AUTHORS COPYING
+%doc example/
+
+%{fusemoduledir}
+%{prefix}/lib/libfuse.a
+%{prefix}/include/fuse.h
+
+# you want to install fusermount SUID root?
+# Then uncomment the "%attr()"-line in favour of the line after it.
+#%attr(4500,root,root) %{prefix}/bin/fusermount
+%{prefix}/bin/fusermount
diff --git a/kernel/Makefile.am b/kernel/Makefile.am
index 86d0e9f..4c0a17d 100644
--- a/kernel/Makefile.am
+++ b/kernel/Makefile.am
@@ -17,11 +17,11 @@
install-exec-local: fuse.o
$(mkinstalldirs) $(DESTDIR)$(fusemoduledir)
$(INSTALL) -m 644 fuse.o $(DESTDIR)$(fusemoduledir)/fuse.o
- /sbin/depmod -a
+ -/sbin/depmod -a
uninstall-local:
rm -f $(DESTDIR)$(fusemoduledir)/fuse.o
- /sbin/depmod -a
+ -/sbin/depmod -a
clean-local:
rm -f *.o *.s
diff --git a/util/Makefile.am b/util/Makefile.am
index af47297..48f9957 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -5,5 +5,5 @@
fusermount_SOURCES = fusermount.c
install-exec-hook:
- chown root $(DESTDIR)$(bindir)/fusermount
- chmod u+s $(DESTDIR)$(bindir)/fusermount
+ -chown root $(DESTDIR)$(bindir)/fusermount
+ -chmod u+s $(DESTDIR)$(bindir)/fusermount