mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
55 lines
1.3 KiB
Bash
Executable file
55 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# The new package will be saved here
|
|
PACK_DIR=$PWD/doublecmd-release
|
|
|
|
# Temp dir for creating *.tar.xz package
|
|
BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
|
|
|
|
# Save revision number
|
|
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
|
|
|
|
# Read version number
|
|
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
|
|
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
|
|
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
|
|
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
|
|
|
|
# Get libraries
|
|
pushd install
|
|
wget https://github.com/doublecmd/external/raw/main/linux.tar.gz
|
|
tar xzf linux.tar.gz
|
|
rm -f linux.tar.gz
|
|
popd
|
|
|
|
# Set widgetset
|
|
export lcl=gtk3
|
|
|
|
# Set processor architecture
|
|
export CPU_TARGET=$(fpc -iTP)
|
|
|
|
build_doublecmd()
|
|
{
|
|
# Build all components of Double Commander
|
|
./build.sh release
|
|
|
|
# Copy libraries
|
|
cp -a install/linux/lib/$CPU_TARGET/*.so ./
|
|
|
|
# Create *.tar.xz package
|
|
mkdir -p $BUILD_PACK_DIR
|
|
install/linux/install.sh --portable-prefix=$BUILD_PACK_DIR
|
|
pushd $BUILD_PACK_DIR
|
|
# Set run-time library search path
|
|
patchelf --set-rpath '$ORIGIN' doublecmd/doublecmd
|
|
tar -cJf $PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.tar.xz doublecmd
|
|
popd
|
|
|
|
# Clean DC build dir
|
|
./clean.sh
|
|
rm -rf $BUILD_PACK_DIR
|
|
}
|
|
|
|
mkdir -p $PACK_DIR
|
|
|
|
build_doublecmd
|