2024-01-05 06:10:07 +00:00
|
|
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
pkgname=freescout
|
2024-02-22 20:16:34 +00:00
|
|
|
pkgver=1.8.120
|
2024-02-22 20:34:03 +00:00
|
|
|
pkgrel=1
|
2024-01-05 06:10:07 +00:00
|
|
|
pkgdesc="Free self-hosted help desk & shared mailbox"
|
|
|
|
arch="noarch"
|
|
|
|
url="freescout.net"
|
|
|
|
license="AGPL-3.0"
|
|
|
|
_php=php82
|
|
|
|
_php_mods="-fpm -mbstring -xml -imap -zip -gd -curl -intl -tokenizer -pdo_pgsql -openssl -session -iconv -fileinfo -dom -pcntl"
|
|
|
|
depends="$_php ${_php_mods//-/$_php-} nginx postgresql pwgen"
|
|
|
|
makedepends="composer pcre"
|
|
|
|
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-install"
|
|
|
|
source="
|
|
|
|
$pkgname-$pkgver.tar.gz::https://github.com/freescout-helpdesk/freescout/archive/refs/tags/$pkgver.tar.gz
|
|
|
|
freescout.nginx
|
|
|
|
freescout-manage.sh
|
|
|
|
"
|
|
|
|
pkgusers="freescout"
|
|
|
|
pkggroups="freescout"
|
|
|
|
|
|
|
|
build() {
|
|
|
|
composer install --ignore-platform-reqs
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
local logdir="/var/log/$pkgname"
|
2024-01-06 04:46:28 +00:00
|
|
|
local datadir="/var/lib/$pkgname"
|
2024-01-05 06:10:07 +00:00
|
|
|
local wwwdir="/usr/share/webapps/$pkgname"
|
|
|
|
local confdir="/etc/$pkgname"
|
|
|
|
|
|
|
|
# Make directories
|
|
|
|
install -dm 755 \
|
|
|
|
"$pkgdir"/$wwwdir \
|
2024-01-06 04:46:28 +00:00
|
|
|
"$pkgdir"/$confdir \
|
|
|
|
"$pkgdir"/$logdir \
|
|
|
|
"$pkgdir"/$datadir
|
2024-01-05 06:10:07 +00:00
|
|
|
|
|
|
|
# Copy and ln operations
|
|
|
|
cp $builddir/* -R "$pkgdir"/$wwwdir/.
|
2024-01-06 04:46:28 +00:00
|
|
|
for i in storage/app storage/framework bootstrap/cache \
|
|
|
|
public/css/builds public/js/builds public/modules Modules; do
|
|
|
|
|
|
|
|
if [ -d "$pkgdir"$wwwdir/$i ]; then
|
|
|
|
if [ ! -d "$pkgdir"/$datadir/${i%/*} ]; then
|
|
|
|
mkdir -p "$pkgdir"/$datadir/${i%/*}
|
|
|
|
fi
|
|
|
|
mv "$pkgdir"$wwwdir/$i "$pkgdir"/$datadir/$i
|
|
|
|
else
|
|
|
|
mkdir -p "$pkgdir"/$datadir/$i
|
|
|
|
fi
|
|
|
|
ln -s $datadir/$i "$pkgdir"/$wwwdir/$i
|
|
|
|
done
|
2024-01-05 06:10:07 +00:00
|
|
|
ln -s /etc/freescout/freescout.conf "$pkgdir"/usr/share/webapps/freescout/.env
|
2024-01-06 04:46:28 +00:00
|
|
|
ln -s $wwwdir/storage/app/public "$pkgdir"/$wwwdir/public/storage
|
|
|
|
|
|
|
|
# log dir
|
2024-01-05 06:10:07 +00:00
|
|
|
rm -R "$pkgdir"/$wwwdir/storage/logs
|
|
|
|
ln -s "$logdir" "$pkgdir"/$wwwdir/storage/logs
|
|
|
|
|
|
|
|
# Permission settings
|
2024-01-06 04:46:28 +00:00
|
|
|
chown -R freescout:www-data "$pkgdir"/$datadir "$pkgdir"/$logdir
|
2024-01-05 06:10:07 +00:00
|
|
|
|
|
|
|
# config files
|
|
|
|
install -Dm644 "$srcdir"/freescout.nginx \
|
|
|
|
"$pkgdir"/etc/nginx/http.d/freescout.conf
|
|
|
|
install -Dm640 "$builddir"/.env.example \
|
|
|
|
"$pkgdir"/etc/freescout/freescout.conf
|
|
|
|
sed -i 's|APP_KEY.*|APP_KEY=@@SECRET_KEY@@|' "$pkgdir"/etc/freescout/freescout.conf
|
|
|
|
chown root:www-data "$pkgdir"/etc/freescout/freescout.conf
|
|
|
|
|
|
|
|
# Install wrapper script to /usr/bin.
|
|
|
|
install -m755 -D "$srcdir"/freescout-manage.sh "$pkgdir"/usr/bin/freescout-manage
|
|
|
|
}
|
|
|
|
sha512sums="
|
2024-02-22 20:16:34 +00:00
|
|
|
781b2b0810f148b590af0a73ed0b58d03458e3f2ef68af4c53b36fc70841ff011de80c73148eedb57c94f247f887757500630f5e4bb41dfba79780a5eabfca21 freescout-1.8.120.tar.gz
|
2024-01-05 06:10:07 +00:00
|
|
|
e4af6c85dc12f694bef2a02e4664e31ed50b2c109914d7ffad5001c2bbd764ef25b17ecaa59ff55ef41bccf17169bf910d1a08888364bdedd0ecc54d310e661f freescout.nginx
|
|
|
|
7ce9b3ee3a979db44f5e6d7daa69431e04a5281f364ae7be23e5a0a0547f96abc858d2a8010346be2fb99bd2355fb529e7030ed20d54f310249e61ed5db4d0ba freescout-manage.sh
|
|
|
|
"
|