Ticket #29917: Portfile.3

File Portfile.3, 2.3 KB (added by anatol (Anatol Pomozov), 13 years ago)

fuse4x kernel extension

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem 1.0
5
6name                fuse4x-kext
7version             0.8.6
8revision            1
9categories          fuse devel
10platforms           macosx
11maintainers         dports
12description         A kernel extension for Fuse4X
13
14long_description    Fuse4X implements a mechanism that makes it possible to  \
15                    implement a fully functional file system in a user-space  \
16                    program on Mac OS X. It aims to be API-compliant with     \
17                    the FUSE (File-system in USErspace) mechanism that        \
18                    originated on Linux.  Therefore, many existing FUSE file  \
19                    systems become readily usable on Mac OS X. The core of    \
20                    Fuse4X is in a dynamically loadable kernel extension.
21
22homepage            http://fuse4x.org/
23license             BSD
24fetch.type          git
25git.url             git://github.com/fuse4x/kext.git
26git.branch          fuse4x_0_8_6
27
28use_configure       no
29build.cmd           xcodebuild
30build.target        build
31
32destroot.violate_mtree yes
33
34post-destroot {
35    xinstall -d ${destroot}/System/Library/Extensions
36    file copy ${worksrcpath}/build/Release/fuse4x.kext ${destroot}/System/Library/Extensions
37    file attributes ${destroot}/System/Library/Extensions/fuse4x.kext -owner root -group wheel -permissions rwxr-xr-x
38}
39
40post-activate {
41    if {[string length [exec kextstat -lb org.fuse4x.kext.fuse4x]] > 0} {
42        # TODO: instead of message below it is beffer to do:
43        # 1) try to unload the kext, if it is successful - we are done
44        # 2) if it still running - it means that fuse4x is still in use
45        #    show the user result of `mount | grep fuse4x` - the list of active fuse4x fs
46        # 3) Ask user either reboot the computer or kill all active filesystems + restart the kext
47
48        ui_msg "********************************************************"
49        ui_msg "*  fuse4x is already loaded. You may need to restart.  *"
50        ui_msg "*  Alternatively, if feeling adventurous, you can run  *"
51        ui_msg "*  `sudo kextunload -b org.fuse4x.kext.fuse4x`  *"
52        ui_msg "********************************************************"
53    }
54}