summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f220e4425359ffb0666b6f9d8bc4ce76178b6e80 (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
# Maintainer: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=nextcloud-app-calendar-git
epoch=1
pkgver=2.0.0.r1.g6a8575a0
pkgrel=1
pkgdesc="Calendar app for nextcloud"
arch=('any')
url="http://nextcloud.com"
license=('AGPL')
depends=('nextcloud')
makedepends=('npm' 'git')
conflicts=('nextcloud-app-calendar')
provides=('nextcloud-app-calendar')
options=('!strip')
source=("git+https://github.com/nextcloud/calendar.git")
sha512sums=('SKIP')

pkgver() {
  cd "calendar"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-beta/beta/g;s/-rc/rc/g;s/-/./g' | cut -d "v" -f2
}

build() {
  cd "${srcdir}/calendar"
  # -j1 so that `npm install` runs before other steps
  make -j1 dev-setup build-js-production appstore
}

package() {
  install -d "$pkgdir"/usr/share/webapps/nextcloud/apps
  tar -xvf "${srcdir}/calendar/build/artifacts/appstore/calendar.tar.gz" -C "${pkgdir}/usr/share/webapps/nextcloud/apps/"
  # npm polishments
  chown -R root:root "$pkgdir"
  find "${pkgdir}"/usr -type d -exec chmod 755 {} +
  find "${pkgdir}"/usr -type f -exec chmod 644 {} +
}