summaryrefslogtreecommitdiff
path: root/pcr/gmid
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2023-01-10 03:18:41 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2023-08-17 22:34:55 -0400
commitee3505ff24e4d9b0baf680e856613551f4b87ff4 (patch)
tree6ce45ca8f3d3671cbb2da4213e48f8b0e29947fb /pcr/gmid
parent1a8941749758251d360364d19b4b991e2e6f06c9 (diff)
[gmid]: rebuild against latest libretls
Diffstat (limited to 'pcr/gmid')
-rw-r--r--pcr/gmid/PKGBUILD42
1 files changed, 27 insertions, 15 deletions
diff --git a/pcr/gmid/PKGBUILD b/pcr/gmid/PKGBUILD
index 9659e84e6..a49d20ef9 100644
--- a/pcr/gmid/PKGBUILD
+++ b/pcr/gmid/PKGBUILD
@@ -10,7 +10,7 @@
pkgname=gmid
pkgver=1.8.6
-pkgrel=1
+pkgrel=2
pkgdesc='Fast Gemini server written with security in mind.'
arch=('x86_64')
arch+=('i686' 'armv7h')
@@ -22,7 +22,7 @@ backup=(etc/conf.d/${pkgname}
depends=('libretls' 'libevent')
mksource=(https://github.com/omar-polo/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz)
source=(
- https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.xz{,.sig}
+ https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.gz{,.sig}
"gmid.service"
"gmid.sysusers"
"gmid.confd"
@@ -48,40 +48,52 @@ validpgpkeys=('3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40') # bill-auger
# However, mksource() is retained for now,
# because it is not certain that the files will be absent in the next release;
# or perhaps their omission from this release was a happy accident.
-_mksource_err_fmt="ERROR: mksource() was not applied or needs re-working - sources may contain non-free files\n"
-_nonfree_files=( contrib site ) # relative to source-ball root
+_MKSOURCE_ERR_FMT="ERROR: %s - mksource() was not applied or needs re-working - sources may contain non-free files"
+_NONFREE_FILES=( contrib site )
mksource() {
cd "$srcdir/$pkgname-$pkgver"
# Remove unlicensed files
- for nonfree_file in "${_nonfree_files[@]}"
+ local nonfree_file
+ local err_msgs=()
+ for nonfree_file in "${_NONFREE_FILES[@]}"
do
- if [[ -d ${nonfree_file} ]]
+ if [[ ! -e ${nonfree_file} ]] || ! rm -r ${nonfree_file}
then
- rm -r ${nonfree_file}
- else
- printf "${_mksource_err_fmt} - cannot delete '${nonfree_file}'"
- _mksource_err_fmt=''
+ err_msgs+=( "cannot delete nonfree_file: '${nonfree_file}'" )
+ return 1
fi
done
- [[ -n "${_mksource_err_fmt}" ]] || return 1
+ # display error report
+ if (( ${#err_msgs} ))
+ then printf "${_MKSOURCE_ERR_FMT/ERROR:/WARNING:}" "${err_msgs[@]}"
+ return 1
+ fi
}
-prepare()
-{
+prepare() {
cd "$srcdir/$pkgname-$pkgver"
# verify mksource treatment
- for nonfree_file in "${_nonfree_files[@]}"
+ local nonfree_file
+ local err_msgs=()
+ for nonfree_file in "${_NONFREE_FILES[@]}"
do
if [[ -d ${nonfree_file} ]]
then
- printf "${_mksource_err_fmt}" ''
+ err_msgs+=( "nonfree_file: '${nonfree_file}' found - deleting" )
+ rm -rf ${nonfree_file}
fi
done
+
+ # display error report
+ if (( ${#err_msgs} ))
+ then
+ printf "${_MKSOURCE_ERR_FMT/ERROR:\ /WARNING:\ }" "${err_msgs[@]}"
+ fi
}
build() {