diff options
author | Your Name | 2021-02-25 23:50:12 +0100 |
---|---|---|
committer | Your Name | 2021-02-25 23:50:12 +0100 |
commit | 628fe071c462bde49ec6a3477d92aba31c969bb5 (patch) | |
tree | 43dd1e184132f64f1ff19095de15f748fd49e0f9 /PKGBUILD | |
parent | 7953eb9085ef1816babef43aa8103722b357c192 (diff) | |
download | aur-628fe071c462bde49ec6a3477d92aba31c969bb5.tar.gz |
next iteration
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 33 insertions, 2 deletions
@@ -75,9 +75,39 @@ pkgver() { } _sourceBranch=$(if [[ "${pkgname}" == *-git ]]; then echo "#branch=master"; else echo "#tag=${_tagPrefix}${pkgver}${_tagSuffix}"; fi) + +_patchFromGit() { + _patchDir="${srcdir}/$(basename $(pwd))-patch.git" + if [ ! -e "${_patchDir}" ]; + then + git clone --bare ${1} ${_patchDir} + fi + + _sourceBranchName="${_sourceBranch//#*=/}" + # Patch From Specific Range + if [ ! -z "${3}" ]; + then + git --git-dir="${_patchDir}" format-patch "^${2}" "${3}" --stdout | git apply + + # Patch From Specific Commit + elif [ ! -z "${2}" ]; + then + git --git-dir="${_patchDir}" format-patch -1 "${2}" --stdout | git apply + + # Patch From Dedicated Branch + elif git --git-dir="${_patchDir}" rev-parse --verify --quiet "${_sourceBranchName}" > /dev/null \ + && git --git-dir="${_patchDir}" rev-parse --verify --quiet "${_sourceBranchName}-patch" > /dev/null ; + then + git --git-dir="${_patchDir}" format-patch "^${_sourceBranchName}" "${_sourceBranchName}-patch" --stdout | git apply + + else + echo "No Patch Branch Found [${_sourceBranchName}-patch]" + + fi +} # template end; source=( - "${pkgname}::git+https://github.com/pietmacom/kopano-core.git${_sourceBranch}" + "${pkgname}::git+https://stash.kopano.io/scm/kc/kopanocore.git${_sourceBranch}" ) md5sums=( 'SKIP' @@ -182,7 +212,7 @@ done prepare() { cd ${srcdir}/${pkgname} - ./bootstrap.sh + _patchFromGit https://github.com/pietmacom/kopano-core.git } # When using official VMIME @@ -200,6 +230,7 @@ _officialVmimeParameter() { build() { cd ${srcdir}/${pkgname} + ./bootstrap.sh ./configure \ `# https://stash.kopano.io/projects/KC/repos/kopanocore/browse/doc/install.txt#68` \ $(_officialVmimeParameter) \ |