Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Marquardt committed Jan 20, 2025
1 parent 2e6f2e4 commit 969b73f
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build.profile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BUILD_TAG=2135-debug
BUILD_TAG=2.13.5

BUILD_paperless=paperless-ngx-2.13.5

Expand Down Expand Up @@ -58,8 +58,8 @@ BUILD_libtiff=tiff-4.7.0
BUILD_libtiff_SRCURL="https://beehive.molgen.mpg.de/3a0fa4a270a4a192b08913f88d0cfbdd/${BUILD_libtiff}.tar.gz"

# SRCURL="https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.0/libjpeg-turbo-3.1.0.tar.gz"
BUILD_libjpegturbo=libjpeg-turbo-3.1.0
BUILD_libjpegturbo_SRCURL="https://beehive.molgen.mpg.de/ed3fb4bb4cf794898f11a6d30c54b479/${BUILD_libjpegturbo}.tar.gz"
BUILD_libjpegturbo=libjpegturbo-3.1.0
BUILD_libjpegturbo_SRCURL="https://beehive.molgen.mpg.de/ed3fb4bb4cf794898f11a6d30c54b479/libjpeg-turbo-3.1.0.tar.gz"

# gits
BUILD_imagemagick=imagemagick-7.1.1-41
Expand Down
2 changes: 1 addition & 1 deletion buildall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ popd
[ -d "${BUILD_DIR}/${BUILD_redis}" ] || ./redis.build.sh
[ -d "${BUILD_DIR}/${BUILD_python}" ] || ./Python.build.sh
[ -d "${BUILD_DIR}/${BUILD_node}" ] || ./node.build.sh
[ -d "${BUILD_DIR}/${BUILD_libjpegturbo}" ] || ./libjpeg-turbo.build.sh
[ -d "${BUILD_DIR}/${BUILD_libjpegturbo}" ] || ./libjpegturbo.build.sh
[ -d "${BUILD_DIR}/${BUILD_ffmpeg}" ] || ./ffmpeg.build.sh
[ -d "${BUILD_DIR}/${BUILD_libtiff}" ] || ./libtiff.build.sh
[ -d "${BUILD_DIR}/${BUILD_imagemagick}" ] || ./imagemagick.build.sh
Expand Down
3 changes: 3 additions & 0 deletions leptonica.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export PKG_CONFIG_PATH

local _conf=(
--prefix ${PREFIX}
--without-libopenjpeg
--disable-shared
--with-pic
)

./configure "${_conf[@]}"
Expand Down
56 changes: 56 additions & 0 deletions libjpegturbo.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash
{
set -x
set -e
set -u

. build.profile

function B_LIBJPEGTURBO {

SRCURL="${BUILD_libjpegturbo_SRCURL}"

BUILD_PKG=${BUILD_libjpegturbo}

PREFIX="${PREFIX}/${BUILD_PKG}"

mkdir -p "${PREFIX}"

cat >"${PREFIX}"/profile <<-EOF
PATH=${PREFIX}/bin:\$PATH
PKG_CONFIG_PATH=${PROJECT}/${BUILD_PKG}/lib/pkgconfig\${PKG_CONFIG_PATH:+:}\${PKG_CONFIG_PATH:-}
LD_LIBRARY_PATH=${PROJECT}/${BUILD_PKG}/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH:-}
EOF


test -e "${BUILD_PKG}".tar.gz || wget -nv "${SRCURL}" -O "${BUILD_PKG}".tar.gz
test -d "${BUILD_PKG}" || mkdir -pv "${BUILD_PKG}" && tar -xf "${BUILD_PKG}".tar.gz --strip-components=1 -C "${BUILD_PKG}"

pushd "${BUILD_PKG}"

local _conf=(
-DCMAKE_INSTALL_PREFIX=${PREFIX}
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_COLOR_MAKEFILE=OFF
-DCMAKE_VERBOSE_MAKEFILE=ON
)

rm -rf b
mkdir b
pushd b
# PKG_CONFIG_PATH=${PKG_CONFIG_PATH} cmake .. "${_conf[@]}"
cmake .. "${_conf[@]}"
make -j "${NPROC}" install
popd

popd

}

pushd "${BUILD_DIR}"

B_LIBJPEGTURBO

popd

}
1 change: 1 addition & 0 deletions profile.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
. ${PROJECT}/${BUILD_tesseract}/profile
. ${PROJECT}/${BUILD_leptonica}/profile
. ${PROJECT}/${BUILD_libtiff}/profile
. ${PROJECT}/${BUILD_libjpegturbo}/profile
XDG_CACHE_HOME=${XDG_CACHE_HOME}
TMPDIR=${TMPDIR}
Expand Down
4 changes: 1 addition & 3 deletions rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ set -u
set -e

for arg; do
PKG=$arg
PKG=${arg/\.build\.sh/}
eval BT=\$BUILD_$PKG
echo "# $BT"
[ -d "${BUILD_DIR}/${BT}" ] && echo "rm -rf '${BUILD_DIR}/${BT}'"
[ -d "${PREFIX}/${BT}" ] && echo "rm -rf '${PREFIX}/${BT}'"
done


1 change: 1 addition & 0 deletions tesseract.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set -u

. ${PREFIX}/${BUILD_sqlite}/profile
. ${PREFIX}/${BUILD_python}/profile
. ${PREFIX}/${BUILD_libjpegturbo}/profile
. ${PREFIX}/${BUILD_libtiff}/profile
. ${PREFIX}/${BUILD_leptonica}/profile

Expand Down

0 comments on commit 969b73f

Please sign in to comment.