blob: a83710707f561758ae4af33a590f1b642c9bf91b (
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
|
# Maintainer: Mohamed Tarek <Mokhamed_tarek At mail Dot ru>
# COntributer: knedl1k <knedl1k At tuta Dot io>
pkgname=coppeliasim-bin
_name=coppeliasim
pkgver=4.7.0.rev4
_pkgver=${pkgver//./_}
pkgrel=1
pkgdesc="Robotic Simulation software from Coppelia Robotics. Formally known as VReP."
arch=("x86_64")
url="http://www.coppeliarobotics.com/"
license=("GPL" "LGPL")
optdepends=('icu60: BlueZero api dependency')
depends=('ffmpeg')
conflicts=('coppeliasim')
options=(!strip)
provides=('vrep' 'coppeliasim')
source=("${_name}-${pkgver}.tar.xz::https://www.coppeliarobotics.com/files/V4_7_0_rev4/CoppeliaSim_Edu_V${_pkgver}_Ubuntu22_04.tar.xz")
noextract=("${source[0]%%::*}")
sha256sums=('6665135f41c79e5a2b038c26f033341eabf90d022affb9ffbf0de3fa2f35ae36')
package() {
install -d "${pkgdir}/usr/"{bin,share/doc}
install -d "${pkgdir}/opt/${_name}" "${pkgdir}/usr/share/doc/${_name}"
ln -s "/opt/${_name}/coppeliaSim.sh" "${pkgdir}/usr/bin/${_name}"
# Extract everything but documentation into /opt, and docs into
# /usr/share/doc, and ensure they're owned by root in the fakeroot env
helpFiles="CoppeliaSim_Edu_V${_pkgver}_Ubuntu22_04/manual"
bsdtar -C "${pkgdir}/opt/${_name}/" --strip-components=1 \
--exclude="${helpFiles}" --uid 0 --gid 0 \
-xvJf "${srcdir}/${noextract[0]}"
bsdtar -C "${pkgdir}/usr/share/doc/${_name}/" --strip-components=2 \
--uid 0 --gid 0 \
-xvJf "${srcdir}/${noextract[0]}" "${helpFiles}"
cd "${pkgdir}/opt/${_name}"
# Create an empty placeholder for this file so that pacman is aware of it.
touch updtChck.dat
# Executable application code should *not* be writeable by non-root,
# but this is a silly application so I have no good way of "fixing" this.
find ./ -type d -print0 | xargs -0 chmod go-w
grep -ILZ '' * | xargs -0 chmod go-w
grep -rIlZ '' */ | xargs -0 chmod -x
find ./ -maxdepth 1 -type f -print0 | xargs -0 chmod go-w
find ./ -iname "*.lua" -print0 | xargs -0 chmod 644
find ./ -mindepth 2 -type f -print0 | xargs -0 chmod -x
cd "${pkgdir}/usr/share/doc/${_name}"
# Remove broken symlinks (they symlink to files under /home/marc...)
rm en/simROS2.htm index/simROS2.json
# Documentation shouldn't be executable at all or writable by non-root.
find ./ -print0 | xargs -0 chmod go-w
find ./ -type f -print0 | xargs -0 chmod -x
}
|