summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorYour Name2021-01-21 10:02:48 +0100
committerYour Name2021-01-21 10:02:48 +0100
commit347bee8d8dabe96991eec36171692b982c2bbd63 (patch)
tree4a625c36d8a1a373c9ef4dd04b84489c105d7868 /PKGBUILD
parent6b14db6785fa239f9ef949315042bee3a7dd1691 (diff)
downloadaur-347bee8d8dabe96991eec36171692b982c2bbd63.tar.gz
next iteration
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD77
1 files changed, 63 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3e5ffad164c6..5e172b2acf42 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
pkgname='kopano-libvmime-git'
-provides=(
- 'libvmime'
- )
pkgver=0.9.2k4
pkgrel=1
+provides=(
+ 'libvmime=${pkgver}'
+ )
pkgdesc='A C++ class library for working with MIME messages'
arch=(
'armv7l'
@@ -15,19 +15,71 @@ url='http://www.vmime.org/'
license=(
'GPL'
)
+
+_tagPrefix="v"
+# template start; name=base-scm; version=1;
+#_tagPrefix=""
+#_tagSuffix=""
+
+_basePkgName="${pkgname//-git/}"
+
+if [[ "${pkgname}" == *-git ]];
+then
+ # Version can't be set before pkgver has run
+ provides+=("${pkgname//-git/}=${pkgver}")
+fi
+
+_gitLogByDay() {
+ local NEXT=$(date +%F)
+ local SINCE="1970-01-01"
+ local UNTIL=$NEXT
+ local LOG_FORMAT="* %s %an"
+ git log --no-merges --since="${SINCE}" --until="${UNTIL}" --format="%cd" --date=short --follow . | sort -u | while read DATE ; do
+ local GIT_PAGER=$(git log --no-merges --reverse --format="${LOG_FORMAT}" --since="${DATE} 00:00:00" --until="${DATE} 23:59:59" --author="${AUTHOR}" --follow . | uniq)
+ if [ ! -z "$GIT_PAGER" ]
+ then
+ echo
+ echo -e "[$DATE]"
+ echo -e "${GIT_PAGER}"
+ fi
+ done
+}
+if git rev-parse ;
+then
+ _gitLogByDay > changelog
+ changelog="changelog"
+fi
+
+# https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git
+pkgver() {
+ cd ${srcdir}/${pkgname}
+ if [[ "${pkgname}" == *-git ]];
+ then
+ _lastTag=$(git tag -l "${_tagPrefix}*" --sort=v:refname | tail -n 1)
+ _revision="$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+ if [ ! -z "${_lastTag}" ];
+ then
+ echo "${_lastTag}" | sed "s|${_tagPrefix}\(.*\)${_tagSuffix}|\1.r${_revision}|"
+ else
+ echo "${pkgver}" | sed "s|\(.*\)-git|1.r${_revision}|"
+ fi
+ else
+ echo ${pkgver}
+ fi
+}
+
+_sourceBranch=$(if [[ "${pkgname}" == *-git ]]; then echo "#branch=master"; else echo "#tag=${_tagPrefix}${pkgver}${_tagSuffix}"; fi)
+# template end;
conflicts=(
- 'libvmime'
- 'libvmime-git'
'zarafa-libvmime'
)
source=(
- "git+https://github.com/Kopano-dev/vmime.git#tag=v${pkgver}"
+ "${pkgname}::git+https://github.com/Kopano-dev/vmime.git${_sourceBranch}"
)
md5sums=(
'SKIP'
)
-
makedepends=(
'cmake'
'postfix'
@@ -42,18 +94,15 @@ depends=(
'gnutls'
)
-prepare() {
- mkdir build
-}
-
build() {
+ mkdir build
cd build
-
- cmake ../vmime \
+
+ cmake ../${pkgname} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_INSTALL_DIR=/usr/lib/ \
-DCMAKE_BUILD_TYPE=Release
-
+
make
}