Skip to content

Instantly share code, notes, and snippets.

@mountcedar
Last active February 19, 2016 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mountcedar/e34e8efd9430645b2d6a to your computer and use it in GitHub Desktop.
Save mountcedar/e34e8efd9430645b2d6a to your computer and use it in GitHub Desktop.
Homebrewで自作のプロジェクト(ライブラリ)を公開する ref: http://qiita.com/mountcedar/items/f10161d4e483aa8c1283
$ brew tap hogehoge/homebrew-<XXX>
$ cd `brew prefix`/Library/Taps/hogehoge/homebrew-<XXX>
libhoge
└── 0.0.1
├── INSTALL_RECEIPT.json
├── LICENSE
├── include
│   └── libhoge.h
└── lib
├── libhoge.dylib
└── pkgconfig
└── libhoge.pc
$ brew install libhoge -vd
BuildError: Failed executing: cmake .
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:
$ brew install libhoge —env=std
$ brew install libhoge -vd
BuildError: Failed executing: cmake .
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:
$ brew create http://hogehoge.com/path/to/libhoge.tar.gz
$ openssl sha1 libhoge.tar.gz
$ cd `brew prefix`/Library/Taps/hogehoge/homebrew-<XXX>
$ git add —all
$ git commit -a -m "initial import"
$ git push
$ brew untap hogehoge/homebrew-<XXX>
$ brew tap hogehoge/homebrew-<XXX>
$ brew install libhoge
<package_name>-<version>.<osx name>.bottle.tar.gz
libhoge-0.0.1.yosemite.bottle.tar.gz
"HEAD": "",
"built_as_bottle": true,
"compiler": "gcc",
"poured_from_bottle": true,
"stdlib": null,
"tapped_from": “<tap名>”,
"time": 0,
"unused_options": [],
"used_options": []
}
def install
ENV['PKG_CONFIG_PATH'] = '/usr/local/lib/pkgconfig'
system "cmake", "."
system "make", "install"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment