summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f33d52c2a2711ffdb1d39566011c182baac1eb09 (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
47
48
# Maintainer: Lander
pkgname=rmfakecloud
pkgver=0.0.21
pkgrel=1
pkgdesc="host your own cloud for the remarkable"
arch=('x86_64')
url="https://github.com/ddvk/rmfakecloud"
license=('AGPL3')
depends=(
  'nodejs'
)
makedepends=(
  'go'
  'yarn'
)
source=(
  "${pkgname}-${pkgver}.tar.gz::https://github.com/ddvk/rmfakecloud/archive/v${pkgver}.tar.gz"
  "rmfakecloud.service"
  "rmfakecloud.conf"
)
sha256sums=(
  'd28d7550ae11d11108b309c17898d91a1ddb4972178c03c9f572ef4c756f1dab'
  '5f5ba109ab19df8f00bae6300f0f7028a7995f2b54d0505e703dd5f04d83468a'
  'f992a133142f9706e700531fc23ea7eb8ba7f2bfda97626bcccd121e06610a10'
)
backup=(
  'etc/rmfakecloud.conf'
)

build() {
  export GOPATH="$srcdir"/gopath
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export CGO_ENABLED=1

  cd "$srcdir/$pkgname-$pkgver"
  make VERSION=$pkgver DESTDIR="$pkgdir" PREFIX="/usr" build
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  install -Dm755 dist/rmfakecloud-x64 "${pkgdir}/usr/bin/rmfakecloud"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm644 "${srcdir}/rmfakecloud.service" "${pkgdir}/usr/lib/systemd/system/rmfakecloud.service"
  install -Dm644 "${srcdir}/rmfakecloud.conf" "${pkgdir}/etc/rmfakecloud.conf"
}