-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimple-mtpfs.rb
36 lines (29 loc) · 1.22 KB
/
simple-mtpfs.rb
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
require 'formula'
class SimpleMtpfs < Formula
homepage 'http://github.com/phatina/simple-mtpfs'
url 'https://github.com/phatina/simple-mtpfs/archive/simple-mtpfs-0.2.tar.gz'
sha1 '0fa3e2d950aeb633c741af8ae2b3ec0f6efdda71'
head 'https://github.com/phatina/simple-mtpfs.git', :branch => 'master'
depends_on :autoconf
depends_on :automake
depends_on :libtool
depends_on 'pkg-config' => :build
depends_on 'libusb'
depends_on 'libmtp'
depends_on 'osxfuse'
def install
# osxfuse compatible with 2.7.3
#inreplace "configure.ac", "[fuse >= 2.8]", "[fuse >= 2.7.3]"
# correct fuse headers location
inreplace "src/simple-mtpfs-fuse.h", "fuse/fuse", "fuse"
inreplace "src/simple-mtpfs-fuse.cpp", "fuse/fuse_opt", "fuse_opt"
# OSX fdatasync() check is wrong: http://public.kitware.com/Bug/view.php?id=10044
#inreplace "configure.ac", "AC_CHECK_FUNCS([fdatasync])\n", ""
#inreplace "configure.ac", "AC_CHECK_FUNCS([fdatasync])", "test `uname -s` == \"Darwin\" || AC_CHECK_FUNCS([fdatasync])"
system "autoreconf", "-i", "--force"
system "./configure", "--prefix=#{prefix}"
system "make install"
# provide also short alias
bin.install_symlink "simple-mtpfs" => "mtpfs"
end
end