summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Kromlinger2023-01-07 18:16:52 +0100
committerJustin Kromlinger2023-01-07 18:18:01 +0100
commitea0bdc0ca0f4b723e803c867b5ed91adb8174f1a (patch)
tree63e8db935273bb26233a0011fce50e20d2cd9951
parent5fd9101782e6972477a59c3ccc14840b20544d12 (diff)
downloadaur-ea0bdc0ca0f4b723e803c867b5ed91adb8174f1a.tar.gz
Add additional deps, add post_install, update post_upgrade, add config backup
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD3
-rw-r--r--shlink.install18
3 files changed, 22 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4545d2da1c14..6162252af77f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -8,6 +8,8 @@ pkgbase = shlink
license = MIT
depends = php>=8.1
depends = php-gd
+ depends = php-intl
+ depends = php-apcu
optdepends = mariadb: database
optdepends = mssql-server: database
optdepends = mysql: database
@@ -16,6 +18,7 @@ pkgbase = shlink
optdepends = apache: web server
optdepends = nginx: web server
options = !strip
+ backup = usr/share/webapps/shlink/config/params/generated_config.php
source = https://github.com/shlinkio/shlink/releases/download/v3.4.0/shlink3.4.0_php8.1_dist.zip
sha256sums = e37e91cd86a8d495952783d1eeb94f157ddfe42f50849a3c2f979b1f9d991963
diff --git a/PKGBUILD b/PKGBUILD
index 19f1c6c98a94..cf27f8355150 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgdesc="The definitive self-hosted URL shortener"
url="https://shlink.io"
license=("MIT")
arch=("any")
-depends=("php>=8.1" "php-gd")
+depends=("php>=8.1" "php-gd" "php-intl" "php-apcu")
optdepends=("mariadb: database"
"mssql-server: database"
"mysql: database"
@@ -19,6 +19,7 @@ source=("https://github.com/shlinkio/shlink/releases/download/v$pkgver/$pkgname$
sha256sums=('e37e91cd86a8d495952783d1eeb94f157ddfe42f50849a3c2f979b1f9d991963')
install="$pkgname.install"
options=("!strip")
+backup=("usr/share/webapps/shlink/config/params/generated_config.php")
# https://wiki.archlinux.org/title/DeveloperWiki:UID_/_GID_Database
_http_uid_gid=33
diff --git a/shlink.install b/shlink.install
index d1d26c341c0e..8c069ad54757 100644
--- a/shlink.install
+++ b/shlink.install
@@ -1,9 +1,25 @@
+post_install(){
+ cat <<INFO
+
+Shlink has been installed successfully.
+Please run \`(cd /usr/share/webapps/shlink && sudo -u http php vendor/bin/shlink-installer install)\`
+to configure the database and other options.
+You can find more information here:
+
+https://github.com/shlinkio/shlink/#configure
+
+INFO
+}
+
post_upgrade(){
cat <<INFO
Shlink has been updated successfully.
-Please run \`sudo -u http php /usr/share/webapps/shlink/bin/update\`
+Please run \`(cd /usr/share/webapps/shlink && sudo -u http php vendor/bin/shlink-installer update)\`
to migrate the database and configure new options.
+
+You can provide `/usr/share/webapps/shlink` when asked to import the existing configuration.
+
You can find more information here:
https://github.com/shlinkio/shlink/#update-to-new-version