File vdfuse.spec of Package vdfuse
#
# spec file for package vdfuse (Version 8.2a)
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: vdfuse
Version: 8.2a
Release: 1
ExclusiveArch: %ix86 x86_64
License: GPLv3
Summary: Application for mounting vdi images
#yes only forum
Url: http://forums.virtualbox.org/viewtopic.php?f=7&t=17574
Group: System/Filesystems
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#no need for kmp to build
#!BuildIgnore: virtualbox-host-kmp virtualbox-kmp kmp(virtualbox) virtualbox-ose-kmp virtualbox-ose-host-kmp kmp(virtualbox-ose)
BuildRequires: fuse-devel
BuildRequires: gcc
BuildRequires: pkg-config
BuildRequires: virtualbox
%define virtualbox_version 4.1.18
#we need includes from virtualbox
Source0: VirtualBox-%{virtualbox_version}-include-only.tar.bz2
#and of cource source code :)
Source1: vdfuse-v82a.c
#script to extract includes from virtualbox sources
Source99: virtualbox-patch-source
%description
This program presents a virtual disk as a Filesystem in User Space (FUSE).
The separate partitions appear as block files Partition1, ... under the mount point.
You can then mount any or all of the partitions as a Loop Device. If you use the
readonly flag then these files are readonly and the partitions themselves can only be mounted readonly.
%prep
%setup -n VirtualBox-%{virtualbox_version}
%build
export LD_LIBRARY_PATH=/usr/lib/virtualbox/
gcc %{SOURCE1} -o %{name} \
`pkg-config --cflags --libs fuse` \
-I./include \
-Wl,-rpath,/usr/lib/virtualbox/ \
%if 0
-Wl,/usr/lib/virtualbox/VBoxDD.so \
-Wl,/usr/lib/virtualbox/VBoxDD2.so \
%endif
-Wl,/usr/lib/virtualbox/VBoxDDU.so \
-Wall %{optflags}
%install
install -d -m 755 %{buildroot}%{_bindir}
install -m 755 -p %{name} %{buildroot}%{_bindir}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%changelog