summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorYour Name2021-01-21 10:03:29 +0100
committerYour Name2021-01-21 10:03:29 +0100
commit90129f974fe5b660498e815c7d0eaebe17b8f917 (patch)
tree69e040f69ecc3ca28bd545526f4bf5d304e874c8 /PKGBUILD
parent190679610fdf3e9f1e339d8192710362b4f58840 (diff)
downloadaur-90129f974fe5b660498e815c7d0eaebe17b8f917.tar.gz
next iteration
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 22 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 91365acf3d1..3da6671271c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,8 +12,7 @@ depends=(
# _source=
# _tagPrefix=kopanocore-
-_pluginName=${pkgname//kopano-webapp-/}
-_pluginName=${_pluginName//-git/}
+_pluginName=${_basePkgName//kopano-webapp-/}
pkgrel=1
groups=(
@@ -48,6 +47,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"
@@ -75,7 +82,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}|"
@@ -96,7 +103,7 @@ md5sums+=(
'SKIP'
)
-_phpIni="${pkgname//-git/}.ini"
+_phpIni="${_basePkgName}.ini"
if [ -e "${_phpIni}" ];
then
source+=(
@@ -128,16 +135,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='