-
Notifications
You must be signed in to change notification settings - Fork 2
/
fuse.spec
94 lines (77 loc) · 2.69 KB
/
fuse.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
%define repo https://github.com/libfuse/libfuse
%define gitname libfuse
%define gitversion %(echo `curl -s %{repo}/releases | grep 'class="css-truncate-target"' | head -1 | tr -d '\\-</span class="css-truncate-target">fuse-'`)
%global revision %(echo `git ls-remote %{repo}.git | head -1 | cut -f 1| cut -c1-7`)
%define rel_version 1
Name: fuse
Version: %{gitversion}
Release: 1.%{?dist}
Summary: File System in Userspace (FUSE) utilities
Group: System Environment/Base
License: GPL+
URL: %{repo}
Source1: %{name}.conf
Requires: autoconf make automake gcc
BuildRequires: libselinux-devel
%description
With FUSE it is possible to implement a fully functional filesystem in a
userspace program. This package contains the FUSE userspace tools to
mount a FUSE filesystem.
%package libs
Summary: File System in Userspace (FUSE) libraries
Group: System Environment/Libraries
License: LGPLv2+
#Conflicts: filesystem < 3
%description libs
Devel With FUSE it is possible to implement a fully functional filesystem in a
userspace program. This package contains the FUSE libraries.
%package devel
Summary: File System in Userspace (FUSE) devel files
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: pkgconfig
License: LGPLv2+
#Conflicts: filesystem < 3
%description devel
With FUSE it is possible to implement a fully functional filesystem in a
userspace program. This package contains development files (headers,
pgk-config) to develop FUSE based applications/filesystems.
%prep
if [ -d %{name}-%{version} ];then
rm -rf %{name}-%{version}
fi
git clone %{repo} %{name}-%{version}
cd %{name}-%{version}
git submodule init
git submodule update
#sed -i 's|mknod|echo Disabled: mknod |g' Makefile.in
sh makeconf.sh
%build
cd %{name}-%{version}
export MOUNT_FUSE_PATH="%{_sbindir}"
CFLAGS="%{optflags} -D_GNU_SOURCE" %configure
make %{?_smp_mflags}
%install
cd %{name}-%{version}
make install DESTDIR=%{buildroot}
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && %__rm -rf $RPM_BUILD_ROOT
[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
[ "%{_builddir}/%{name}-%{version}" != "/" ] && %__rm -rf %{_builddir}/%{name}-%{version}
[ "%{_builddir}/%{name}" != "/" ] && %__rm -rf %{_builddir}/%{name}
%files
%{_sbindir}/*
%{_bindir}/*
%{_sysconfdir}/init.d/*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_mandir}/man1/*
%{_mandir}/man8/*
%files libs
%{_libdir}/*
%files devel
%{_includedir}/*
%changelog