Skip to content

Fix im tag download #56

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.profile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ BUILD_libfontttf=liberation-fonts-ttf-2.1.5
BUILD_libfontttf_SRCURL="https://beehive.molgen.mpg.de/31b453e0b77bacde410a34a725b34f8a/${BUILD_libfontttf}.tar.gz"

# gits
BUILD_imagemagick=imagemagick-7.1.1-36-5-g115271ece
BUILD_imagemagick=imagemagick-7.1.1-36
BUILD_imagemagick_SRCURL="https://github.com/ImageMagick/ImageMagick.git"

BUILD_pngquant=pngquant-3.0.3-6-g9a4952d
Expand Down
27 changes: 17 additions & 10 deletions checkversions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ function parse() {
}

function mtype() {
_p=$(type -p ${1})
local _a=$1
local _p=$(type -p $_a)
echo '...'${_p#$PREFIX}
}

# https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest&

if [[ -e "$PROJECT"/profile ]]; then
Expand Down Expand Up @@ -122,7 +124,10 @@ if [[ -e "$PROJECT"/profile ]]; then
fi

version_BUILD_paperless() {
gdrem paperless-ngx/paperless-ngx 'refs/tags/v*'
gdrem paperless-ngx/paperless-ngx 'refs/tags/v*'|cut -d' ' -f2
}
version_BUILD_imagemagick() {
gdrem ImageMagick/ImageMagick 'refs/tags/[0-9]*'|cut -d' ' -f1
}
version_BUILD_node() {
parse 'https://github.com/nodejs/node/releases' '(?<=Version ).*?(?= ).*LTS\)'|cut -d' ' -f1
Expand All @@ -131,7 +136,6 @@ version_BUILD_python() {
parse 'https://raw.githubusercontent.com/python/peps/main/peps/pep-0664.rst' '(?<=^- ).*(?=:.*final)'
}
version_BUILD_redis() {
# parse 'http://download.redis.io/redis-stable/00-RELEASENOTES' '(?<=Redis\s).*(?=\s+Released)'
parse 'https://redis.io/downloads/' '(?<=>).*(?=\s+release notes)'
}
version_BUILD_sqlite() {
Expand All @@ -144,25 +148,26 @@ version_BUILD_tesseract() {
gdrem tesseract-ocr/tesseract 'refs/tags/[0-9]*'|cut -d' ' -f1
}
version_BUILD_tessdata() {
gdrem tesseract-ocr/tessdata_best 'refs/tags/[0-9]*' '(?<=Release ).*?(?=\s)'
gdrem tesseract-ocr/tessdata_best 'refs/tags/[0-9]*' '(?<=Release ).*?(?=\s)'|cut -d' ' -f2
}
version_BUILD_jbig2dec() {
# gdrem ArtifexSoftware/jbig2dec 'refs/tags/[0-9]*'|cut -d' ' -f2
gdrem ArtifexSoftware/jbig2dec 'refs/tags/[0-9]*'|cut -d' ' -f2
}
version_BUILD_jbig2enc() {
gdrem agl/jbig2enc 'refs/tags/[0-9]*'|cut -d' ' -f1
}
version_BUILD_leptonica() {
gdrem DanBloomberg/leptonica 'refs/tags/[0-9]*'
gdrem DanBloomberg/leptonica 'refs/tags/[0-9]*'|cut -d' ' -f3
}
version_BUILD_ffmpeg() {
parse 'https://git.videolan.org/?p=ffmpeg.git;a=blob_plain;f=Changelog' '(?<=^version )\d.*(?=:)'
}
version_BUILD_pngquant() {
gdrem kornelski/pngquant 'refs/tags/*'
gdrem kornelski/pngquant 'refs/tags/*'|cut -d' ' -f1
}
version_BUILD_zbar() {
gdrem mchehab/zbar 'refs/tags/[0-9]*'
gdrem mchehab/zbar 'refs/tags/[0-9]*'|cut -d' ' -f2
}
version_BUILD_unpaper() {
gdrem unpaper/unpaper 'refs/tags/unpaper-*' '(?<=<title>Release unpaper-).*?(?=\s)' '(?<= )[0-9]+(?= commits)'|tr '\n' ' '
Expand All @@ -187,7 +192,8 @@ function version() {
fi

if [[ $(type -t version_${Bi}) = 'function' ]]; then
v=$(version_${Bi}|tr '\n' ' ')
# v=$(version_${Bi}|tr '\n' ' ')
v=$(version_${Bi})
printf " ver %32s %s\n" $v
else
printf "no version_()\n"
Expand All @@ -208,14 +214,15 @@ BUILD_jbig2dec
BUILD_jbig2enc
BUILD_leptonica
BUILD_ffmpeg
BUILD_imagemagick
BUILD_pngquant
BUILD_zbar
BUILD_unpaper
BUILD_libfontttf
)

_xparts=(
BUILD_tessdata
_aparts=(
BUILD_jbig2dec
)

# list of versions
Expand Down
19 changes: 10 additions & 9 deletions imagemagick.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ if [[ -e "${BUILD_PKG}".tar ]]; then
fi

if [[ ! -d ${BUILD_PKG} ]]; then
git clone "${SRCURL}" --single-branch "${BUILD_PKG}"
# check version
pushd "${BUILD_PKG}"
GITVER=imagemagick-$(git describe --tags)
popd
if [ "${GITVER}" != "${BUILD_PKG}" ]; then
echo "${BUILD_PKG} should be updated to ${GITVER} update!"
exit 1
fi
git clone "${SRCURL}" --branch ${BUILD_PKG##imagemagick-} --single-branch "${BUILD_PKG}"
fi

# check version
pushd "${BUILD_PKG}"
GITVER=imagemagick-$(git describe --tags)
popd
if [ "${GITVER}" != "${BUILD_PKG}" ]; then
echo "newer version than ${BUILD_PKG} found. please update to ${GITVER}"
exit 1
fi

if [[ ! -e ${BUILD_PKG}.tar ]]; then
Expand Down
1 change: 1 addition & 0 deletions profile.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin

. ${PROJECT}/${BUILD_zbar}/profile
. ${PROJECT}/${BUILD_jbig2enc}/profile
. ${PROJECT}/${BUILD_jbig2dec}/profile
. ${PROJECT}/${BUILD_sqlite}/profile
. ${PROJECT}/${BUILD_python}/profile
. ${PROJECT}/${BUILD_node}/profile
Expand Down