diff --git a/.gitignore b/.gitignore index 4d2bc14..7a08b92 100644 --- a/.gitignore +++ b/.gitignore @@ -5,12 +5,16 @@ /leptonica-* /nginx-* /node-* +/pngquant-* /sqlite-* /tessconfigs /tessdata /tesseract-* /unpaper-* /zbar-* +/ffmpeg-* *.tar *.tar.gz *.tar.xz +!/*.patch +!/*.sh diff --git a/Python.build.sh b/Python.build.sh index 28a2890..96de4c5 100755 --- a/Python.build.sh +++ b/Python.build.sh @@ -13,8 +13,8 @@ function B_PYTHON { [ -d "$PREFIX" ] || { echo "PREFIX unset or not a directory";exit; } # apt install libbz2-dev -# wget "https://www.python.org/ftp/python/3.11.7/Python-3.11.7.tgz" -SRCURL[0]="https://beehive.molgen.mpg.de/ef61f81ec82c490484219c7f0ec96783/Python-3.11.7.tgz" +# wget "https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz" +SRCURL[0]="https://beehive.molgen.mpg.de/7fb0bfaa2f6aae4aadcdb51abe957825/Python-3.11.8.tgz" PREFIX=${PREFIX}/${BUILD_python} @@ -51,6 +51,7 @@ ln -vfs python3 ${PREFIX}/bin/python ln -vfs python3-config ${PREFIX}/bin/python-config ln -vfs pydoc3 ${PREFIX}/bin/pydoc ln -vfs idle3 ${PREFIX}/bin/idle +ln -vfs pip3 ${PREFIX}/bin/pip . $PREFIX/profile @@ -58,6 +59,7 @@ pip3 install --prefix=$PREFIX --upgrade pip python3 -m pip install --no-cache-dir --upgrade pipenv==2023.10.24 pip3 install meson pip3 install sphinx + } B_PYTHON diff --git a/README.todo b/README.todo new file mode 100644 index 0000000..9e1f90b --- /dev/null +++ b/README.todo @@ -0,0 +1,19 @@ + ✔ sqlite => 3.45.1 @done (24-02-12 13:18) + https://sqlite.org/download.html + ☐ Python => 3.11.8 + https://www.python.org/downloads/release/python-3118/ + ☐ node => 20.11.0 + https://nodejs.org/download/release/latest-v20.x/ + ☐ unpaper => git latest + https://github.com/unpaper/unpaper + ☐ ffmpeg ? + ☐ zbar => 0.23.93 + https://github.com/mchehab/zbar/releases/tag/0.23.93 + ☐ leptonica => 1.84.1 + https://github.com/DanBloomberg/leptonica/releases + ☐ tesseract => 5.3.4 + https://github.com/tesseract-ocr/tesseract + ☐ nginx => 1.25.3 + https://nginx.org/download/ + + diff --git a/build.profile b/build.profile index 5960c4b..f5f1fee 100644 --- a/build.profile +++ b/build.profile @@ -1,4 +1,4 @@ -BUILD_TAG=2.4.2 +BUILD_TAG=2.5.1 . build.local @@ -11,13 +11,15 @@ NPROC=$(nproc) XDG_CACHE_HOME=${PREFIX}/cache TMPDIR=${TMPDIR:-/tmp/${USER}/${BUILD_TAG}} -BUILD_sqlite=sqlite-3.44.2 -BUILD_python=Python-3.11.7 -BUILD_unpaper=unpaper-7.0.0 -BUILD_zbar=zbar-0.23.90 -BUILD_leptonica=leptonica-1.83.1 -BUILD_tesseract=tesseract-5.3.3 -BUILD_node=node-20.10.0 -BUILD_nginx=nginx-1.24.0 +BUILD_sqlite=sqlite-3.45.1 +BUILD_python=Python-3.11.8 +BUILD_node=node-20.11.0 +BUILD_ffmpeg=ffmpeg-6.1.1 +BUILD_pngquant=pngquant-3.0.3-2-g88da53e +BUILD_unpaper=unpaper-7.0.0-99-gf41e9bb +BUILD_zbar=zbar-0.23.93 +BUILD_leptonica=leptonica-1.84.1 +BUILD_tesseract=tesseract-5.3.4 +BUILD_nginx=nginx-1.25.3 -BUILD_paperless=paperless-ngx-2.4.2 +BUILD_paperless=paperless-ngx-2.5.1 diff --git a/buildall.sh b/buildall.sh index 1a19d9d..17369f6 100755 --- a/buildall.sh +++ b/buildall.sh @@ -61,6 +61,8 @@ ln -fs $logfile $LOGS/build.log [ -d ${BUILD_sqlite} ] || ./sqlite.build.sh [ -d ${BUILD_python} ] || ./Python.build.sh [ -d ${BUILD_node} ] || ./node.build.sh +[ -d ${BUILD_ffmpeg} ] || ./ffmpeg.build.sh +[ -d ${BUILD_pngquant} ] || ./pngquant.build.sh [ -d ${BUILD_unpaper} ] || ./unpaper.build.sh [ -d ${BUILD_zbar} ] || ./zbar.build.sh [ -d ${BUILD_leptonica} ] || ./leptonica.build.sh diff --git a/cleanall.sh b/cleanall.sh index e2c6a59..6ceb1ff 100644 --- a/cleanall.sh +++ b/cleanall.sh @@ -2,19 +2,31 @@ set -e set -x +. build.profile + +declare -a RMRF + +RMRF=( + $BUILD_sqlite + $BUILD_python + $BUILD_node + $BUILD_ffmpeg + $BUILD_unpaper + $BUILD_pngquant + $BUILD_zbar + $BUILD_leptonica + $BUILD_tesseract + $BUILD_nginx + $BUILD_paperless + ./logs +) + function removeall { set +e - rm -rf ./leptonica-1.83.1 - rm -rf ./nginx-1.24.0 - rm -rf ./node-20.10.0 - rm -rf ./paperless-ngx - rm -rf ./paperless-ngx-2.4.2 - rm -rf ./Python-3.11.7 - rm -rf ./sqlite-3.44.2 - rm -rf ./tesseract-5.3.3 - rm -rf ./unpaper-7.0.0 - rm -rf ./zbar-0.23.90 - rm -rf ./logs/ + for i in "${RMRF[@]}"; do + echo "[$i]" + [ -n "$i" ] && [ -d "$i" ] && rm -rf "$i" + done set -e } diff --git a/ffmpeg.build.sh b/ffmpeg.build.sh new file mode 100755 index 0000000..660857c --- /dev/null +++ b/ffmpeg.build.sh @@ -0,0 +1,48 @@ +#!/bin/bash +{ +set -x +set -e + +. build.profile + +function B_FFMPEG { + +[ -d "$PREFIX" ] || { echo "PREFIX unset or not a directory";exit; } + +# SRCURL[0]="https://ffmpeg.org//releases/${BUILD_ffmpeg}.tar.gz" +SRCURL[0]="https://beehive.molgen.mpg.de/cce359cad7ed0d4f0079f7864080ad36/ffmpeg-6.1.1.tar.gz" + +PREFIX=${PREFIX}/${BUILD_ffmpeg} + +mkdir -p $PREFIX + +cat >$PREFIX/profile <<-EOF +PATH=$PREFIX/bin:\$PATH +PKG_CONFIG_PATH=${PROJECT}/${BUILD_ffmpeg}/lib/pkgconfig${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH +EOF + + +test -e ${BUILD_ffmpeg}.tar.gz || wget -nv ${SRCURL} -O ${BUILD_ffmpeg}.tar.gz +test -d ${BUILD_ffmpeg} || mkdir -pv ${BUILD_ffmpeg} && tar -xf ${BUILD_ffmpeg}.tar.gz --strip-components=1 -C ${BUILD_ffmpeg} + +cd ${BUILD_ffmpeg} + +local _conf=( + --prefix=${PREFIX} + --enable-gpl + --enable-version3 + --enable-nonfree + --enable-gray + --disable-doc +) + +./configure "${_conf[@]}" + +make -j $NPROC +make install + +} + +B_FFMPEG + +} diff --git a/leptonica.build.sh b/leptonica.build.sh index e831d22..80fa8c1 100755 --- a/leptonica.build.sh +++ b/leptonica.build.sh @@ -9,7 +9,8 @@ function B_LEPTONICA { [ -d "$PREFIX" ] || { echo "PREFIX unset or not a directory";exit; } -SRCURL[0]="https://github.com/DanBloomberg/leptonica/releases/download/1.83.1/leptonica-1.83.1.tar.gz" +# SRCURL[0]="https://github.com/DanBloomberg/leptonica/releases/download/1.84.1/leptonica-1.84.1.tar.gz" +SRCURL[0]="https://beehive.molgen.mpg.de/01e6de7af2ba93b8350cdc3f7aeb0fbf/leptonica-1.84.1.tar.gz" PREFIX=${PREFIX}/${BUILD_leptonica} diff --git a/nginx-1.25.3.chicken.patch b/nginx-1.25.3.chicken.patch new file mode 100644 index 0000000..47fd38f --- /dev/null +++ b/nginx-1.25.3.chicken.patch @@ -0,0 +1,118 @@ +diff --git a/html/50x.html b/html/50x.html +index a57c2f9..6ba724b 100644 +--- a/html/50x.html ++++ b/html/50x.html +@@ -9,11 +9,9 @@ font-family: Tahoma, Verdana, Arial, sans-serif; } + + +
+-Sorry, the page you are looking for is currently unavailable.
+-Please try again later.
If you are the system administrator of this resource then you should check +-the error log for details.
+-Faithfully yours, nginx.
++Cock-a-dodle-doooo-cock-a-doooodle-doooooo Cock-a-doodle-dooooo bwwwaaaaaak-bwwwaaak-bwwwaaak Waaak cock-a-doooodle-dooo bok Waaaaaak-waaak-waaak bwwwaaak cock-a-doooodle-doooo-cock-a-dooooodle-doooo Cluckity-cluckity? Pukaak cock-a-doodle-do-cock-a-dooooodle-doooo cluckity. Cluck-cluck Bwok cluck-cluck-cluck cluck-a-buh-gawk Bwok Bwak waaak Bok Cluck-a-buh-gawk-cluck-a-buh-gawk honk Bok-bok-bok Cluck waaaaaaak bwwwaaak cock-a-dooooooodle-doooo pukak!
++.
++Bok bok bok.
+ +