Skip to content
Permalink
836913c051
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 61 lines (42 sloc) 1.27 KB
#!/bin/bash
{
set -e
set -u
set -x
. build.profile
. ${PREFIX}/${BUILD_sqlite}/profile
. ${PREFIX}/${BUILD_python}/profile
. ${PREFIX}/${BUILD_node}/profile
. ${PREFIX}/${BUILD_openjpeg}/profile
. ${PREFIX}/${BUILD_libwebp}/profile
. ${PREFIX}/${BUILD_libvips}/profile
function B_PHOTOPRISM {
PREFIX=${PROJECT}/photoprism
BUILD_PKG=${BUILD_photoprism}
if [[ -e ${BUILD_PKG}.tar ]]; then
tar -xf ${BUILD_PKG}.tar
fi
if [[ ! -d ${BUILD_PKG} ]]; then
git clone https://github.com/photoprism/photoprism.git --branch ${BUILD_PKG#*-} --single-branch ${BUILD_PKG}
fi
if [[ ! -e ${BUILD_PKG}.tar ]]; then
tar cf ${BUILD_PKG}.tar ${BUILD_PKG}
fi
#if [[ ! -d ${PREFIX} ]]; then
# git clone ${BUILD_PKG} ${PREFIX}
#else
# pushd ${PREFIX}
# git pull origin ${BUILD_PKG#*-}
# popd
#fi
pushd ${BUILD_PKG}
perl -lane 'if (($k,$v) = /(^\S+)\s\?=\s(.*)/){s/\?/:/;print "ifdef $k\n$k := \$($k)\nelse\n$k := $v\nendif\n"} else {print;}' Makefile > Makefile.build
patch -p1 --silent --backup --forward --input=${BUILD_SRC}/photoprism.patch || true
make -f Makefile.build all install DESTDIR=${PREFIX} PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
# make -f Makefile.build build-prod DESTDIR=${PREFIX} PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
popd
}
pushd "${BUILD_DIR}"
B_PHOTOPRISM
popd
}