Merge pull request #70 from alecmuffett/install-on-freebsd

Install on freebsd
pull/71/head
Alec Muffett 2020-06-09 21:44:16 +01:00 zatwierdzone przez GitHub
commit 524818768f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
14 zmienionych plików z 93 dodań i 22 usunięć

2
eotk
Wyświetl plik

@ -763,7 +763,7 @@ case "$cmd" in
;;
shell) ## run a shell in the eotk PATH environment
env PS1='eotk-env$ ' bash -i
env PS1='eotk-env$ ' ${SHELL:-sh} -i
;;
help|*) ## prints this text

Wyświetl plik

@ -1,5 +1,7 @@
#!/usr/bin/perl -w
# eotk (c) 2017 Alec Muffett
#!/bin/sh
exec perl -wx $0 "$@";
#!perl
# eotk (c) 2017-2020 Alec Muffett
use Data::Dumper;

Wyświetl plik

@ -1,4 +1,7 @@
#!/usr/bin/perl
#!/bin/sh
exec perl -x $0 "$@";
#!perl
# eotk (c) 2017-2020 Alec Muffett
# data structures

Wyświetl plik

@ -1,5 +1,7 @@
#!/usr/bin/perl -w
# eotk (c) 2017 Alec Muffett
#!/bin/sh
exec perl -wx $0 "$@";
#!perl
# eotk (c) 2017-2020 Alec Muffett
if (-t STDIN) { # stderr is already redirected...
if (open(DOTS, ">/dev/tty")) {

Wyświetl plik

@ -1,5 +1,7 @@
#!/usr/bin/perl -w
# eotk (c) 2017 Alec Muffett
#!/bin/sh
exec perl -wx $0 "$@";
#!perl
# eotk (c) 2017-2020 Alec Muffett
use Data::Dumper;

Wyświetl plik

@ -1,4 +1,8 @@
#!/usr/bin/perl -n
#!/bin/sh
exec perl -nx $0 "$@";
#!perl
# eotk (c) 2017-2020 Alec Muffett
next unless /##/o;
s/\s+/ /go;

Wyświetl plik

@ -1,4 +1,7 @@
#!/usr/bin/perl
#!/bin/sh
exec perl -x $0 "$@";
#!perl
# eotk (c) 2017-2020 Alec Muffett
$warning = "(generated)";
$begin = "# ---- BEGIN CODE GENERATED BY $0 ---- -*- awk -*-\n\n";

Wyświetl plik

@ -1,4 +1,7 @@
#!/usr/bin/perl -n
#!/bin/sh
exec perl -nx $0 "$@";
#!perl
# eotk (c) 2017-2020 Alec Muffett
if (/^\s*%\w+(?=[^\w%])/) { # catch "%IF" and similar single-percent typos
print "suspicious expression at $ARGV line $.: $_";

Wyświetl plik

@ -1,5 +1,7 @@
#!/usr/bin/perl
# eotk (c) 2017 Alec Muffett
#!/bin/sh
exec perl -x $0 "$@";
#!perl
# eotk (c) 2017-2020 Alec Muffett
my %known =
(

Wyświetl plik

@ -0,0 +1,50 @@
#!/bin/sh -x
# platform-independent lib.sh
cd `dirname $0` || exit 1
opt_dir=`pwd`
. lib.sh || exit 1
# FreeBSD users: note: you may want to install libzstd to make
# compression go faster; apparently the way that you do this is to do
# something like:
# portsnap fetch && portsnap extract
# cd /usr/ports/archivers/zstd && make install
# If you want to do that before re-running this script, go right
# ahead. Portsnap seems to involve a lot of work, and it complains
# about the `pkg` version of `gmake`, plus it is optional / it is
# possible to carry on without libzstd if you are just experimenting
# with EOTK. Hence I have not yet bothered, but if there is
# sufficient feedback from the FreeBSD community, I might amend the
# `build tor` section to optionally build the `portsnap` version of
# Tor and use that, instead. I have NOT done that so far, because
# when I tried, the port decided to start compiling `docbook` as a
# dependency, and I literally can't even.
# Anyway: so long as recent/latest `tor` is accessible in $PATH, then
# EOTK will be happy.
# platform dependencies
shared_deps="gmake libevent"
echo $0: calling su to satisfy package dependencies
su root -c "pkg install $shared_deps" || exit 1
MAKE=gmake # use GNU make
# build openresty
SetupOpenRestyVars || exit 1
CustomiseVars || exit 1
SetupForBuild || exit 1
ConfigureOpenResty || exit 1
BuildAndCleanup || exit 1
# build tor
SetupTorVars || exit 1
CustomiseVars || exit 1
SetupForBuild || exit 1
ConfigureTor || exit 1
BuildAndCleanup || exit 1
# done
exit 0

Wyświetl plik

@ -1,12 +1,11 @@
#!/bin/sh -x
# platform-independent lib.sh
opt_dir=`dirname $0`
cd `dirname $0` || exit 1
opt_dir=`pwd`
. $opt_dir/lib.sh
. lib.sh || exit 1
# platform dependencies
# https://openresty.org/en/installation.html
shared_deps="
curl
pcre

Wyświetl plik

@ -1,9 +1,9 @@
#!/bin/sh -x
# platform-independent lib.sh
opt_dir=`dirname $0`
cd `dirname $0` || exit 1
opt_dir=`pwd`
. $opt_dir/lib.sh
. lib.sh || exit 1
# platform dependencies
shared_deps="

Wyświetl plik

@ -1,9 +1,9 @@
#!/bin/sh -x
# platform-independent lib.sh
opt_dir=`dirname $0`
cd `dirname $0` || exit 1
opt_dir=`pwd`
. $opt_dir/lib.sh
. lib.sh || exit 1
# platform dependencies
shared_deps="

Wyświetl plik

@ -1,5 +1,6 @@
#!/bin/sh -x
MAKE=make
keyserver="keyserver.ubuntu.com" # standard
CustomiseVars() {
@ -19,8 +20,8 @@ SetupForBuild() {
}
BuildAndCleanup() {
make || exit 1
make install || exit 1
$MAKE || exit 1
$MAKE install || exit 1
cd $opt_dir || exit 1
for x in $tool_link_paths ; do ln -sf "$install_dir/$x" || exit 1 ; done
rm -rf "$tool_tarball" "$tool_sig" "$tool_dir" || exit 1