-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libimobiledevice-glue 1.0.0 (new formula)
- Loading branch information
1 parent
ade33bc
commit 93dff63
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
class LibimobiledeviceGlue < Formula | ||
desc "Library with common system API code for libimobiledevice projects" | ||
homepage "https://libimobiledevice.org/" | ||
url "https://github.com/libimobiledevice/libimobiledevice-glue/releases/download/1.0.0/libimobiledevice-glue-1.0.0.tar.bz2" | ||
sha256 "160a70e2edc318312fc40b6a71f85bfdfabdfba10bcfc5bb6fb40ed95088f4a0" | ||
license "LGPL-2.1-or-later" | ||
head "https://github.com/libimobiledevice/libimobiledevice-glue.git", branch: "master" | ||
|
||
depends_on "autoconf" => :build | ||
depends_on "automake" => :build | ||
depends_on "libtool" => :build | ||
depends_on "pkg-config" => :build | ||
depends_on "libplist" | ||
|
||
def install | ||
if build.head? | ||
system "./autogen.sh", *std_configure_args, "--disable-silent-rules" | ||
else | ||
system "./configure", *std_configure_args, "--disable-silent-rules" | ||
end | ||
system "make", "install" | ||
end | ||
|
||
test do | ||
(testpath/"test.c").write <<~EOS | ||
#include "libimobiledevice-glue/utils.h" | ||
int main(int argc, char* argv[]) { | ||
char *uuid = generate_uuid(); | ||
return 0; | ||
} | ||
EOS | ||
system ENV.cc, "test.c", "-L#{lib}", "-limobiledevice-glue-1.0", "-o", "test" | ||
system "./test" | ||
end | ||
end |