blob: fc96ee1914e8626bde8b02b45ba0257f085c11eb (
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
|
# Maintainer: Alexis Polti <ArchSegger at gmail dot com>
# Maintainer: pzl <alsoelp at gmail dot com>
pkgname=jlink-software-and-documentation
pkgver=6.20e
pkgrel=0
epoch=9
pkgdesc="Segger JLink software & documentation pack for Linux"
arch=('i686' 'x86_64')
license=('custom')
groups=('jlink')
depends=('glibc' 'libudev0-shim')
source_x86_64=("JLink_Linux_${pkgver/./}_x86_64.tgz::https://www.segger.com/downloads/jlink/JLink_Linux_V${pkgver/./}_x86_64.tgz")
source_i686=("JLink_Linux_${pkgver/./}_i686.tgz::https://www.segger.com/downloads/jlink/JLink_Linux_V${pkgver/./}_i386.tgz")
md5sums_i686=('76a55cdf0531fc5c6d580aaedda78ec8')
md5sums_x86_64=('a88a3105c22b5c3f69a8ea7b6216a08d')
install=$pkgname.install
url="https://www.segger.com/jlink-software.html"
conflicts=("j-link-software-and-documentation")
replaces=("j-link-software-and-documentation")
DLAGENTS=("https::/usr/bin/env curl -o %o -d accept_license_agreement=accepted -d confirm=yes ")
prepare() {
# Change src path name
if [ ${CARCH} = "i686" ]; then
mv JLink_Linux_V${pkgver/./}_i386 JLink
else
mv JLink_Linux_V${pkgver/./}_x86_64 JLink
fi
}
package(){
# Match package placement from their .deb, in /opt
install -dm755 "${pkgdir}/opt/SEGGER/JLink" \
"${pkgdir}/usr/share/licenses/${pkgname}" \
"${pkgdir}/usr/lib/" \
"${pkgdir}/usr/bin/" \
"${pkgdir}/etc/udev/rules.d/" \
"${pkgdir}/usr/share/doc/${pkgname}/"
cd ${srcdir}/JLink
# Bulk copy everything
cp --preserve=mode -r J* Doc Samples Devices README.txt GDBServer lib* "${pkgdir}/opt/SEGGER/JLink"
if [ ${CARCH} = "x86_64" ]; then
cp --preserve=mode -r x86 "${pkgdir}/opt/SEGGER/JLink"
fi
# Create links where needed
ln -s /opt/SEGGER/JLink/Doc/License.txt "${pkgdir}/usr/share/licenses/${pkgname}/"
sed -i 's/0x//g' 99-jlink.rules
install -Dm644 99-jlink.rules "${pkgdir}/etc/udev/rules.d/"
for f in J*; do
ln -s /opt/SEGGER/JLink/"$f" "${pkgdir}/usr/bin"
done
rm "${pkgdir}/usr/bin/JLinkDevices.xml"
for f in Doc/*; do
ln -s /opt/SEGGER/JLink/"$f" "${pkgdir}/usr/share/doc/${pkgname}"
done
}
|