summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9ed9dfc9190b8bf0742b47381b4c1cf9ec3b18b9 (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
# Maintainer: Shun Terabayashi <shunonymous@gmail.com>
_repo=blender_mmd_tools
pkgname=blender-plugin-mmd-tools-git
_version=0.4.4
pkgver=v0.4.4.r397.g74efbc1
pkgrel=1
pkgdesc="Blender addon for importing Models and Motions of MikuMikuDance."
arch=('i686' 'x86_64')
url="https://github.com/powroupi/blender_mmd_tools"
license=('MIT')
groups=('blender')
depends=('blender')
makedepends=('git')
source=("git+https://github.com/powroupi/$_repo#branch=dev_test")
md5sums=('SKIP')

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

package() {
  cd "${srcdir}/${_repo}"

  _blender_ver=$(blender -v | head -n1 | cut -f2 -d ' ')
  _addons_dir="${pkgdir}/usr/share/blender/${_blender_ver}/scripts/addons/"
  _addon_name="mmd_tools"

  install -dm755 ${_addons_dir}/${_addon_name}
  for file in `find ${_addon_name} -type f`
  do
    install -Dm755 $file ${_addons_dir}/${file}
  done
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim:set ts=2 sw=2 et: