summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYour Name2021-02-25 23:50:01 +0100
committerYour Name2021-02-25 23:50:01 +0100
commit9b726d6e56b52192b69f4ae937101a485be92419 (patch)
tree81dcbf669578511e993ea2e861e8e1e64e83c49e
parente488ada75ced4fd1cf75cc5baf188f12fac27040 (diff)
downloadaur-9b726d6e56b52192b69f4ae937101a485be92419.tar.gz
next iteration
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD37
-rw-r--r--changelog3
3 files changed, 40 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c8abd1597320..a41b1ad51400 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -19,7 +19,7 @@ pkgbase = kopano-libvmime-git
provides = libvmime=${pkgver}
provides = kopano-libvmime=0.9.2k4
conflicts = zarafa-libvmime
- source = kopano-libvmime-git::git+https://github.com/pietmacom/kopano-vmime.git#branch=master
+ source = kopano-libvmime-git::git+https://github.com/Kopano-dev/vmime.git#branch=master
md5sums = SKIP
pkgname = kopano-libvmime-git
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
diff --git a/changelog b/changelog
index 5662315ad1c2..3ec12baadcad 100644
--- a/changelog
+++ b/changelog
@@ -8,3 +8,6 @@
[2021-01-26]
* merge/copy
* add build hooks
+
+[2021-02-25]
+* patch from git: corrosponding branch