summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ef5afb4f740911b813147abf35c8856b2c2a347a (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: Matteo De Carlo <matteo.dek AT gmail DOT com>
pkgname=pencil-material-icons-git
pkgver=2.0.0.r0.g35dd733
pkgrel=1
pkgdesc="All 700+ of Google's Material Design Icons as a Pencil stencil collection."
arch=(any)
url="https://github.com/nathanielw/Material-Icons-for-Pencil/"
license=('MIT')
depends=('pencil')
makedepends=('pacman>=4.1.2' 'git' 'python' 'python-lxml' 'python-cairosvg')
install=
changelog=
_name="Material-Icons-for-Pencil"
source=("git+https://github.com/nathanielw/${_name}.git")
noextract=()
md5sums=('SKIP') 
_installdir="/usr/share/evolus-pencil/content/pencil/stencil/"

pkgver() {
  cd ${_name}
  git describe --long --tags 2>/dev/null | sed 's/[^[:digit:]]*\(.\+\)-\([[:digit:]]\+\)-g\([[:xdigit:]]\{7\}\)/\1.r\2.g\3/;t;q1'
  [ ${PIPESTATUS[0]} -ne 0 ] && \
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  # Downloading material-design-icons submodule
  cd "$srcdir/${_name}"
  git submodule init
  git submodule update
}

build() {
  cd "$srcdir/${_name}"
  python3 generate-xml.py
}

package() {
  DESTDIR="${pkgdir}/${_installdir}"
  cd "${srcdir}/${_name}/gen"
  
  install -m644 -Dt "${DESTDIR}/${_name}" Definition.xml
  install -m644 -Dt "${DESTDIR}/${_name}/icons" icons/*
  install -Dm644 "${srcdir}/${_name}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}"
}