summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4ca04e1a97b23fbaf150dad067fb5dc3b0214507 (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
# Maintainer: Grey Christoforo <first name at last name dot net>

pkgname=kicad-packages3d-git
pkgver=5.1.6.r26.gd8b7e8c5
pkgrel=1
pkgdesc="KiCad component 3D model libraries from the official git repo"
arch=('any')
url=https://gitlab.com/kicad/libraries/kicad-packages3D
license=('GPL')
options=('!strip')
makedepends=(
cmake
git
ninja
)
conflicts=('kicad-library-bzr' 'kicad-library-git' 'kicad-library-3d' 'kicad-library' 'kicad-packages' 'kicad-packages3d')
provides=('kicad-packages3d')
source=(git+https://gitlab.com/kicad/libraries/kicad-packages3D)
sha256sums=('SKIP')

pkgver() {
  cd kicad-packages3D
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd kicad-packages3D
  cmake \
    -B build_dir \
    -D CMAKE_BUILD_TYPE=None \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -G Ninja \
    -S .

  cmake --build build_dir
}

package() {
  cd kicad-packages3D
  DESTDIR="${pkgdir}" cmake --build build_dir -- install

  install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 LICENSE.md
}