0 #!/bin/sh

1 mkdir include

2 mkdir build

3 cd build

4 git clone https://github.com/termbox/termbox2.git

5 git clone https://github.com/nothings/stb.git

6 cp termbox2/termbox.h ../include/

7 cp stb/stb_image.h ../include/

8 # No need to on OpenBSD

9 if [ "$(uname)" != OpenBSD ] ;

10 then

11 mkdir ../lib

12 download=fetch

13 if ! hash $download 2>/dev/null; then

14 download=wget

15 fi

16 if ! hash $download 2>/dev/null; then

17 download=curl

18 if ! hash $download 2>/dev/null; then

19 echo "No download program found"

20 exit

21 fi

22 download="curl -O"

23 fi

24 $download https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.3.tar.gz

25 tar -zxf libressl-3.5.3.tar.gz

26 cd libressl-3.5.3

27 ./configure

28 make -j 4

29 cp include/*.h ../../include/

30 cp -R include/compat ../../include/

31 cp -R include/openssl ../../include/

32 cp tls/.libs/libtls.a ../../lib

33 cp crypto/.libs/libcrypto.a ../../lib

34 cp ssl/.libs/libssl.a ../../lib

35 cd ../../

36 else

37 cd ../

38 fi

39 make

40