| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
8年前发布

C语言的包管理器:clib

clib是C语言的包管理器。

Installation

Expects libcurl to be installed and linkable.

With homebrew:

$ brew install clib

With git:

$ git clone https://github.com/clibs/clib.git /tmp/clib  $ cd /tmp/clib  $ make install

Ubuntu:

# install libcurl  $ sudo apt-get install libcurl4-gnutls-dev -qq  # clone  $ git clone https://github.com/clibs/clib.git /tmp/clib && cd /tmp/clib  # build  $ make  # put on path  $ sudo make install

About

Basically the lazy-man's copy/paste promoting smaller C utilities, also serving as a nice way to discover these sort of libraries. From my experience C libraries are scattered all over the web and discovery is relatively poor. The footprint of these libraries is usually quite large and unfocused. The goal ofclibsis to provide stand-alone "micro" C libraries for developers to quickly install without coupling to large frameworks.

You should useclib(1)to fetch these files for you and check them into your repository, the end-user and contributors should not require havingclib(1)installed. This allows clib(1) to fit into any new or existing C workflow without friction.

The wiki listing of packages acts as the "registry" and populates theclib-search(1)results.

Usage

clib <command> [options]      Options:        -h, --help     Output this message      -v, --version  Output version information      Commands:        install [name...]  Install one or more packages      search [query]     Search for packages      help <cmd>         Display help for cmd

Examples

Install a few dependencies to./deps:

$ clib install clibs/ms clibs/commander

Install them to./srcinstead:

$ clib install clibs/ms clibs/commander -o src

When installing libraries from theclibsorg you can omit the name:

$ clib install ms file hash

Install some executables:

$ clib install visionmedia/mon visionmedia/every visionmedia/watch

package.json

Example of a package.json explicitly listing the source:

{    "name": "term",    "version": "0.0.1",    "repo": "clibs/term",    "description": "Terminal ansi escape goodies",    "keywords": ["terminal", "term", "tty", "ansi", "escape", "colors", "console"],    "license": "MIT",    "src": ["src/term.c", "src/term.h"]  }

Example of a package.json for an executable:

{    "name": "mon",    "version": "1.1.1",    "repo": "visionmedia/mon",    "description": "Simple process monitoring",    "keywords": ["process", "monitoring", "monitor", "availability"],    "license": "MIT",    "install": "make install"  }

See explanation of package.json for more details.

项目主页:http://www.open-open.com/lib/view/home/1449385330251

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1449385330251.html
clib C/C++开发