/
Portfile
92 lines (69 loc) · 2.84 KB
/
Portfile
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
# -*- 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
PortSystem 1.0
PortGroup github 1.0
PortGroup python 1.0
PortGroup fuse 1.0
name py-gitfs
github.setup presslabs ${python.rootname} 0.5.2
github.tarball_from archive
revision 0
categories-append devel
platforms {darwin any}
supported_archs noarch
license Apache-2
maintainers nomaintainer
description a FUSE file system that fully integrates with git
long_description ${python.rootname} is {*}${description}. You can mount a \
remote repository’s branch locally, and any subsequent \
changes made to the files will be automatically committed \
to the remote.
homepage https://www.presslabs.com/docs/code/${python.rootname}/
checksums rmd160 965080148fc253fa3b7987b99b920e12f2daa9e7 \
sha256 921e24311e3b8ea3a5448d698a11a747618ee8dd62d5d43a85801de0b111cbf3 \
size 64141
python.versions 39
if {${name} ne ${subport}} {
patchfiles patch-mounter.py.diff \
patch-utils-args.py.diff
post-patch {
reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/gitfs/utils/args.py
}
depends_build-append \
port:py${python.version}-setuptools
depends_lib-append \
port:py${python.version}-atomiclong \
port:py${python.version}-cffi \
port:py${python.version}-fusepy \
port:py${python.version}-pycparser \
port:py${python.version}-pygit2 \
port:py${python.version}-raven \
port:py${python.version}-six
post-activate {
# the default tmp folder from gitfs/utils/args.py
xinstall -d ${prefix}/var/lib/${python.rootname}
}
if {[info exists ::env(USER)]} {
set username $::env(USER)
} else {
set username {$USER}
}
notes "
A simple example of mounting a local “bare” repo:
\$ cd .test.d/
\$ mkdir mnt
\$ gitfs file://${user_home}/Repos/test.git/ mnt/\
-o repo_path=gitclone,fetch_timeout=2,sync_timout=2
Verify with:
\$ mount | grep osxfuse
file://${user_home}/Repos/test.git/ on ${user_home}/.test.d/mnt\
(osxfuse, nodev, nosuid, synchronous, mounted by ${username})
In Finder you'll find the mount, and can unmount it from there as well.
\$ open -R .
- - -
If you find the documentation to be a bit confusing, there are 2 great videos\
(talks) about ${python.rootname} you can watch:
» https://www.youtube.com/watch?v=elA96lMW-gA (~32min)
» https://www.youtube.com/watch?v=mdhZpFp5n80 (~27min)
"
livecheck.type none
}