]>
Commit | Line | Data |
---|---|---|
9c73f04f | 1 | %define kernelversion %(uname -r) |
2 | %define fusemoduledir /lib/modules/%{kernelversion}/kernel/fs/fuse | |
3 | ||
7fb6785c | 4 | %bcond_without dist_kernel # without distribution kernel |
5 | %bcond_without smp # without smp packages | |
6 | ||
9c73f04f | 7 | %define kernelrel %(uname -r | sed -e s/-/_/g) |
7fb6785c | 8 | %define _rel 0.1 |
9 | %define _pre pre2 | |
10 | ||
11 | #fuse is required by siefs package | |
9c73f04f | 12 | |
7fb6785c | 13 | # there is another packet in repo named fuse - zx spectrum emulator -- help |
9c73f04f | 14 | Name: fuse |
7fb6785c | 15 | Version: 1.1 |
16 | Release: 0.%{_pre}.%{_rel}@%{_kernel_ver_str} | |
9c73f04f | 17 | Summary: Filesystem in Userspace |
7fb6785c | 18 | Source0: http://download.sourceforge/avf/%{name}-%{version}-%{pre}.tar.gz |
9c73f04f | 19 | License: GPL |
20 | Group: Applications/System | |
21 | URL: http://sourceforge.net/projects/avf | |
7fb6785c | 22 | %{?with_dist_kernel:BuildRequires: kernel-headers >= 2.4.0 } |
23 | %{?with_dist_kernel:BuildRequires: kernel-source >= 2.4.0 } | |
9c73f04f | 24 | Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | # some parts of this specfile are taken from Ian Pilcher's specfile | |
26 | ||
9c73f04f | 27 | %description |
28 | FUSE (Filesystem in Userspace) is a simple interface for userspace | |
29 | programs to export a virtual filesystem to the linux kernel. FUSE also | |
30 | aims to provide a secure method for non privileged users to create and | |
31 | mount their own filesystem implementations. | |
32 | ||
33 | ||
34 | %clean | |
7fb6785c | 35 | rm -rf $RPM_BUILD_ROOT |
9c73f04f | 36 | |
37 | %prep | |
38 | %setup -q | |
39 | ||
40 | %build | |
41 | # invoke configure with the --with-kernel option in case we attempt to | |
42 | # compile for a different kernel and hope the path is right :-) | |
7fb6785c | 43 | |
44 | #if [ "%{kernelversion}" != $(uname -r) ]; then | |
45 | # for dir in /lib/modules/%{kernelversion}/build \ | |
46 | #%{_kernelsrcdir}-%{kernelversion} \ | |
47 | #%{_prefix}/local/src/linux-%{kernelversion} ; do | |
48 | # if [ -d "$dir" ]; then | |
49 | # WITH_KERNEL="--with-kernel=$dir" | |
50 | # break | |
51 | # fi | |
52 | # done | |
53 | #fi | |
9c73f04f | 54 | |
55 | ./configure \ | |
56 | --prefix=%{_prefix} \ | |
57 | $WITH_KERNEL | |
58 | %{__make} | |
59 | %{__make} check | |
60 | ||
61 | ## Now build the library as a shared object | |
62 | #cd lib | |
63 | #gcc -fPIC -DHAVE_CONFIG_H -I../include -Wall -W -g -O2 -c *.c | |
64 | #gcc -shared -Wl,-soname,libfuse.so.%{major_ver} -o libfuse.so.%{version} *.o | |
65 | #cd .. | |
66 | ||
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
7fb6785c | 70 | |
9c73f04f | 71 | %{__make} install \ |
72 | prefix=$RPM_BUILD_ROOT%{_prefix} \ | |
73 | fusemoduledir=$RPM_BUILD_ROOT%{fusemoduledir} | |
74 | ||
75 | install -d $RPM_BUILD_ROOT%{_prefix}/lib/fuse/example | |
76 | install -s -m 755 example/{fusexmp,hello,null} $RPM_BUILD_ROOT%{_prefix}/lib/fuse/example/ | |
77 | ||
78 | # remove binaries form example folder so we can include it | |
79 | # as a form of documentation into the package | |
80 | %{__make} -C example clean | |
81 | rm -rf example/.deps/ | |
82 | ||
83 | %post | |
84 | /sbin/depmod -aq | |
85 | ||
86 | %preun | |
87 | /sbin/modprobe -r fuse | |
88 | ||
89 | %postun | |
90 | /sbin/depmod -aq | |
91 | ||
92 | ||
93 | ||
94 | %files | |
95 | %defattr(644,root,root,755) | |
96 | %doc README TODO NEWS INSTALL ChangeLog AUTHORS COPYING COPYING.LIB | |
97 | %doc example/ | |
98 | %doc patch/ | |
99 | ||
100 | %{fusemoduledir} | |
101 | %{_prefix}/lib/libfuse.a | |
102 | %{_includedir}/fuse.h | |
103 | %{_prefix}/lib/fuse/ | |
104 | ||
105 | # you want to install fusermount SUID root? | |
106 | # Then uncomment the "%attr()"-line in favour of the line after it. | |
107 | #%attr(4500,root,root) %{prefix}/bin/fusermount | |
108 | %attr(755,root,root) %{_bindir}/fusermount |