source: trunk/dports/fuse/fusefs/Portfile @ 32055

Last change on this file since 32055 was 32055, checked in by eridius@…, 13 years ago

Fix the message takanori made of my MacFUSE portfiles.
In the future, please don't make changes to my Portfiles without telling me

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 32055 2007-12-14 19:01:31Z eridius@macports.org $
2
3PortSystem 1.0
4PortGroup xcode 1.0
5
6name                fusefs
7version             1.1
8revision            3
9categories          fuse devel
10platforms           darwin
11maintainers         eridius@macports.org
12description         A FUSE-Compliant File System Implementation Mechanism for Mac OS X
13long_description    MacFUSE implements a mechanism that makes it possible to implement \
14                    a fully functional file system in a user-space program on Mac OS X \
15                    (10.4 and above). It aims to be API-compliant with the FUSE \
16                    (File-system in USErspace) mechanism that originated on Linux. \
17                    Therefore, many existing FUSE file systems become readily usable on \
18                    Mac OS X. The core of MacFUSE is in a dynamically loadable kernel extension.
19
20homepage            http://code.google.com/p/macfuse/
21master_sites        macports
22distname            fusefs-${version}
23worksrcdir          fusefs
24checksums           md5 e34f44bcbb43a370a0ef204054276ae4 \
25                    sha1 776a7cf88c82bf63a8f086f086d06fb08a60c860
26
27livecheck.distname  MacFUSE-Core-(.*).dmg
28livecheck.version   10.5-${version}.1
29
30use_bzip2           yes
31
32destroot.violate_mtree yes
33
34xcode.configuration     Release
35xcode.target            fusefs load_fusefs fusefs.fs mount_fusefs
36xcode.build.settings    OBJROOT=build/ SYMROOT=build/
37
38platform darwin 8 {
39    worksrcdir fusefs/10.4
40}
41
42platform darwin 9 {
43    worksrcdir fusefs/10.5
44}
45
46# ensure that user is running OS X 10.4 or higher
47pre-fetch {
48    if {![variant_isset darwin_8] && ![variant_isset darwin_9]} {
49        return -code error "MacFUSE requires at least Mac OS X 10.4 to run"
50    }
51}
52
53destroot {
54    if {[variant_isset darwin_8]} {
55        set sysfsdir ${destroot}/System/Library/Filesystems
56    } else {
57        set sysfsdir ${destroot}/Library/Filesystems
58    }
59    set macfuse_bundle_dir ${sysfsdir}/fusefs.fs
60    set macfuse_support_dir ${macfuse_bundle_dir}/Support
61   
62    set builddir ${worksrcpath}/build/${xcode.configuration}
63   
64    # ensure sysfsdir exists
65    xinstall -d -m 755 -o root -g wheel ${sysfsdir}
66   
67    # copy fusefs.fs
68    file copy -- ${builddir}/fusefs.fs ${macfuse_bundle_dir}
69   
70    # ensure Support dir exists
71    xinstall -d -m 755 -o root -g wheel ${macfuse_support_dir}
72   
73    # copy Support files
74    file copy -- ${builddir}/fusefs.kext ${macfuse_support_dir}/fusefs.kext
75    xinstall -m 4555 ${builddir}/load_fusefs ${macfuse_support_dir}/load_fusefs
76    xinstall ${builddir}/mount_fusefs ${macfuse_support_dir}/mount_fusefs
77   
78    # set permissions
79    fs-traverse file [list ${macfuse_bundle_dir}] {
80        file attributes $file -owner root -group wheel
81    }
82   
83    # copy header files that libfuse needs
84    foreach file [list fuse_ioctl.h fuse_mount.h fuse_param.h fuse_version.h] {
85        file copy -- ${worksrcpath}/common/${file} ${destroot}${prefix}/include/${file}
86    }
87}
88
89post-activate {
90    if {[string length [exec kextstat -lb com.google.filesystems.fusefs]] > 0} {
91        ui_msg "********************************************************"
92        ui_msg "*  fusefs is already loaded. You may need to restart.  *"
93        ui_msg "*  Alternatively, if feeling adventurous, you can run  *"
94        ui_msg "*  `sudo kextunload -b com.google.filesystems.fusefs`  *"
95        ui_msg "********************************************************"
96    }
97}
Note: See TracBrowser for help on using the repository browser.