Release: captive7
[lufs.git] / lufs.spec.in
index 4c63ca0..d0209f1 100644 (file)
@@ -1,13 +1,13 @@
 Summary:       lufs - Linux Userland File System
 Name:          @PACKAGE@
-Version:       @VERSION@
-Release:       1captive
+Version:       @VERSION_BASE@
+Release:       1@VERSION_EXT@
 License:       GPL
 Group:         Base
-Source0:       @PACKAGE@-@VERSION@.tar.gz
-Patch1:                @PACKAGE@-@VERSION@-captive.patch
+Source0:       @PACKAGE@-@VERSION_BASE@.tar.gz
+Patch1:                @PACKAGE@-@VERSION_BASE@-@VERSION_EXT@.patch
 BuildRequires: autoconf
-BuildRequires: automake
+BuildRequires: automake >= 1.6
 BuildRequires: libtool
 BuildRequires: perl
 Requires:      perl
@@ -19,20 +19,12 @@ sshfs, ftpfs, localfs, locasefs, gvfs, cardfs, cefs, etc.  Lots of other
 "exotic" filesystems are in the planning phase: socketfs, httpfs, freenetfs
 and others.
 
-%package devel
-Summary:       lufs - Linux Userland File System files for filesystems development
-Group:         Development/Base
-Requires:      lufs = %{PACKAGE_VERSION}
-
-%description devel
-Support for development of 3rd party filesystem modules for LUFS - a hybrid
-userspace filesystem framework supporting many filesystems: sshfs, ftpfs,
-localfs, locasefs, gvfs, cardfs, cefs, etc.
-
 %prep
 %setup -q
 
 %patch1 -p1
+# Permissions are not restored by patch(1):
+chmod +x kernel/Linux/prepmod.in
 
 %build
 %{__aclocal}
@@ -40,8 +32,25 @@ localfs, locasefs, gvfs, cardfs, cefs, etc.
 %{__autoheader}
 %{__automake} --add-missing
 %{__autoconf}
+patch configure <<CONFIGURE_SUBST_X_EOF
+--- configure-orig     Wed Aug 20 12:10:37 2003
++++ configure  Wed Aug 20 13:22:51 2003
+@@ -21590,6 +21590,11 @@
+   rm -f \$tmp/stdin
+   if test x"\$ac_file" != x-; then
+     mv \$tmp/out \$ac_file
++    for f in \$ac_file_inputs; do
++      if test -x \$f; then
++        chmod +x \$ac_file
++      fi
++    done
+   else
+     cat \$tmp/out
+     rm -f \$tmp/out
+CONFIGURE_SUBST_X_EOF
 %configure
 %{__make}
+%{__make} -C kernel/Linux/modbin/ modbin
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -51,44 +60,41 @@ rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
 
 %post
-ln -s %{_bindir}/auto.sshfs /etc/auto.sshfs
-ln -s %{_bindir}/auto.ftpfs /etc/auto.ftpfs
-ln -s %{_bindir}/lufsd /sbin/mount.lufs
-depmod -a
-if [ "`lsmod | grep lufs`" ]; then rmmod lufs; fi
-modprobe lufs
+depmod -aq
 
 %preun
-if [ "`lsmod | grep lufs`" ]; then rmmod lufs; fi
+rmmod 2>/dev/null lufs
+rm -f %{_localstatedir}/lib/lufs/*.o
+rm -f %{_localstatedir}/lib/lufs/*.ko
 
 %postun
-depmod -a
-rm -f /etc/auto.sshfs
-rm -f /etc/auto.ftpfs
-rm -f /sbin/mount.lufs
+depmod -aq
 
+# We need 'devel' files for kernel module compilation of the standard package.
 %files
+%defattr(-,root,root)
+%doc NEWS NEWS.captive README TODO AUTHORS Contributors THANKS
+%{_datadir}/lufs
+%{_includedir}/lufs
 %defattr(644,root,root)
 /etc/lufsd.conf
-%{_datadir}/lufs
+%{_libdir}/lib*.la
 %defattr(755,root,root)
 %{_bindir}/lufsd
+%{_bindir}/lufsd-bin
 %{_bindir}/lussh
 %{_bindir}/lufsmount
-%{_bindir}/lufsmnt
 %{_bindir}/auto.sshfs
 %{_bindir}/auto.ftpfs
 %{_libdir}/lib*.so*
 %{_mandir}/man*/lufs*
+%{_localstatedir}/lib/lufs
+/etc/auto.sshfs
+/etc/auto.ftpfs
+/sbin/mount.lufs
 # These are SUID root...
 %defattr(4755,root,root)
-%{_bindir}/lufsmnt-bin
-%{_bindir}/lufsumount
-
-%files devel
-%defattr(644,root,root)
-%{_includedir}/lufs
-%{_libdir}/lib*.la
+%{_bindir}/lufsmnt
 
 %changelog
 * Wed Aug 20 2003 Jan Kratochvil <project-captive@jankratochvil.net>