-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpl: u-misc lrzsz> autoconf cpl: misc/build \cp -a /tmp/n2n/edge /tmp/n2n/supernode $TARGETPATH/bin/ cpl: mis/build # make install; #--prefix不生效; mkdir
- Loading branch information
Showing
1 changed file
with
175 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
#!/bin/sh | ||
set -e | ||
source /src/common.sh | ||
|
||
IMLIB2_VER=1.7.4 | ||
IMLIB2_URL=https://master.dl.sourceforge.net/project/enlightenment/imlib2-src/${IMLIB2_VER}/imlib2-${IMLIB2_VER}.tar.gz | ||
function imlib2(){ | ||
apk add xorg-server-dev | ||
|
||
# | ||
mkdir -p /tmp/imlib2 | ||
log "Downloading imlib2..." | ||
# curl -# -L -f ${IMLIB2_URL} | tar -xJ --strip 1 -C /tmp/imlib2 | ||
down_catfile ${IMLIB2_URL} | tar -zx --strip 1 -C /tmp/imlib2 | ||
cd /tmp/imlib2 | ||
# export LDFLAGS="-Wl,--as-needed -Wl,--strip-all" #去-static: 无a库生成 | ||
export LDFLAGS="-static -Wl,--strip-all -Wl,--as-needed" | ||
# ./configure; | ||
./configure --with-x \ | ||
--x-includes=/usr/include/X11 --x-libraries=/usr/lib/ ; | ||
# make; make install; | ||
|
||
log "Compiling imlib2..." | ||
make | ||
|
||
log "Installing imlib2..." | ||
make install | ||
} | ||
|
||
# | ||
# Build su-exec | ||
function su-exec(){ | ||
log "Downloading SU-EXEC..." | ||
rm -rf /tmp/su-exec; # mkdir -p /tmp/su-exec | ||
# branch="--branch=$XLUNCH_VER" | ||
repo=https://gitee.com/g-system/fk-su-exec | ||
git clone --depth=1 $branch $repo /tmp/su-exec #; | ||
log "Configuring SU-EXEC..." | ||
cd /tmp/su-exec #&& ./bootstrap; | ||
# ./configure --enable-static --prefix=$TARGETPATH ##无./configure|autoconf | ||
|
||
# make | ||
make su-exec-static | ||
|
||
log "Install SU-EXEC..." | ||
# make install; #Makefile:无install定义; | ||
mkdir -p $TARGETPATH/bin/ | ||
\cp -a su-exec-static $TARGETPATH/bin/su-exec | ||
|
||
# view | ||
ls -lh /tmp/su-exec/ | ||
xx-verify --static /tmp/su-exec/su-exec-static | ||
} | ||
|
||
# | ||
# Build lrzsz | ||
# export TARGETPATH=/usr/local/static/misc | ||
function lrzsz(){ | ||
log "Downloading LRZSZ..." | ||
rm -rf /tmp/lrzsz; # mkdir -p /tmp/lrzsz | ||
# branch="--branch=$LRZSZ_VER" | ||
repo=https://gitee.com/g-system/fk-lrzsz | ||
git clone --depth=1 $branch $repo /tmp/lrzsz #; | ||
log "Configuring LRZSZ..." | ||
cd /tmp/lrzsz #&& ./bootstrap; | ||
autoconf | ||
# ./configure --enable-static --prefix=$TARGETPATH ##无./configure|autoconf | ||
./configure --enable-static --disable-shared --without-libintl-prefix --prefix=$TARGETPATH #ref src/fluxbox/build.sh | ||
|
||
# make | ||
# make LDFLAGS="-static" #无效 依旧dyn | ||
make #OK | ||
|
||
log "Install LRZSZ..." | ||
# make; | ||
make install; | ||
|
||
# view | ||
ls -lh /tmp/lrzsz/ | ||
xx-verify --static /tmp/lrzsz/lrzsz | ||
} | ||
|
||
# | ||
# Build n2n | ||
function n2n(){ | ||
apk add zstd-static | ||
|
||
log "Downloading N2N..." | ||
rm -rf /tmp/n2n; # mkdir -p /tmp/n2n | ||
# branch="--branch=$N2N_VER" | ||
repo=https://gitee.com/g-system/fk-lucktu-n2n | ||
git clone --depth=1 $branch $repo /tmp/n2n #; | ||
log "Configuring N2N..." | ||
cd /tmp/n2n #&& ./bootstrap; | ||
bash autogen.sh | ||
./configure --enable-static --prefix=$TARGETPATH ##无./configure|autoconf | ||
|
||
# make | ||
make LDFLAGS="-static" | ||
|
||
log "Install N2N..." | ||
# make; | ||
# make install; #--prefix不生效; | ||
# /tmp/n2n # make install | ||
# echo "MANDIR=/usr/share/man" | ||
# MANDIR=/usr/share/man | ||
# mkdir -p /usr/sbin /usr/share/man/man1 /usr/share/man/man7 /usr/share/man/man8 | ||
# install -m755 supernode /usr/sbin/ | ||
# install -m755 edge /usr/sbin/ | ||
# install -m644 edge.8.gz /usr/share/man/man8/ | ||
# install -m644 supernode.1.gz /usr/share/man/man1/ | ||
# install -m644 n2n.7.gz /usr/share/man/man7/ | ||
# make -C tools install | ||
# make[1]: Entering directory '/tmp/n2n/tools' | ||
# Makefile:40: warning: ignoring prerequisites on suffix rule definition | ||
# install -m755 n2n-benchmark /usr/sbin/ | ||
# make[1]: Leaving directory '/tmp/n2n/tools' | ||
mkdir -p $TARGETPATH/sbin/ $TARGETPATH/share/man/{man1,man7,man8}/ | ||
# \cp -a /tmp/n2n/edge /tmp/n2n/supernode $TARGETPATH/sbin/ | ||
install -m755 supernode $TARGETPATH/sbin/ | ||
install -m755 edge $TARGETPATH/sbin/ | ||
install -m644 supernode.1.gz $TARGETPATH/share/man/man1/ | ||
install -m644 n2n.7.gz $TARGETPATH/share/man/man7/ | ||
install -m644 edge.8.gz $TARGETPATH/share/man/man8/ | ||
install -m755 tools/n2n-benchmark $TARGETPATH/sbin/ | ||
|
||
# view | ||
ls -lh /tmp/n2n/ | ||
xx-verify --static /tmp/n2n/edge | ||
xx-verify --static /tmp/n2n/supernode | ||
} | ||
|
||
# | ||
# Build tinc | ||
function tinc(){ | ||
apk add lzo-dev openssl-dev texinfo openssl-libs-static | ||
|
||
log "Downloading TINC..." | ||
rm -rf /tmp/tinc; # mkdir -p /tmp/tinc | ||
# branch="--branch=$TINC_VER" | ||
repo=https://gitee.com/g-system/fk-tinc | ||
git clone --depth=1 $branch $repo /tmp/tinc #; | ||
log "Configuring TINC..." | ||
cd /tmp/tinc #&& ./bootstrap; | ||
autoreconf -if | ||
./configure --enable-static --prefix=$TARGETPATH ##无./configure|autoconf | ||
|
||
# make | ||
make LDFLAGS="-static" | ||
|
||
log "Install TINC..." | ||
# make; | ||
make install; | ||
|
||
# view | ||
ls -lh /tmp/tinc/ | ||
xx-verify --static /tmp/tinc/src/tincd | ||
} | ||
|
||
|
||
|
||
case "$1" in | ||
cache) | ||
echo doCache; | ||
# down_catfile ${IMLIB2_URL} > /dev/null | ||
;; | ||
full) | ||
imlib2 | ||
lrzsz | ||
;; | ||
*) #compile | ||
oneBuild $1 | ||
;; | ||
esac | ||
exit 0 |