summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorYour Name2021-02-25 23:50:01 +0100
committerYour Name2021-02-25 23:50:01 +0100
commit9b726d6e56b52192b69f4ae937101a485be92419 (patch)
tree81dcbf669578511e993ea2e861e8e1e64e83c49e /PKGBUILD
parente488ada75ced4fd1cf75cc5baf188f12fac27040 (diff)
downloadaur-9b726d6e56b52192b69f4ae937101a485be92419.tar.gz
next iteration
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 36 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0cabe3fb9d1c..197fee1f617c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -69,13 +69,43 @@ 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;
conflicts=(
'zarafa-libvmime'
)
source=(
- "${pkgname}::git+https://github.com/pietmacom/kopano-vmime.git${_sourceBranch}"
+ "${pkgname}::git+https://github.com/Kopano-dev/vmime.git${_sourceBranch}"
)
md5sums=(
'SKIP'
@@ -95,6 +125,11 @@ depends=(
'gnutls'
)
+prepare() {
+ cd ${srcdir}/${pkgname}
+ _patchFromGit https://github.com/pietmacom/kopano-vmime.git
+}
+
build() {
mkdir build
cd build