diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index fa910e3..165c766 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -2,9 +2,10 @@ # Maintainer: Maxime Gauduin # Contributor: Frederik Schwan -pkgname=gitea +pkgbase=gitea +pkgname=('gitea' 'gitea-static') pkgver=1.13.6 -pkgrel=1 +pkgrel=2 pkgdesc="Painless self-hosted Git service. Community managed fork of Gogs." arch=(x86_64) url="https://gitea.io" @@ -67,7 +68,7 @@ build() { make -j1 } -package() { +package_gitea() { install -Dm755 ${pkgname}/${pkgname} -t "${pkgdir}"/usr/bin/ install -Dm644 ${pkgname}/LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/ install -Dm644 ${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/ @@ -75,3 +76,21 @@ package() { install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf install -D ${pkgname}/custom/conf/app.example.ini "${pkgdir}"/etc/gitea/app.ini } + +package_gitea-static() { + pkgdesc="Gitea static resources for separate serving" + backup=() + depends=() + optdepends=() + arch=(any) + install -Dm644 ${pkgbase}/LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/ + mkdir -p "${pkgdir}"/usr/share/${pkgbase}/ + cp -dr --no-preserve=ownership ${pkgbase}/public "${pkgdir}"/usr/share/${pkgbase}/static + + # Remove the source maps. They contain $srcdir references and cannot be used + # in a browser debugger since they refer to modules on the build server. + rm "${pkgdir}"/usr/share/${pkgbase}/static/js/index.js.map + rm "${pkgdir}"/usr/share/${pkgbase}/static/css/index.css.map + sed -i '/\/\/# sourceMappingURL=index.js.map/d' "${pkgdir}"/usr/share/${pkgbase}/static/js/index.js + sed -i '/\/\*# sourceMappingURL=index.css.map\*\//d' "${pkgdir}"/usr/share/${pkgbase}/static/css/index.css +}