Patch 'configure' to keep executability of config.status-substed files.
[lufs.git] / lufs.spec.in
1 Summary:        lufs - Linux Userland File System
2 Name:           @PACKAGE@
3 Version:        @VERSION@
4 Release:        1captive
5 License:        GPL
6 Group:          Base
7 Source0:        @PACKAGE@-@VERSION@.tar.gz
8 Patch1:         @PACKAGE@-@VERSION@-captive.patch
9 BuildRequires:  autoconf
10 BuildRequires:  automake
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 %package devel
23 Summary:        lufs - Linux Userland File System files for filesystems development
24 Group:          Development/Base
25 Requires:       lufs = %{PACKAGE_VERSION}
26
27 %description devel
28 Support for development of 3rd party filesystem modules for LUFS - a hybrid
29 userspace filesystem framework supporting many filesystems: sshfs, ftpfs,
30 localfs, locasefs, gvfs, cardfs, cefs, etc.
31
32 %prep
33 %setup -q
34
35 %patch1 -p1
36
37 %build
38 %{__aclocal}
39 %{__libtoolize} --force
40 %{__autoheader}
41 %{__automake} --add-missing
42 %{__autoconf}
43 patch configure <<CONFIGURE_SUBST_X_EOF
44 --- configure-orig      Wed Aug 20 12:10:37 2003
45 +++ configure   Wed Aug 20 13:22:51 2003
46 @@ -21590,6 +21590,11 @@
47    rm -f \$tmp/stdin
48    if test x"\$ac_file" != x-; then
49      mv \$tmp/out \$ac_file
50 +    for f in \$ac_file_inputs; do
51 +      if test -x \$f; then
52 +        chmod +x \$ac_file
53 +      fi
54 +    done
55    else
56      cat \$tmp/out
57      rm -f \$tmp/out
58 CONFIGURE_SUBST_X_EOF
59 %configure
60 %{__make}
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 %{__make} install DESTDIR=$RPM_BUILD_ROOT
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 ln -s %{_bindir}/auto.sshfs /etc/auto.sshfs
71 ln -s %{_bindir}/auto.ftpfs /etc/auto.ftpfs
72 ln -s %{_bindir}/lufsd /sbin/mount.lufs
73 depmod -aq
74
75 %preun
76 rmmod 2>/dev/null lufs
77 rm -f %{_localstatedir}/lib/lufs/lufs.o
78
79 %postun
80 depmod -aq
81 rm -f /etc/auto.sshfs
82 rm -f /etc/auto.ftpfs
83 rm -f /sbin/mount.lufs
84
85 %files
86 %defattr(-,root,root)
87 %{_datadir}/lufs
88 %defattr(644,root,root)
89 /etc/lufsd.conf
90 %defattr(755,root,root)
91 %{_bindir}/lufsd
92 %{_bindir}/lussh
93 %{_bindir}/lufsmount
94 %{_bindir}/lufsmnt
95 %{_bindir}/auto.sshfs
96 %{_bindir}/auto.ftpfs
97 %{_libdir}/lib*.so*
98 %{_mandir}/man*/lufs*
99 %{_localstatedir}/lib/lufs
100 # These are SUID root...
101 %defattr(4755,root,root)
102 %{_bindir}/lufsmnt-bin
103 %{_bindir}/lufsumount
104
105 %files devel
106 %defattr(-,root,root)
107 %{_includedir}/lufs
108 %defattr(644,root,root)
109 %{_libdir}/lib*.la
110
111 %changelog
112 * Wed Aug 20 2003 Jan Kratochvil <project-captive@jankratochvil.net>
113 - rewritten for AutoGen as a support subsystem of Captive project
114
115 * Sun Nov 24 2002 Dave Wilson <dave@...>
116 - initial version