зеркало из https://github.com/mozilla/hubs-ops.git
Add coturn and dependencies
This commit is contained in:
Родитель
e9c0c23a8c
Коммит
efd55c6a12
|
@ -3,9 +3,15 @@ pkg_origin=mozillareality
|
|||
pkg_maintainer="Mozilla Mixed Reality <mixreality@mozilla.com>"
|
||||
|
||||
pkg_version="4.5.1.1"
|
||||
pkg_source="https://github.com/gfodor/coturn/archive/${pkg_version}.tar.gz"
|
||||
pkg_shasum="a7d1b2f68d744a4778ce5fb266eaa71844a79442d8390d285539592ed1d54000"
|
||||
pkg_source="https://github.com/coturn/coturn/archive/${pkg_version}.tar.gz"
|
||||
pkg_shasum="8eabe4c241ad9a74655d8516c69b1fa3275e020e7f7fca50a6cb822809e7c220"
|
||||
pkg_license=('COTURN')
|
||||
pkg_deps=(
|
||||
mozillareality/openssl
|
||||
mozillareality/libevent
|
||||
core/postgresql-client
|
||||
)
|
||||
|
||||
pkg_build_deps=(
|
||||
core/make
|
||||
core/gcc
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# libevent
|
||||
|
||||
## Maintainers
|
||||
|
||||
* The Habitat Maintainers: <humans@habitat.sh>
|
||||
|
||||
## Type of Package
|
||||
|
||||
Binary package
|
||||
|
||||
## Usage
|
||||
|
||||
*TODO: Add instructions for usage*
|
|
@ -0,0 +1,22 @@
|
|||
pkg_origin=mozillareality
|
||||
pkg_name=libevent
|
||||
pkg_version=2.1.11
|
||||
pkg_maintainer="Mozilla Mixed Reality <mixreality@mozilla.com>"
|
||||
pkg_license=('BSD-3-Clause')
|
||||
pkg_source=https://github.com/${pkg_name}/${pkg_name}/releases/download/release-${pkg_version}-stable/${pkg_name}-${pkg_version}-stable.tar.gz
|
||||
pkg_upstream_url=https://libevent.org
|
||||
pkg_description="The libevent API provides a mechanism to execute a callback function when a specific event occurs \
|
||||
on a file descriptor or after a timeout has been reached. Furthermore, libevent also support callbacks due to \
|
||||
signals or regular timeouts."
|
||||
pkg_shasum=a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d
|
||||
pkg_dirname=${pkg_name}-${pkg_version}-stable
|
||||
pkg_deps=(core/glibc)
|
||||
pkg_build_deps=(core/cacerts core/gcc core/make mozillareality/openssl mozillareality/zlib)
|
||||
pkg_bin_dirs=(bin)
|
||||
pkg_include_dirs=(include)
|
||||
pkg_lib_dirs=(lib)
|
||||
|
||||
do_build() {
|
||||
CFLAGS="${CFLAGS} -O2 -g" CPPFLAGS="${CPPFLAGS} -O2 -g" CXXFLAGS="${CXXFLAGS} -O2 -g" ./configure --prefix=${pkg_prefix}
|
||||
make
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# Habitat package: postgresql-client
|
||||
|
||||
## Description
|
||||
|
||||
This plan provides the client binaries for Postgresql. It can be used both as a client for `core/postgresql` as well as standalone pgsql installations. Just as with `core/postgresql` there are versions that match every point version of Postgres.
|
||||
|
||||
## Usage
|
||||
|
||||
This mostly provides the postgres binaries (`psql`, `createdb`, etc) to other applications, but users can use/test it via
|
||||
`hab pkg exec core/postgresql-client psql <args>`
|
|
@ -0,0 +1,59 @@
|
|||
$pkg_name="postgresql-client"
|
||||
$pkg_origin="core"
|
||||
$pkg_version="9.6.11"
|
||||
$pkg_license=('PostgreSQL')
|
||||
$pkg_upstream_url="https://www.postgresql.org/"
|
||||
$pkg_description="PostgreSQL is a powerful, open source object-relational database system."
|
||||
$pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
|
||||
$pkg_source="https://get.enterprisedb.com/postgresql/postgresql-${pkg_version}-1-windows-x64-binaries.zip"
|
||||
$pkg_shasum="39df7a8212df8ce86ebae7f728cac7327a5e9ab821e351ac623ce33de6ed2b1a"
|
||||
|
||||
$pkg_deps=@(
|
||||
"core/visual-cpp-redist-2013"
|
||||
)
|
||||
|
||||
$pkg_bin_dirs=@("bin")
|
||||
$pkg_include_dirs=@("include")
|
||||
$pkg_lib_dirs=@("lib")
|
||||
|
||||
$server_execs=@(
|
||||
"ecpg.exe"
|
||||
"initdb.exe"
|
||||
"pg_archivecleanup.exe"
|
||||
"pg_controldata.exe"
|
||||
"pg_resetxlog.exe"
|
||||
"pg_rewind.exe"
|
||||
"pg_test_fsync.exe"
|
||||
"pg_test_timing.exe"
|
||||
"pg_upgrade.exe"
|
||||
"pg_xlogdump.exe"
|
||||
)
|
||||
|
||||
$server_includes=@(
|
||||
"informix"
|
||||
"server"
|
||||
)
|
||||
|
||||
function Invoke-Install {
|
||||
Push-Location "pgsql"
|
||||
|
||||
foreach ($dir in @("bin","include","lib")) {
|
||||
Copy-Item $dir "$pkg_prefix" -Recurse -Force
|
||||
}
|
||||
|
||||
Write-Host "Purging unneeded execs"
|
||||
foreach ($unneeded in $server_execs) {
|
||||
$target = "$pkg_prefix\bin\$unneeded"
|
||||
Write-Host "Removing $target"
|
||||
Remove-Item -Path $target -Force
|
||||
}
|
||||
|
||||
Write-Host "Purging Unneeded includes"
|
||||
foreach ($unneeded in $server_includes) {
|
||||
$target = "$pkg_prefix\include\$unneeded"
|
||||
Write-Host "Removing $target"
|
||||
Remove-Item -Path $target -Force -Recurse
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
pkg_name=postgresql-client
|
||||
pkg_version=10.3
|
||||
pkg_origin=mozillareality
|
||||
pkg_maintainer="Mozilla Mixed Reality <mixreality@mozilla.com>"
|
||||
pkg_description="PostgreSQL is a powerful, open source object-relational database system."
|
||||
pkg_upstream_url="https://www.postgresql.org/"
|
||||
pkg_license=('PostgreSQL')
|
||||
pkg_source=https://ftp.postgresql.org/pub/source/v${pkg_version}/postgresql-${pkg_version}.tar.bz2
|
||||
pkg_shasum=6ea268780ee35e88c65cdb0af7955ad90b7d0ef34573867f223f14e43467931a
|
||||
pkg_dirname="postgresql-${pkg_version}"
|
||||
|
||||
pkg_deps=(
|
||||
core/bash
|
||||
core/glibc
|
||||
mozillareality/openssl
|
||||
core/perl
|
||||
core/readline
|
||||
mozillareality/zlib
|
||||
core/libossp-uuid
|
||||
|
||||
# for postgis
|
||||
core/libxml2
|
||||
core/geos
|
||||
core/proj
|
||||
core/gdal
|
||||
)
|
||||
|
||||
pkg_build_deps=(
|
||||
core/coreutils
|
||||
core/gcc
|
||||
core/make
|
||||
|
||||
# for postgis
|
||||
core/perl
|
||||
core/diffutils
|
||||
)
|
||||
|
||||
pkg_bin_dirs=(bin)
|
||||
pkg_include_dirs=(include)
|
||||
pkg_lib_dirs=(lib)
|
||||
|
||||
ext_postgis_version=2.4.4
|
||||
ext_postgis_source=http://download.osgeo.org/postgis/source/postgis-${ext_postgis_version}.tar.gz
|
||||
ext_postgis_filename=postgis-${ext_postgis_version}.tar.gz
|
||||
ext_postgis_shasum=0663efb589210d5048d95c817e5cf29552ec8180e16d4c6ef56c94255faca8c2
|
||||
|
||||
do_before() {
|
||||
ext_postgis_dirname="postgis-${ext_postgis_version}"
|
||||
ext_postgis_cache_path="$HAB_CACHE_SRC_PATH/${ext_postgis_dirname}"
|
||||
}
|
||||
|
||||
do_download() {
|
||||
do_default_download
|
||||
download_file $ext_postgis_source $ext_postgis_filename $ext_postgis_shasum
|
||||
}
|
||||
|
||||
do_verify() {
|
||||
do_default_verify
|
||||
verify_file $ext_postgis_filename $ext_postgis_shasum
|
||||
}
|
||||
|
||||
do_clean() {
|
||||
do_default_clean
|
||||
rm -rf "$ext_postgis_cache_path"
|
||||
}
|
||||
|
||||
do_unpack() {
|
||||
do_default_unpack
|
||||
unpack_file $ext_postgis_filename
|
||||
}
|
||||
|
||||
do_build() {
|
||||
# ld manpage: "If -rpath is not used when linking an ELF
|
||||
# executable, the contents of the environment variable LD_RUN_PATH
|
||||
# will be used if it is defined"
|
||||
CFLAGS="${CFLAGS} -O2 -g" ./configure --disable-rpath \
|
||||
--with-openssl \
|
||||
--prefix="$pkg_prefix" \
|
||||
--with-uuid=ossp \
|
||||
--with-includes="$LD_INCLUDE_PATH" \
|
||||
--with-libraries="$LD_LIBRARY_PATH" \
|
||||
--sysconfdir="$pkg_svc_config_path" \
|
||||
--localstatedir="$pkg_svc_var_path"
|
||||
make world
|
||||
|
||||
# PostGIS can't be built until after postgresql is installed to $pkg_prefix
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make -C src/bin install
|
||||
make -C src/include install
|
||||
make -C src/interfaces install
|
||||
|
||||
# Clean up files needed only for server installs
|
||||
# this shrinks the package by about 60%
|
||||
echo "Purging unneeded execs"
|
||||
for unneeded in "${server_execs[@]}"
|
||||
do
|
||||
target="$pkg_prefix/bin/${unneeded}"
|
||||
echo "rm -f ${target}"
|
||||
rm -f "${target}"
|
||||
done
|
||||
echo "Purging unneeded includes"
|
||||
for unneeded in "${server_includes[@]}"
|
||||
do
|
||||
target="$pkg_prefix/include/${unneeded}"
|
||||
echo "rm -rf ${target}"
|
||||
rm -rf "${target}"
|
||||
done
|
||||
}
|
|
@ -11,10 +11,10 @@ pkg_shasum=6ea268780ee35e88c65cdb0af7955ad90b7d0ef34573867f223f14e43467931a
|
|||
pkg_deps=(
|
||||
core/bash
|
||||
core/glibc
|
||||
core/openssl
|
||||
mozillareality/openssl
|
||||
core/perl
|
||||
core/readline
|
||||
core/zlib
|
||||
mozillareality/zlib
|
||||
core/libossp-uuid
|
||||
|
||||
# for postgis
|
||||
|
@ -78,7 +78,7 @@ do_build() {
|
|||
# ld manpage: "If -rpath is not used when linking an ELF
|
||||
# executable, the contents of the environment variable LD_RUN_PATH
|
||||
# will be used if it is defined"
|
||||
./configure --disable-rpath \
|
||||
CFLAGS="${CFLAGS} -O2 -g" ./configure --disable-rpath \
|
||||
--with-openssl \
|
||||
--prefix="$pkg_prefix" \
|
||||
--with-uuid=ossp \
|
||||
|
@ -105,7 +105,7 @@ do_install() {
|
|||
pushd "$ext_postgis_cache_path" > /dev/null
|
||||
|
||||
build_line "Building ${ext_postgis_dirname}"
|
||||
./configure --prefix="$pkg_prefix"
|
||||
CFLAGS="${CFLAGS} -O2 -g" ./configure --prefix="$pkg_prefix"
|
||||
make
|
||||
|
||||
build_line "Installing ${ext_postgis_dirname}"
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# sqlite
|
||||
|
||||
A software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
|
||||
|
||||
## Maintainers
|
||||
|
||||
* The Habitat Maintainers: <humans@habitat.sh>
|
||||
|
||||
## Type of Package
|
||||
|
||||
Binary package
|
||||
|
||||
## Usage
|
||||
|
||||
*TODO: Add instructions for usage*
|
|
@ -0,0 +1,24 @@
|
|||
pkg_name=sqlite
|
||||
pkg_version=3.31.1
|
||||
pkg_dist_version=3310100
|
||||
pkg_origin=core
|
||||
pkg_license=('Public Domain')
|
||||
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
|
||||
pkg_description="A software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine."
|
||||
pkg_upstream_url=https://www.sqlite.org/
|
||||
pkg_source="https://www.sqlite.org/2020/${pkg_name}-autoconf-${pkg_dist_version}.tar.gz"
|
||||
pkg_filename="${pkg_name}-autoconf-${pkg_dist_version}.tar.gz"
|
||||
pkg_dirname="${pkg_name}-autoconf-${pkg_dist_version}"
|
||||
pkg_shasum=62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae
|
||||
pkg_deps=(
|
||||
core/glibc
|
||||
core/readline
|
||||
)
|
||||
pkg_build_deps=(
|
||||
core/gcc
|
||||
core/make
|
||||
core/coreutils
|
||||
)
|
||||
pkg_lib_dirs=(lib)
|
||||
pkg_include_dirs=(include)
|
||||
pkg_bin_dirs=(bin)
|
|
@ -0,0 +1,6 @@
|
|||
TEST_PKG_VERSION="$(echo "${TEST_PKG_IDENT}" | cut -d/ -f3)"
|
||||
|
||||
@test "Version matches" {
|
||||
result="$(hab pkg exec ${TEST_PKG_IDENT} sqlite3 -version | head -1 | awk '{print $1}')"
|
||||
[ "$result" = "${TEST_PKG_VERSION}" ]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
#/ Usage: test.sh <pkg_ident>
|
||||
#/
|
||||
#/ Example: test.sh core/php/7.2.8/20181108151533
|
||||
#/
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [[ -z "${1:-}" ]]; then
|
||||
grep '^#/' < "${0}" | cut -c4-
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TEST_PKG_IDENT="${1}"
|
||||
export TEST_PKG_IDENT
|
||||
hab pkg install core/bats --binlink
|
||||
hab pkg install "${TEST_PKG_IDENT}"
|
||||
bats "$(dirname "${0}")/test.bats"
|
Загрузка…
Ссылка в новой задаче