forked from ginhom/dnscrypt-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsys2-win32.sh
executable file
·33 lines (27 loc) · 1012 Bytes
/
msys2-win32.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh
export CFLAGS="-Os -m32 -march=pentium2 -mtune=nocona"
export PREFIX="$(pwd)/dnscrypt-proxy-win32"
export MINGW_PREFIX='/mingw32'
export SODIUM_PREFIX='/tmp/libsodium-win32'
export CPPFLAGS="-I${SODIUM_PREFIX}/include"
export LDFLAGS="-L${SODIUM_PREFIX}/lib"
./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" \
--host=i686-w64-mingw32 \
--sbindir="${PREFIX}/bin" \
--enable-plugins \
--with-included-ltdl && \
make install-strip
rm -fr "${PREFIX}/share"
rm -fr "${PREFIX}/lib/pkgconfig"
mv "${PREFIX}/lib/dnscrypt-proxy" "${PREFIX}/plugins/"
rm -fr "${PREFIX}/lib"
cp "${MINGW_PREFIX}/bin/libwinpthread-1.dll" "${PREFIX}/bin/"
cp "${MINGW_PREFIX}/bin/libgcc_s_dw2-1.dll" "${PREFIX}/bin/"
cp "${MINGW_PREFIX}/bin/libldns-1.dll" "${PREFIX}/bin/"
cp "${SODIUM_PREFIX}/bin/libsodium-13.dll" "${PREFIX}/bin/"
cp dnscrypt-resolvers.csv "${PREFIX}/bin/"
if false; then
upx --best --ultra-brute "${PREFIX}/dnscrypt-proxy.exe" &
upx --best --ultra-brute "${PREFIX}/hostip.exe"
wait
fi