summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3cfb1f07c4da1264dd90ee42d7a9dddd0d9c9d64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Contributor: Jonas Heinrich <onny@project-insanity.org>

pkgname=outline
pkgver=0.81.0
pkgrel=1
pkgdesc="Wiki and knowledge base for growing teams"
arch=('x86_64')
url="https://www.getoutline.com"
license=('BSL')
depends=('yarn' 'nodejs-lts-iron')
#makedepends=('yarn' 'nodejs-lts-iron')
optdepends=('redis' 'postgresql')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/outline/outline/archive/v${pkgver}.tar.gz"
	"outline.service"
	"outline.sysusers"
        "outline-db-create"
        "outline-db-migrate")
sha512sums=('3cfe564f559f9a303652c995200584fb14a084de85b42d8c78380e38ad83700b285fadc8fff56f3786875ea97972dc4c318b9cd16b0846bdb82d9a6d9936ba90'
            'dc980bc23336c6ea7949bf27e0a3c22a56d50bd4db8b64b9a2ab585d1afba40b2260a4d2a99d7e492fde898a58dfa31d422f27722939f92d7a643500d035ebe2'
            'a9849e480b280e04d58e949a1b0f4daa548cd8e2ee3e567524ebe5b04815211294a16aadffa6c7f02e1be87dd13120fad6a551abd040d827a84b42945965efb3'
            '69d8676411e9747f61597d26dd65afeb8942eec30a45e4e63ddea0e005b00822e25bde43460a35e04013b7e4d288bf93175eecfe9368c4a71a674a67372a915b'
            'b37208e5d061e3256591c5e07a7337be3da53ada92a5fc0a9b1f9fa62fd5fd8969a2940db45096c81b557eb3f1299be6506ec51facfb59f930b1db965cebccb0' 
    )
backup=('usr/share/webapps/outline/.env')
options=(!strip) # Stripping unneeded symbols from binaries and libraries takes a lot of time and resources
install=outline.install

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  HUSKY=0 yarn install --frozen-lockfile && yarn build
}

package() {
  install -d "${pkgdir}/usr/share/webapps/outline"
  install -d "${pkgdir}/etc/webapps/outline"

  cp -r "${srcdir}/${pkgname}-${pkgver}/." "${pkgdir}/usr/share/webapps/outline/"

  cp "${pkgdir}/usr/share/webapps/outline/.env.sample" "${pkgdir}/usr/share/webapps/outline/.env"
  ln -s "/usr/share/webapps/outline/.env" "${pkgdir}/etc/webapps/outline/config.env"
    
  install -Dm 644 "${srcdir}/outline.service" "${pkgdir}/usr/lib/systemd/system/outline.service"
  install -Dm 644 "${srcdir}/outline.sysusers" "${pkgdir}/usr/lib/sysusers.d/outline.conf"
  install -Dm 755 "${srcdir}/outline-db-create" "${pkgdir}/usr/local/bin/outline-db-create"
  install -Dm 755 "${srcdir}/outline-db-migrate" "${pkgdir}/usr/local/bin/outline-db-migrate"
}