summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorpzl2016-01-14 14:54:33 -0500
committerpzl2016-01-14 14:54:33 -0500
commit1331d0360754ba2898d2cbd175c9780e385216ce (patch)
treecbfa99fba9725a270ed201b1928f055d2b728040 /PKGBUILD
parent88083946bd315bd7a9e3c742836549ccce6e929b (diff)
downloadaur-1331d0360754ba2898d2cbd175c9780e385216ce.tar.gz
move package into /opt
Some third-party tools (e.g. from Nordic) expect this to be in /opt and it now matches the .deb and RPM packaged by segger themselves
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 24 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fc058a61cc4..e0eef558c02 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=jlink
_pkgver="510g"
pkgver="5.10g"
-pkgrel=1
+pkgrel=2
pkgdesc="ARM Embedded debugger and flashing software from Segger"
arch=('i686' 'x86_64')
url="https://www.segger.com/jlink-software.html"
@@ -46,17 +46,27 @@ build() {
package() {
cd "${srcdir}"/JLink_Linux_V*
- #documentation and licenses
- install -d "${pkgdir}/usr/share/doc/${pkgname}" "${pkgdir}/usr/lib" "${pkgdir}/usr/bin" "${pkgdir}/etc/udev/rules.d"
- install -Dm644 Doc/License.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm644 Doc/*_JLink.pdf "${pkgdir}/usr/share/doc/${pkgname}/"
- cp -r Samples/JLink/* "${pkgdir}/usr/share/doc/${pkgname}/"
-
- #binaries
- install -Dm755 JLink* "${pkgdir}/usr/bin/"
-
- #libraries and udev rules
- install -Dm644 99-jlink.rules "${pkgdir}/etc/udev/rules.d/99-jlink.rules"
- install -Dm755 libjlinkarm.so.*.* "${pkgdir}/usr/lib/"
- cd "${pkgdir}/usr/lib" && ln -s libjlinkarm.so.*.* libjlinkarm.so.5
+
+ # Match package placement from their .deb, in /opt
+ install -dm755 "${pkgdir}/opt/SEGGER/JLink" \
+ "${pkgdir}/usr/share/licenses/${pkgname}" \
+ "${pkgdir}/usr/share/doc/${pkgname}" \
+ "${pkgdir}/usr/bin" \
+ "${pkgdir}/etc/udev/rules.d" \
+ "${pkgdir}/usr/lib"
+ cp --preserve=mode -r "." "${pkgdir}/opt/SEGGER/JLink"
+
+
+
+ ln -s /opt/SEGGER/JLink/Doc/License.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ ln -s /opt/SEGGER/JLink/Doc "${pkgdir}/usr/share/doc/${pkgname}"
+ ln -s /opt/SEGGER/JLink/99-jlink.rules "${pkgdir}/etc/udev/rules.d/99-jlink.rules"
+
+ for f in JLink*; do
+ ln -s /opt/SEGGER/JLink/"$f" "${pkgdir}/usr/bin"
+ done
+
+ for f in libjlinkarm*; do
+ ln -s /opt/SEGGER/JLink/"$f" "${pkgdir}/usr/lib"
+ done
}