summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYour Name2021-01-21 10:03:11 +0100
committerYour Name2021-01-21 10:03:11 +0100
commitdec10e1b2530c0b58f70ab27513a171d84a01f2e (patch)
tree78faa4595ad9de6c2ed69ef011e7efbb8c128d44
parent2d2d3e030fad195512f44518f283445fd6423f46 (diff)
downloadaur-dec10e1b2530c0b58f70ab27513a171d84a01f2e.tar.gz
next iteration
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD32
-rw-r--r--changelog3
3 files changed, 26 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e796737b920b..33549f743158 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -10,6 +10,7 @@ pkgbase = kopano-webapp-intranet-git
makedepends = git
makedepends = gzip
depends = kopano-webapp
+ provides = kopano-webapp-intranet=1.0.1
source = kopano-webapp-intranet-git::git+https://stash.kopano.io/scm/kwa/intranet.git#branch=master
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 030201e2ce35..f7cdf9a7e571 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,8 +8,7 @@ _tagPrefix='v'
# _source=
# _tagPrefix=kopanocore-
-_pluginName=${pkgname//kopano-webapp-/}
-_pluginName=${_pluginName//-git/}
+_pluginName=${_basePkgName//kopano-webapp-/}
pkgrel=1
groups=(
@@ -44,6 +43,14 @@ done
#_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"
@@ -71,7 +78,7 @@ pkgver() {
if [[ "${pkgname}" == *-git ]];
then
_lastTag=$(git tag -l "${_tagPrefix}*" --sort=v:refname | tail -n 1)
- _revision="r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+ _revision="$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
if [ ! -z "${_lastTag}" ];
then
echo "${_lastTag}" | sed "s|${_tagPrefix}\(.*\)${_tagSuffix}|\1.r${_revision}|"
@@ -92,7 +99,7 @@ md5sums+=(
'SKIP'
)
-_phpIni="${pkgname//-git/}.ini"
+_phpIni="${_basePkgName}.ini"
if [ -e "${_phpIni}" ];
then
source+=(
@@ -124,16 +131,21 @@ fi
# template start; name=base-build-webapp; version=1;
# https://wiki.archlinux.org/index.php/Web_application_package_guidelines
-_binDir=usr/share/webapps/${pkgname}
-_confDir=etc/webapps/${pkgname}
+_binDir=usr/share/webapps/${_basePkgName}
+_confDir=etc/webapps/${_basePkgName}
# template start; name=base-build; version=1;
# https://wiki.archlinux.org/index.php/Arch_package_guidelines
#_binDir=
#_confDir=
-_docDir=usr/share/doc/${pkgname}
-_stateDir=var/lib/${pkgname}
-_logDir=var/log/${pkgname}
-_licenseDir=usr/share/licenses/${pkgname}
+
+if [ -z "${_basePkgName}" ];
+then
+ _basePkgName="${pkgname}"
+fi
+_docDir=usr/share/doc/${_basePkgName}
+_stateDir=var/lib/${_basePkgName}
+_logDir=var/log/${_basePkgName}
+_licenseDir=usr/share/licenses/${_basePkgName}
_commonPermissions='u=rwx,g=rx,o=rx u=rw,g=r,o=r'
_securePermissions='u=rwx,g=rx,o= u=rw,g=r,o='
diff --git a/changelog b/changelog
index e69de29bb2d1..e65f8815e276 100644
--- a/changelog
+++ b/changelog
@@ -0,0 +1,3 @@
+
+[2021-01-11]
+* use templates Your Name