Last active
November 21, 2015 21:14
-
-
Save endobson/14a4a628d9357a854914 to your computer and use it in GitHub Desktop.
Initial Gist
This file contains hidden or 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
| bazel-* |
This file contains hidden or 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
| OPENSSL_HEADERS = [ | |
| "openssl/aes.h", | |
| "openssl/asn1.h", | |
| "openssl/asn1_mac.h", | |
| "openssl/asn1t.h", | |
| "openssl/bio.h", | |
| "openssl/blowfish.h", | |
| "openssl/bn.h", | |
| "openssl/buffer.h", | |
| "openssl/camellia.h", | |
| "openssl/cast.h", | |
| "openssl/cmac.h", | |
| "openssl/cms.h", | |
| "openssl/comp.h", | |
| "openssl/conf.h", | |
| "openssl/conf_api.h", | |
| "openssl/crypto.h", | |
| "openssl/des.h", | |
| "openssl/des_old.h", | |
| "openssl/dh.h", | |
| "openssl/dsa.h", | |
| "openssl/dso.h", | |
| "openssl/dtls1.h", | |
| "openssl/e_os2.h", | |
| "openssl/ebcdic.h", | |
| "openssl/ec.h", | |
| "openssl/ecdh.h", | |
| "openssl/ecdsa.h", | |
| "openssl/engine.h", | |
| "openssl/err.h", | |
| "openssl/evp.h", | |
| "openssl/hmac.h", | |
| "openssl/krb5_asn.h", | |
| "openssl/kssl.h", | |
| "openssl/lhash.h", | |
| "openssl/md4.h", | |
| "openssl/md5.h", | |
| "openssl/modes.h", | |
| "openssl/obj_mac.h", | |
| "openssl/objects.h", | |
| "openssl/ocsp.h", | |
| "openssl/opensslv.h", | |
| "openssl/ossl_typ.h", | |
| "openssl/pem.h", | |
| "openssl/pem2.h", | |
| "openssl/pkcs12.h", | |
| "openssl/pkcs7.h", | |
| "openssl/pqueue.h", | |
| "openssl/rand.h", | |
| "openssl/rc2.h", | |
| "openssl/rc4.h", | |
| "openssl/ripemd.h", | |
| "openssl/rsa.h", | |
| "openssl/safestack.h", | |
| "openssl/seed.h", | |
| "openssl/sha.h", | |
| "openssl/srp.h", | |
| "openssl/srtp.h", | |
| "openssl/ssl.h", | |
| "openssl/ssl2.h", | |
| "openssl/ssl23.h", | |
| "openssl/ssl3.h", | |
| "openssl/stack.h", | |
| "openssl/symhacks.h", | |
| "openssl/tls1.h", | |
| "openssl/ts.h", | |
| "openssl/txt_db.h", | |
| "openssl/ui.h", | |
| "openssl/ui_compat.h", | |
| "openssl/whrlpool.h", | |
| "openssl/x509.h", | |
| "openssl/x509_vfy.h", | |
| "openssl/x509v3.h", | |
| "openssl/opensslconf.h", | |
| ] | |
| genrule( | |
| name = "libssl-deb", | |
| outs = ["libssl.deb"], | |
| srcs = ["@libssl-deb//file"], | |
| cmd = "cp $(location @libssl-deb//file) $@" | |
| ) | |
| genrule( | |
| name = "libssl-archive", | |
| outs = ["libssl.a"] + OPENSSL_HEADERS, | |
| srcs = ["@libssl-deb//file"], | |
| cmd = | |
| "mkdir tmp; cd tmp; " + | |
| "ar -p '../$(location @libssl-deb//file)' data.tar.xz | tar xfz -;" + | |
| "cp usr/lib/x86_64-linux-gnu/libssl.a '../$(location libssl.a)'; " + | |
| "cp usr/lib/x86_64-linux-gnu/libssl.a '../$(location libssl.a)'; " + | |
| "cp usr/include/x86_64-linux-gnu/openssl/opensslconf.h " + | |
| " '../$(location openssl/opensslconf.h)'; " + | |
| "cp usr/include/openssl/*.h ../$$(dirname $(location openssl/aes.h))" | |
| ) | |
| cc_library( | |
| name = "libssl", | |
| srcs = [":libssl.a"] + OPENSSL_HEADERS, | |
| visibility = ["//visibility:public"], | |
| copts = ["-Iinclude"], | |
| ) | |
This file contains hidden or 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
| package(default_visibility = ["//visibility:public"]) | |
| licenses(["notice"]) # BSD/MIT-like license (for zlib) | |
| cc_library( | |
| name = "zlib", | |
| srcs = [ | |
| "adler32.c", | |
| "compress.c", | |
| "crc32.c", | |
| "deflate.c", | |
| "gzclose.c", | |
| "gzlib.c", | |
| "gzread.c", | |
| "gzwrite.c", | |
| "infback.c", | |
| "inffast.c", | |
| "inflate.c", | |
| "inftrees.c", | |
| "trees.c", | |
| "uncompr.c", | |
| "zutil.c", | |
| ], | |
| hdrs = [ | |
| "crc32.h", | |
| "deflate.h", | |
| "gzguts.h", | |
| "inffast.h", | |
| "inffixed.h", | |
| "inflate.h", | |
| "inftrees.h", | |
| "trees.h", | |
| "zconf.h", | |
| "zlib.h", | |
| "zutil.h", | |
| ], | |
| copts = [ | |
| "-Wno-unused-variable", | |
| "-Wno-implicit-function-declaration", | |
| ], | |
| ) | |
This file contains hidden or 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
| git_repository( | |
| name = "grpc", | |
| remote = "https://github.com/grpc/grpc.git", | |
| commit = "507587f84fe3f0f639479fea6b9d7d06cbf452c5", | |
| ) | |
| git_repository( | |
| name = "protobuf", | |
| remote = "https://github.com/google/protobuf.git", | |
| commit = "8162451b727e5abd46ea934a81d44c6ff7e0963e", | |
| ) | |
| http_file( | |
| name = "libssl-deb", | |
| url = "http://http.us.debian.org/debian/pool/main/o/openssl/libssl-dev_1.0.1k-3+deb8u1_amd64.deb", | |
| sha256 = "84dc19b4986f6094d58e6aeafab78d6b4a4dbc1478d9f40c8372b441ae6510db" | |
| ) | |
| new_git_repository( | |
| name = "zlib-repo", | |
| remote = "https://github.com/madler/zlib.git", | |
| commit = "50893291621658f355bc5b4d450a8d06a563053d", | |
| build_file = "BUILD.zlib", | |
| ) | |
| bind( | |
| name = "protobuf_compiler", | |
| actual = "@protobuf//:protoc_lib", | |
| ) | |
| bind( | |
| name = "protobuf_clib", | |
| actual = "@protobuf//:protobuf", | |
| ) | |
| bind( | |
| name = "zlib", | |
| actual = "@zlib-repo//:zlib", | |
| ) | |
| bind( | |
| name = "libssl", | |
| actual = "//:libssl", | |
| ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment