summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2cf8b833c3d82f553a3d5356b6a8c8e920910ca9 (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
pkgname="ms-office-online-nativefier"
pkgver="0.2"
pkgrel="1"
pkgdesc="Microsoft Office Online is an Office suite that is offered as a free web application and is part of the Microsoft Office family."
arch=("x86_64")
license=("MIT")
url="https://github.com/jiahaog/nativefier"
source=("${pkgname}.png" "${pkgname}.desktop")
makedepends=("nodejs" "npm" "nodejs-nativefier")
sha256sums=("SKIP" "SKIP")

build() {
    cd "${srcdir}"

    nativefier "https://www.office.com" \
      --icon "${pkgname}.png" \
      --maximize \
      --internal-urls ".*" \
      --name "Microsoft Office Online"
}

package() {
  install -dm755 "${pkgdir}/opt/"
  install -dm755 "${pkgdir}/usr/bin"
  install -dm644 "${pkgdir}/usr/share/pixmaps"
  install -dm644 "${pkgdir}/usr/share/applications"

  install -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/"
  cp -rL "${srcdir}/MicrosoftOfficeOnline-linux-x64" "${pkgdir}/opt/${pkgname}"

  ln -sf "/opt/${pkgname}/MicrosoftOfficeOnline" "${pkgdir}/usr/bin/${pkgname}"
  ln -sf "/opt/${pkgname}/resources/app/icon.png" "${pkgdir}/usr/share/pixmaps/MicrosoftOfficeOnline.png"

  chmod 777 "${pkgdir}/opt/${pkgname}/resources/app/nativefier.json"
}