-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Additionally, adding libssl + libsqlite3 as they are usually necessary - Enabling azure pipeline for freebsd again - Pre-baking openssl including cross compile openssl dir - Updating readme
- Loading branch information
1 parent
e88c7b2
commit df306ed
Showing
8 changed files
with
105 additions
and
40 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
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
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,18 @@ | ||
FROM ubuntu:16.04 | ||
|
||
COPY common.sh / | ||
RUN /common.sh | ||
|
||
COPY xargo.sh / | ||
RUN /xargo.sh | ||
|
||
COPY freebsd.sh / | ||
RUN /freebsd.sh i686 | ||
|
||
COPY freebsd-extras.sh / | ||
RUN /freebsd-extras.sh i686 | ||
|
||
ENV CARGO_TARGET_I686_UNKNOWN_FREEBSD_LINKER=i686-unknown-freebsd12-gcc \ | ||
CC_i686_unknown_freebsd=i686-unknown-freebsd12-gcc \ | ||
CXX_i686_unknown_freebsd=i686-unknown-freebsd12-g++ \ | ||
I686_UNKNOWN_FREEBSD_OPENSSL_DIR=/usr/local/i686-unknown-freebsd12/ |
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,18 @@ | ||
FROM ubuntu:16.04 | ||
|
||
COPY common.sh / | ||
RUN /common.sh | ||
|
||
COPY xargo.sh / | ||
RUN /xargo.sh | ||
|
||
COPY freebsd.sh / | ||
RUN /freebsd.sh x86_64 | ||
|
||
COPY freebsd-extras.sh / | ||
RUN /freebsd-extras.sh x86_64 | ||
|
||
ENV CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd12-gcc \ | ||
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd12-gcc \ | ||
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd12-g++ \ | ||
X86_64_UNKNOWN_FREEBSD_OPENSSL_DIR=/usr/local/x86_64-unknown-freebsd12/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,55 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x | ||
set -euo pipefail | ||
|
||
main() { | ||
local arch="${1}" | ||
|
||
local sqlite_ver=2.8.17_5 \ | ||
openssl_ver=1.1.1h,1 \ | ||
target="${arch}-unknown-freebsd12" | ||
|
||
local td | ||
td="$(mktemp -d)" | ||
|
||
mkdir "${td}"/{openssl,sqlite} | ||
|
||
pushd "${td}" | ||
|
||
local bsd_arch= | ||
case "${arch}" in | ||
x86_64) | ||
bsd_arch=amd64 | ||
;; | ||
i686) | ||
bsd_arch=i386 | ||
;; | ||
esac | ||
|
||
# Adding openssl lib | ||
curl --retry 3 -sSfL "https://pkg.freebsd.org/FreeBSD:12:${bsd_arch}/quarterly/All/openssl-${openssl_ver}.txz" -O | ||
tar -C "${td}/openssl" -xJf openssl-${openssl_ver}.txz /usr/local/lib /usr/local/include/ | ||
|
||
# Adding sqlite | ||
curl --retry 3 -sSfL "https://pkg.freebsd.org/FreeBSD:12:${bsd_arch}/quarterly/All/sqlite-${sqlite_ver}.txz" -O | ||
tar -C "${td}/sqlite" -xJf sqlite-${sqlite_ver}.txz /usr/local/lib | ||
|
||
# Copy the linked library | ||
local destdir="/usr/local/${target}" | ||
cp "${td}/openssl/usr/local/lib"/lib{crypto,ssl}.a "${destdir}/lib" | ||
cp "${td}/openssl/usr/local/lib"/lib{crypto,ssl}.so.11 "${destdir}/lib" | ||
cp "${td}/openssl/usr/local/lib"/lib{crypto,ssl}.so "${destdir}/lib" | ||
cp -r "${td}/openssl/usr/local/include" "${destdir}" | ||
cp "${td}/sqlite/usr/local/lib/libsqlite.a" "${destdir}/lib" | ||
cp "${td}/sqlite/usr/local/lib/libsqlite.so.0.8.6" "${destdir}/lib" | ||
cp "${td}/sqlite/usr/local/lib/libsqlite.so" "${destdir}/lib" | ||
|
||
# clean up | ||
popd | ||
|
||
rm -rf "${td}" | ||
rm "${0}" | ||
} | ||
|
||
main "${@}" |
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