summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7dc17d7b0166eecb3a75120a6c31f93a13454718 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Maintainer: HurricanePootis <hurricanepootis@protonmail.com>
pkgname=blender-bin
pkgver=4.3.0
pkgrel=1
pkgdesc="A fully integrated 3D graphics creation suite (with packaged libraries and python3.11)"
arch=('x86_64')
url="https://blender.org"
license=(
  Apache-2.0
  Bitstream-Vera
  BSD-2-Clause
  BSD-3-Clause
  BSL-1.0
  bzip2-1.0.6
  FTL
  GPL-2.0-or-later
  GPL-3.0-or-later
  LGPL-2.1-or-later
  libpng-2.0
  libtiff
  MIT-Khronos-Old
  MIT
  MPL-2.0
  NCSA
  OFL-1.1
  Python-2.0
  SGI-B-2.0
  Zlib
  LicenseRef-Arev-Fonts
  LicenseRef-ICS
  LicenseRef-LLVM-exception
  LicenseRef-TOST-1.0
)
depends=('glibc' 'bash' 'hicolor-icon-theme'
'libxkbcommon'
'libxi'
'libglvnd'
'libxt'
'libxfixes'
'libxxf86vm'
'level-zero-loader'
'libsm'
'libice'
'mesa'
'libxcrypt-compat'
'libxext'
'zstd'
'libxrender'
'libxcb'
'util-linux-libs'
'libdrm'
'ncurses'
'libx11'
'gcc-libs'
'zlib')
optdepends=('cuda: Cycles renderer CUDA support'
            'intel-compute-runtime: Cycles renderer Intel OneAPI support'
            'libdecor: wayland support'
	    'rocm-hip-runtime: HIP renderer AMD support'
	    'libdecor: Wayland Support')
provides=('blender')
conflicts=('blender')
install=$pkgname.install
source=("https://download.blender.org/release/Blender${pkgver:0:3}/blender-${pkgver}-linux-x64.tar.xz"
	"x-blender.xml")
sha256sums=('6264ff4cf50baf6be6091a28d3c29cf25dc38d8daa3082874ce94d520d3e6ab6'
            '230fc11e49d647215f4735117761d887756823ee1c8fab08987218fd037de75c')
validpgpkeys=()

package() {
	cd "$srcdir/blender-$pkgver-linux-x64"
	mkdir -p "${pkgdir}/usr/lib/${pkgname}/"
	install -Dm755 {blender,blender-thumbnailer} "${pkgdir}/usr/lib/blender-bin/"
	install -Dm644 blender-symbolic.svg "${pkgdir}/usr/share/icons/hicolor/symbolic/apps/blender-symbolic.svg"
	install -Dm644 blender.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/blender.svg"
	install -Dm644 copyright.txt "${pkgdir}/usr/share/licenses/$pkgname/copyright.txt"
	install -Dm644 readme.html "${pkgdir}/usr/share/doc/$pkgname/readme.html"
	install -Dm644 blender.desktop "${pkgdir}/usr/share/applications/blender.desktop"
	install -Dm644 "$srcdir/x-blender.xml" "${pkgdir}/usr/share/mime/application/x-blender.xml"
	
	cp -a -r "${pkgver:0:3}" {lib,textures,usd} "${pkgdir}/usr/lib/${pkgname}"
	cp -a -r -T license "${pkgdir}/usr/share/licenses/${pkgname}"
	pushd "${pkgdir}/usr/lib/${pkgname}/lib"
	for file in *.so*;
	do
		chmod 755 "$file"
	done
	popd
	pushd "${pkgdir}/usr/lib/${pkgname}/lib/mesa"
	for file in *.so*;
	do
		chmod 755 "$file"
	done
	popd

	install -Dm755 blender-launcher "$pkgdir/usr/bin/blender"
	install -Dm755 blender-softwaregl "$pkgdir/usr/bin/blender-softwaregl"
	install -Dm755 blender-system-info.sh "$pkgdir/usr/bin/blender-system-info"
	ln -s "/usr/lib/$pkgname/blender-thumbnailer" "$pkgdir/usr/bin/blender-thumbnailer"
	sed -i 's/\$(dirname "\$(readlink -f "\$0")")/\/usr\/lib\/blender-bin/g' "$pkgdir/usr/bin/blender"
	sed -i 's/BF_DIST_BIN=\$(dirname "\$0")/BF_DIST_BIN=\/usr\/lib\/blender-bin/g' "$pkgdir/usr/bin/blender-softwaregl"
	sed -i 's/BASE_DIR=\$(dirname "\$0")/BASE_DIR=\/usr\/lib\/blender-bin/g' "$pkgdir/usr/bin/blender-system-info"
}