Prevent pre-building binary modules for regular .tar.gz archive.
[lufs.git] / lufs.spec.in
1 Summary:        lufs - Linux Userland File System
2 Name:           @PACKAGE@
3 Version:        @VERSION_BASE@
4 Release:        1@VERSION_EXT@
5 License:        GPL
6 Group:          Base
7 Source0:        @PACKAGE@-@VERSION_BASE@.tar.gz
8 Patch1:         @PACKAGE@-@VERSION_BASE@-@VERSION_EXT@.patch
9 BuildRequires:  autoconf
10 BuildRequires:  automake >= 1.6
11 BuildRequires:  libtool
12 BuildRequires:  perl
13 Requires:       perl
14 BuildRoot:      /tmp/buildroot-@PACKAGE@-@VERSION@
15
16 %description
17 LUFS is a hybrid userspace filesystem framework supporting many filesystems:
18 sshfs, ftpfs, localfs, locasefs, gvfs, cardfs, cefs, etc.  Lots of other 
19 "exotic" filesystems are in the planning phase: socketfs, httpfs, freenetfs
20 and others.
21
22 %prep
23 %setup -q
24
25 %patch1 -p1
26 # Permissions are not restored by patch(1):
27 chmod +x kernel/Linux/prepmod.in
28
29 %build
30 %{__aclocal}
31 %{__libtoolize} --force
32 %{__autoheader}
33 %{__automake} --add-missing
34 %{__autoconf}
35 patch configure <<CONFIGURE_SUBST_X_EOF
36 --- configure-orig      Wed Aug 20 12:10:37 2003
37 +++ configure   Wed Aug 20 13:22:51 2003
38 @@ -21590,6 +21590,11 @@
39    rm -f \$tmp/stdin
40    if test x"\$ac_file" != x-; then
41      mv \$tmp/out \$ac_file
42 +    for f in \$ac_file_inputs; do
43 +      if test -x \$f; then
44 +        chmod +x \$ac_file
45 +      fi
46 +    done
47    else
48      cat \$tmp/out
49      rm -f \$tmp/out
50 CONFIGURE_SUBST_X_EOF
51 %configure
52 %{__make}
53 %{__make} -C kernel/Linux/modbin/ modbin
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 %{__make} install DESTDIR=$RPM_BUILD_ROOT
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
63 ln -s %{_bindir}/auto.sshfs /etc/auto.sshfs
64 ln -s %{_bindir}/auto.ftpfs /etc/auto.ftpfs
65 ln -s %{_bindir}/lufsd /sbin/mount.lufs
66 depmod -aq
67
68 %preun
69 rmmod 2>/dev/null lufs
70 rm -f %{_localstatedir}/lib/lufs/*.o
71
72 %postun
73 depmod -aq
74 rm -f /etc/auto.sshfs
75 rm -f /etc/auto.ftpfs
76 rm -f /sbin/mount.lufs
77
78 # We need 'devel' files for kernel module compilation of the standard package.
79 %files
80 %defattr(-,root,root)
81 %doc NEWS NEWS.captive README TODO AUTHORS Contributors THANKS
82 %{_datadir}/lufs
83 %{_includedir}/lufs
84 %defattr(644,root,root)
85 /etc/lufsd.conf
86 %{_libdir}/lib*.la
87 %defattr(755,root,root)
88 %{_bindir}/lufsd
89 %{_bindir}/lussh
90 %{_bindir}/lufsmount
91 %{_bindir}/lufsmnt
92 %{_bindir}/auto.sshfs
93 %{_bindir}/auto.ftpfs
94 %{_libdir}/lib*.so*
95 %{_mandir}/man*/lufs*
96 %{_localstatedir}/lib/lufs
97 # These are SUID root...
98 %defattr(4755,root,root)
99 %{_bindir}/lufsmnt-bin
100 %{_bindir}/lufsumount
101
102 %changelog
103 * Wed Aug 20 2003 Jan Kratochvil <project-captive@jankratochvil.net>
104 - rewritten for AutoGen as a support subsystem of Captive project
105
106 * Sun Nov 24 2002 Dave Wilson <dave@...>
107 - initial version