mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-11-21 08:15:01 -05:00
Add vdfuse
This commit is contained in:
parent
c2ff9ce9c1
commit
d6ff21dcb5
52
src/vdfuse/PKGBUILD
Normal file
52
src/vdfuse/PKGBUILD
Normal file
@ -0,0 +1,52 @@
|
||||
# Maintainer: Muflone http://www.muflone.com/contacts/english/
|
||||
# Contributor: laloch <lalochcz@gmail.com>
|
||||
# Contributor: TDY <tdy@gmx.com>
|
||||
# Contributor: Ivan Shapovalov <intelfx100@gmail.com>
|
||||
|
||||
pkgname=vdfuse
|
||||
pkgver=82a
|
||||
pkgrel=11
|
||||
_headers=svn-47049
|
||||
pkgdesc="A FUSE module for mounting VirtualBox disk images (VDI/VMDK/VHD) on the host"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://forums.virtualbox.org/viewtopic.php?f=26&t=33355"
|
||||
license=('GPL3')
|
||||
depends=('fuse' 'virtualbox' 'virtualbox-sdk')
|
||||
makedepends=('pkgconfig')
|
||||
install="${pkgname}.install"
|
||||
source=("http://ftp.de.debian.org/debian/pool/main/v/virtualbox/virtualbox_4.1.42-dfsg-1+deb7u1.debian.tar.xz"
|
||||
"https://github.com/muflone/virtualbox-includes/archive/${_headers}.tar.gz"
|
||||
"vdautomount"::"http://forums.virtualbox.org/download/file.php?id=2865"
|
||||
"add-typedef-to-PARTITIONING_TYPE_vd.h.patch"
|
||||
"init-VDINTERFACEERROR_vdfuse.c.patch")
|
||||
sha256sums=('54af4a721b6534de5f23f86e6d644d3e5b03383f2d1d90f4dbfeff84bbed47e9'
|
||||
'357d0cc778f33684d158e60acae9478b26256af39b31bed19556c0928f133001'
|
||||
'28b4ce0e0ca72721e0dbbdc776e5c3aa47b160afa8538064497be68da4713493'
|
||||
'98f3a12fd288b650879822655c8c2ead10a630aa9637a186c7289c1f2f015c31'
|
||||
'c4ae283a2f94ac81615c3b3d5f6a3c93d1d03438ee9f1e2520f8e2043b9aa1c0')
|
||||
|
||||
prepare() {
|
||||
[ -d "${srcdir}/includes" ] && rm -rf "${srcdir}/includes" ]
|
||||
cp -r "virtualbox-includes-${_headers}" "${srcdir}/includes"
|
||||
msg2 "Patching sources..."
|
||||
sed -i '1s,python,&2,' "${srcdir}/vdautomount"
|
||||
patch -p1 -i "add-typedef-to-PARTITIONING_TYPE_vd.h.patch"
|
||||
patch -p1 -i "init-VDINTERFACEERROR_vdfuse.c.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "debian/${pkgname}"
|
||||
gcc "${pkgname}.c" -o "${pkgname}" \
|
||||
$(pkg-config --cflags --libs fuse) \
|
||||
-I"${srcdir}/includes" \
|
||||
-Wl,-rpath,/usr/lib/virtualbox/ \
|
||||
/usr/lib/virtualbox/VBoxDD.so \
|
||||
/usr/lib/virtualbox/VBoxDDU.so \
|
||||
-Wall $CFLAGS
|
||||
}
|
||||
|
||||
package() {
|
||||
install -m 755 -d "${pkgdir}/usr/bin"
|
||||
install -m 755 -t "${pkgdir}/usr/bin" \
|
||||
"debian/${pkgname}/${pkgname}" "vdautomount"
|
||||
}
|
16
src/vdfuse/add-typedef-to-PARTITIONING_TYPE_vd.h.patch
Normal file
16
src/vdfuse/add-typedef-to-PARTITIONING_TYPE_vd.h.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- src/virtualbox-includes-20130709/VBox/vd.h 2013-07-09 13:18:10.000000000 +0200
|
||||
+++ src/includes/VBox/vd.h 2013-07-09 13:29:00.628312242 +0200
|
||||
@@ -154,11 +154,11 @@
|
||||
* Auxiliary data structure for difference between GPT and MBR
|
||||
* disks.
|
||||
*/
|
||||
-enum PARTITIONING_TYPE
|
||||
+typedef enum PARTITIONING_TYPE
|
||||
{
|
||||
MBR,
|
||||
GPT
|
||||
-};
|
||||
+} PARTITIONING_TYPE;
|
||||
|
||||
/**
|
||||
* Auxiliary data structure for creating raw disks.
|
20
src/vdfuse/init-VDINTERFACEERROR_vdfuse.c.patch
Normal file
20
src/vdfuse/init-VDINTERFACEERROR_vdfuse.c.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- src/debian/vdfuse/vdfuse.c.orig 2013-03-31 20:28:32.000000000 +0200
|
||||
+++ src/debian/vdfuse/vdfuse.c 2013-07-09 13:31:47.824978337 +0200
|
||||
@@ -126,8 +126,6 @@
|
||||
PVDINTERFACE pVDifs = NULL;
|
||||
VDINTERFACE vdError;
|
||||
VDINTERFACEERROR vdErrorCallbacks = {
|
||||
- .cbSize = sizeof(VDINTERFACEERROR),
|
||||
- .enmInterface = VDINTERFACETYPE_ERROR,
|
||||
.pfnError = vdErrorCallback };
|
||||
|
||||
// Partition table information
|
||||
@@ -270,7 +268,7 @@
|
||||
// *** Open the VDI, parse the MBR + EBRs and connect to the fuse service ***
|
||||
//
|
||||
if (RT_FAILURE(VDInterfaceAdd(&vdError, "VD Error", VDINTERFACETYPE_ERROR,
|
||||
- &vdErrorCallbacks, NULL, &pVDifs)))
|
||||
+ &vdErrorCallbacks, sizeof(vdErrorCallbacks), &pVDifs)))
|
||||
usageAndExit("invalid initialisation of VD interface");
|
||||
if (RT_FAILURE(VDCreate(&vdError, VDTYPE_HDD, &hdDisk)))
|
||||
usageAndExit("invalid initialisation of VD interface");
|
7
src/vdfuse/vdfuse.install
Normal file
7
src/vdfuse/vdfuse.install
Normal file
@ -0,0 +1,7 @@
|
||||
post_install() {
|
||||
echo "+++ Uncomment \"user_allow_other\" in /etc/fuse.conf"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
Loading…
Reference in New Issue
Block a user