From 9703b059dae24c60b5c7b16ff85764333811afab Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Tue, 25 Oct 2022 19:54:40 +0100 Subject: [PATCH] [TOOLS] Add PKGBUILD for Arch Linux --- dist/arch/.gitignore | 3 +++ dist/arch/PKGBUILD | 43 ++++++++++++++++++++++++++++++++++++ dist/arch/gnu-social.install | 18 +++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 dist/arch/.gitignore create mode 100644 dist/arch/PKGBUILD create mode 100644 dist/arch/gnu-social.install diff --git a/dist/arch/.gitignore b/dist/arch/.gitignore new file mode 100644 index 0000000000..101162fe89 --- /dev/null +++ b/dist/arch/.gitignore @@ -0,0 +1,3 @@ +src/* +pkg/* +*.tar.zst diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD new file mode 100644 index 0000000000..f1dfcc4f24 --- /dev/null +++ b/dist/arch/PKGBUILD @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Maintainer: Hugo Sales hsal es> +pkgname=gnu-social-git +pkgver=3.0.0dev.293c6fe +pkgrel=1 +pkgdesc="GNU social is a social communication software used in federated social networks. It is widely supported and has a large user base. It is already used by the Free Software Foundation" +arch=(any) +url="https://www.gnusocial.rocks/" +license=('AGPL') +groups=() +depends=(php nginx) +makedepends=(git) +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +replaces=() +backup=() +options=() +install=gnu-social.install +source=() +noextract=() +md5sums=() + +prepare() { + if [ ! -d "${srcdir}/${pkgname%-git}" ]; then + git clone --depth 1 'https://codeberg.org/GNUsocial/gnu-social.git' "${srcdir}/${pkgname%-git}" + else + git pull + fi +} + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "3.0.0dev.%s" "$(git rev-parse --short HEAD)" +} + +package() { + cd "$srcdir/${pkgname%-git}" + mkdir -p "${pkgdir}/var/www/gnu-social" + mkdir -p "${pkgdir}/etc/nginx/conf.d" + cp -r components config extlib plugins public src social.yaml templates translations "${pkgdir}/var/www/gnu-social" + cp docker/nginx/nginx.conf "${pkgdir}/etc/nginx/conf.d/gnu-social.conf" +} diff --git a/dist/arch/gnu-social.install b/dist/arch/gnu-social.install new file mode 100644 index 0000000000..e6db36c047 --- /dev/null +++ b/dist/arch/gnu-social.install @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +post_install() { + echo <</install and follow the instructions + + See https://docs.gnusocial.rocks/administrator/install/no_docker_shell.html + if you need help, or contact the developers in #social IRC +EOF +}