diff --git a/packages/alist/PKGBUILD b/packages/alist/PKGBUILD index 7a73f31..834bf28 100644 --- a/packages/alist/PKGBUILD +++ b/packages/alist/PKGBUILD @@ -5,17 +5,19 @@ _solid_router_git_hash='f77b206e8592bb56d2d001e9488de5a54a13699b' pkgname='alist' pkgver=3.27.0 -pkgrel=1 +pkgrel=2 pkgdesc='A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs.' url="${_organization_url}/${pkgname}" license=('AGPL3') arch=('i686' 'x86_64' 'armv7h' 'aarch64' 'riscv64') depends=('glibc') makedepends=('go' 'pnpm') +backup=("etc/${pkgname}/config.json") source=("${pkgname}-backend-${pkgver}.tar.gz"::"${url}/archive/refs/tags/v${pkgver}.tar.gz" "${pkgname}-frontend-${pkgver}.tar.gz"::"${_organization_url}/${pkgname}-web/archive/refs/tags/${pkgver}.tar.gz" "${pkgname}-solid_router-${_solid_router_git_hash}.tar.gz"::"${_organization_url}/solid-router/archive/${_solid_router_git_hash}.tar.gz" + "${pkgname}-config.json" "${pkgname}.service" "${pkgname}-sysusers.conf" "${pkgname}-tmpfiles.conf") @@ -23,20 +25,22 @@ source=("${pkgname}-backend-${pkgver}.tar.gz"::"${url}/archive/refs/tags/v${pkgv sha512sums=('1a504ed6c479188482f0961dc50693169a4afd16dc0471b9d59cbe579e7ee1687b595baa932e4a8653c20893122ec53f9e92e4760df7b4db3bcd763038ff1016' 'dd20962d4e5fac1604597b54267604a9231e2d73f9af6a90503a8236d8376b62d6321e244c783b96d4764a94eeab4f86ec5c99b63ab70d54b5de08dd73266e28' '0638e98b8f2866e7cbdd5420c6b31558aeeea05e521dd28c22b917da4c419df933f03d042ceba0a88b7a5a153e152b7abc32af1acc0b90e8be90c3ddbdd4f541' - 'df2fdcd9d94a0614b9c68da6d1c4155f77d4991fbb2bb604fff7b7c553abb9608cfe687f143ae7f470c8c7757cb0e5b5b6bf4fdb9fe4203ab80a999901a09e66' + 'eb4e5c6cfe905ab6b6680bb9a80a8909bfc74b87de3b0f49b64374bad1f21627f3b496ffca897794cdff882eb86d8da634fb4b50b1c14d6f68a3d8fa02223c2f' + 'e8bfd6079626799ca7af015550c5605991631460d18be2aab41d58412488fd17672b9125c47cfb019d519d883d6b89e4f2f367eddfb30d5857e29fd91f582f78' '923dbd6ba9027524537097b2ab84d230a67bcef3f5adf2bb054e502b5806544836f012eb476803ce75d614686af0a4a070794ad1bdd768dc2fa6c26cdc3ac7a7' - '9fe83828c81bbd1a93532847ef4c6fdfd832a43e2bd195637e56c1daec83728648df6b35e79b31a4d1cecef1fbfbc5cd30668c0a94e4d975ddd7c02bab8d813b') + '9ccee8ea093d81aa75441cd1603f6dcb798f10397206a5d8f770a3242753bf48d3229a881c16238ad98c762dff6824dcb85d26f545b03914d154f280f8ac2c3f') prepare() { # Link frontend dist to backend sources. - ln -sf "${srcdir}/${pkgname}-web-${pkgver}/dist" "${srcdir}/${pkgname}-${pkgver}/dist" + rm -rfv "${srcdir}/${pkgname}-web-${pkgver}/dist" + ln -sfv "${srcdir}/${pkgname}-${pkgver}/public/dist" "${srcdir}/${pkgname}-web-${pkgver}/dist" # Move solid-router to web sources. - rm -rf "${srcdir}/${pkgname}-web-${pkgver}/solid-router" - mv "${srcdir}/solid-router-${_solid_router_git_hash}" "${srcdir}/${pkgname}-web-${pkgver}/solid-router" + rm -rfv "${srcdir}/${pkgname}-web-${pkgver}/solid-router" + mv -v "${srcdir}/solid-router-${_solid_router_git_hash}" "${srcdir}/${pkgname}-web-${pkgver}/solid-router" # Update frontend version with $pkgver. - sed -i -e "s/0.0.0/${pkgver}/g" "${srcdir}/${pkgname}-web-${pkgver}/package.json" + sed -ie "s/0.0.0/${pkgver}/g" "${srcdir}/${pkgname}-web-${pkgver}/package.json" } build() { @@ -57,7 +61,7 @@ build() { package() { install -Dm755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" - + install -Dm644 "${srcdir}/${pkgname}-config.json" "${pkgdir}/etc/${pkgname}/config.json" install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" install -Dm644 "${srcdir}/${pkgname}-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf" install -Dm644 "${srcdir}/${pkgname}-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" diff --git a/packages/alist/alist-config.json b/packages/alist/alist-config.json new file mode 100644 index 0000000..81cd692 --- /dev/null +++ b/packages/alist/alist-config.json @@ -0,0 +1 @@ +{"temp_dir": "/var/cache/alist", "log": {"name": "/var/log/alist/alist.log"}} \ No newline at end of file diff --git a/packages/alist/alist-tmpfiles.conf b/packages/alist/alist-tmpfiles.conf index 33ec921..be9c675 100644 --- a/packages/alist/alist-tmpfiles.conf +++ b/packages/alist/alist-tmpfiles.conf @@ -1,6 +1,6 @@ #Type Path Mode User Group Age Argument +d /etc/alist 0755 alist alist - - +d /var/cache/alist 0755 alist alist - - d /var/lib/alist 0755 alist alist - - d /var/log/alist 0755 alist alist - - -d /var/cache/alist 0755 alist alist - - -d /etc/alist 0755 alist alist - - -L /etc/alist/config.json 0644 alist alist - /var/lib/alist/config.json +L /var/lib/alist/config.json 0644 alist alist - /etc/alist/config.json diff --git a/packages/alist/alist.service b/packages/alist/alist.service index 833d657..19a7f81 100644 --- a/packages/alist/alist.service +++ b/packages/alist/alist.service @@ -7,7 +7,6 @@ After=network-online.target Type=simple User=alist Group=alist -WorkingDirectory=/var/lib/alist ExecStart=/usr/bin/alist server --data /var/lib/alist Restart=on-failure