summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5dc1d2420ecdfc0fbe5e439e2370378d3b4a32b6 (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
# Maintainer: Frederik Leonhardt <frederik at leonhardt dot co dot nz>
pkgname=bluebrick
pkgver=1.9.1
pkgrel=2
pkgdesc="BlueBrick Lego Layout Planer"
arch=('x86_64')
url="https://bluebrick.lswproject.com"
license=('GPL-3.0-only')
depends=('mono')
optdepends=('xchm: to read the documentation')
options=(!strip)
source=("$pkgname-$pkgver.zip::https://bluebrick.lswproject.com/download/BlueBrick.${pkgver}.zip"
        "$pkgname.desktop"
        "$pkgname.xml")
sha256sums=('2fc69f384a1232d8e33cf3fb91cda0d2b8e876cbcdb072e5acfe4da2153b72c5'
            '3ef1c6c69ee75a4f4044197c8c38a7a739c5ab3b190aab579f6a29433ef88f5f'
            '881df2737967036622ab829035de0d52e9e65bcba867cd5da69bed5206369072')

package() {

  install -Dd "$pkgdir/opt/$pkgname"

  # The parts library folder and global config file locations are not configurable,
  # and need to be writable for the user running the program.
  install -dm757 "$pkgdir/opt/$pkgname/parts"
  install -m666 "$srcdir/BlueBrick.exe.config" "$pkgdir/opt/$pkgname/"

  # The remaining files can be taken from the distribution.
  local item
  local files=(
    config/
    icons/
    parts/
    BlueBrick.chm
    BlueBrick.exe
    ReadMe.txt
  )
  for item in "${files[@]}" ; do
    cp -r "$srcdir/$item" "$pkgdir/opt/$pkgname/"
  done

  # Meta: desktop and mimetypes.
  install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
  install -Dm644 "$srcdir/$pkgname.xml" "$pkgdir/usr/share/mime/packages/$pkgname.xml"
}