diff --git a/sci-electronics/saleae-logic-bin/Manifest b/sci-electronics/saleae-logic-bin/Manifest index 06734c7e..d505e6ad 100644 --- a/sci-electronics/saleae-logic-bin/Manifest +++ b/sci-electronics/saleae-logic-bin/Manifest @@ -2,6 +2,6 @@ AUX Logic.sh 359 BLAKE2B e8869d43b6f8cc08472669636b9e153dcd2dd56854b429b8091dbe2 DIST Logic-2.3.55-master.AppImage 168567824 BLAKE2B 5eef4973056556bd606da512545bafff5cc57ea51e488a81cedb1139ff02d9f6e9d29aa4a3ea46dc6de7c24007059056b312990776eaf32a41b0dcce20720440 SHA512 45bdb252818242fdae55daa51034a0c6b96d9539dbf3399c53cb389aff1013da6dbfc71d9130b1fc5f2bb10592107c0cb9c911039772a487f69049e33c4cc2ca DIST Logic-2.4.13-linux-x64.AppImage 169502804 BLAKE2B da88649c8493389ea31516b230ade964b286526a27590f1d85d24fff0f58a1ecff94d167dff44ac2c9c450c9243f76ef9a2926a1e96fdcda694873f9c8ddc309 SHA512 63efb0343f73cc7ec78ef47255bfc288dc8de94c63f163c9051c26539d7ebdafba06e5ef28ee9976b0978a6092152e1b68515355b445baf94e4cf4c6e7b44446 EBUILD saleae-logic-bin-2.3.55.ebuild 2915 BLAKE2B fad520503d0349ba2ec5056ea0631b6ef49f931de8eae138090abc15ab9c4c7f6d0601a4a405bda8f6f608fbb1b2a8e00c21f76c2ca376b9ed406b126c937b39 SHA512 99095eb5a4fca75aa464f4a0f8519b39d14144c8188adc2ceee81e7822dc8b21cb6357d23492dba5e71a6656bc4183ae9c086128cf267bdbf2f1e3589427ac0e -EBUILD saleae-logic-bin-2.4.13.ebuild 3317 BLAKE2B aa88dacb38dd816e6a92397a7495ab1e7366393906a8898052cd23dc4195ce5ae7c7196fcb6de46b5137e09c3819f02c4033cf7be9dbe94f0f87ab330a049949 SHA512 e3f9fb4dde0c165e958feed7262e5b1595eec046a6a2ca27c810d6954838f74b66587d38c6d6850beb04b725e27f971f1e5e64d9e4a9abd15040ab3eb3f7e1b4 +EBUILD saleae-logic-bin-2.4.13.ebuild 3045 BLAKE2B b3a99a012c8c6005792b3f79a445693b363da348651443e8f74278cfa966f92148808eaa23771424326e9bfdeb2b9c035d6b162e4591abce10588584bd6a310c SHA512 9773410c8e29479309c88d9da89a7d91c163e397997a38204a443e3805dab8410cbbc15e7a0428abe6a9e6be25467570bb0c8f20b1ce128bdc32190766df67b2 MISC ChangeLog 405 BLAKE2B 5fd50b228496d7ca318aed901b5dfc3ce33fc7327331495a1f94417087fcb9b6260e4f6ddde90e510507968208e2e16ca076b27005555679ff26272505a668f4 SHA512 0a832dcab3105dbfc8856c8a8e2eae4bf85ac2aa97d06c19b2591b4acde7fa5e7690e1ff1dc01799a19dad0f80bb0aec58925f5e3192331101af2fcb93e126bd MISC metadata.xml 411 BLAKE2B 6bd76e3591b8a2d88277f9ebfbd5951a7458a266adf5818533a1d829a770db62e1de41a4cb4f29206ed5eb381c6f4bfdc04973c4c65bd72496b7e31b6c85880f SHA512 df1f54923628bff824dc8835c96902bd07d4462472b9b8f356abb0b9b81875d78fa96e511290739ecc5423eadc8b2579a65b2f31f9c2c6a73c8d3413c0603d98 diff --git a/sci-electronics/saleae-logic-bin/saleae-logic-bin-2.4.13.ebuild b/sci-electronics/saleae-logic-bin/saleae-logic-bin-2.4.13.ebuild index 68bc4567..b9ee154a 100644 --- a/sci-electronics/saleae-logic-bin/saleae-logic-bin-2.4.13.ebuild +++ b/sci-electronics/saleae-logic-bin/saleae-logic-bin-2.4.13.ebuild @@ -60,42 +60,40 @@ pkg_setup() { } src_prepare() { + sed -i "/^Exec=/cExec=${MY_PN}" "${P}/Logic.desktop" \ + || die "Failed to patch desktop file" sed -i "/^X-AppImage/d" "${P}/Logic.desktop" \ || die "Failed to patch desktop file" sed -i "s/^X-AppImage-Version=/Version=/" "${P}/Logic.desktop" \ || die "Failed to patch desktop file" - sed -i 's/^Exec=AppRun/Exec=${MY_PN}/' "${P}/Logic.desktop" \ - || die "Failed to patch desktop file" default_src_prepare } src_install() { - dodir /opt/Saleae/Logic - mv ${P}/usr/lib ${P} + + dodir /opt/Saleae mv ${P}/usr "${ED}" - rm -f ${P}/Logic.png - rm -f ${P}/.DirIcon - rm -f ${P}/AppRun - rm -f ${P}/version - find ${P} -type d -exec chmod 755 {} \; - find ${P} -type f -exec chmod 644 {} \; - find ${P} -type f -name "*.so*" -print0 |xargs -0 chmod +x - find ${P}/resources/linux/pythonlibs/bin -type f -print0 |xargs -0 chmod +x - find ${P}/resources/app.asar.unpacked/node_modules/@saleae/graph-interface/bin -type f -print0 |xargs -0 chmod +x - chmod +x ${P}/Logic - cp -a ${P}/* "${ED}"/opt/Saleae/Logic || die "Failed to move directory" - sed -e "s!@LOGIC@!/opt/Saleae/Logic!g" ${FILESDIR}/Logic.sh > "${ED}"/opt/Saleae/Logic/Logic.sh - chmod +x "${ED}"/opt/Saleae/Logic/Logic.sh + mv "${P}" "${ED}/opt/Saleae/${MY_PN}" + mkdir -p "${ED}/usr/share/applications" + mv "${ED}/opt/Saleae/Logic/Logic.desktop" "${ED}/usr/share/applications/${MY_PN}.desktop" + rm "${ED}/opt/Saleae/${MY_PN}/Logic.png" + rm "${ED}/opt/Saleae/${MY_PN}/.DirIcon" + rm "${ED}/opt/Saleae/${MY_PN}/AppRun" + rm "${ED}/opt/Saleae/${MY_PN}/version" + rm -rf "${ED}/usr/lib/" - # remove chrome-sandbox binary, users should use kernel namespaces - # https://bugs.gentoo.org/692692#c18 - rm "${ED}"/opt/Saleae/Logic/chrome-sandbox || die - - dosym ../../opt/Saleae/Logic/Logic.sh /usr/bin/Logic - domenu "${ED}"/opt/Saleae/Logic/Logic.desktop - #doicon "${ED}"/opt/Saleae/Logic/Logic.png dodir /etc/udev/rules.d - cat "${ED}"/opt/Saleae/Logic/resources/linux/99-SaleaeLogic.rules > "${ED}"/etc/udev/rules.d/99-SaleaeLogic.rules + install -Dm644 "${ED}/opt/Saleae/${MY_PN}/resources/linux-x64/99-SaleaeLogic.rules" "${ED}/etc/udev/rules.d/99-SaleaeLogic.rules" + + # Fix permissions (example: 700->755, 640->644) + find "${ED}/opt/Saleae/${MY_PN}" -perm "/111" -exec chmod 755 \{\} \; + find "${ED}/opt/Saleae/${MY_PN}" ! -perm "/111" -exec chmod 644 \{\} \; + chmod 4755 "${ED}/opt/Saleae/${MY_PN}/chrome-sandbox" + + mkdir -p "${ED}/usr/bin/" + ln -s "/opt/Saleae/${MY_PN}/Logic" "${ED}/usr/bin/${MY_PN}" + udev_reload + }