Skip to content

Commit

Permalink
cpl: +u-misc/build.sh
Browse files Browse the repository at this point in the history
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

cpl: u-misc/build drop imlib2

cpl: misc/build.sh # Build su-exec > su_exec

cpl: misc/build # src/lrz src/lsz

cpl: misc/build rm -f $TARGETPATH/bin/{lrb,lrx,lsb,lsx} #lxb lxx: same with lrz/lsz

s
  • Loading branch information
huapox committed Sep 25, 2024
1 parent 660b905 commit 684fd4f
Showing 1 changed file with 153 additions and 0 deletions.
153 changes: 153 additions & 0 deletions compile/src/u-misc/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
#!/bin/sh
set -e
source /src/common.sh

#
# Build su-exec > su_exec ##gitac: /src/u-misc/build.sh: line 32: syntax error: bad function name
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;
rm -f $TARGETPATH/bin/{lrb,lrx,lsb,lsx} #lxb lxx: same with lrz/lsz

# view
ls -lh /tmp/lrzsz/
# src/lrz src/lsz
xx-verify --static /tmp/lrzsz/src/lrz
xx-verify --static /tmp/lrzsz/src/lsz
}

#
# 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

0 comments on commit 684fd4f

Please sign in to comment.