diff --git a/srcpkgs/android-studio/files/android-studio.desktop b/srcpkgs/android-studio/files/android-studio.desktop deleted file mode 100644 index e0d611a8591..00000000000 --- a/srcpkgs/android-studio/files/android-studio.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Android Studio -Exec=android-studio -Icon=/opt/android-studio/bin/studio.png -Terminal=false -Categories=Development diff --git a/srcpkgs/android-studio/template b/srcpkgs/android-studio/template index 3e5cc222253..8dd73f6e884 100644 --- a/srcpkgs/android-studio/template +++ b/srcpkgs/android-studio/template @@ -1,7 +1,7 @@ # Template file for 'android-studio' pkgname=android-studio version=2023.3.1.18 -revision=1 +revision=2 archs="x86_64" hostmakedepends="tar" short_desc="Official Android IDE" @@ -57,6 +57,18 @@ skiprdeps="/opt/android-studio/plugins/android/resources/process-tracker-agent/n /opt/android-studio/plugins/android-ndk/resources/lldb/lib/python3.10/lib-dynload/_curses.cpython-310-x86_64-linux-gnu.so /opt/android-studio/plugins/android-ndk/resources/lldb/lib/python3.10/lib-dynload/_curses_panel.cpython-310-x86_64-linux-gnu.so" +post_extract() { + bsdtar xf lib/app.jar entry.desktop +} + +post_patch() { + vsed -i -e 's/\$NAME\$/Android Studio/' entry.desktop + vsed -i -e 's/\$ICON\$/\/opt\/android-studio\/bin\/studio.svg/' entry.desktop + vsed -i -e 's/\$SCRIPT\$/android-studio/' entry.desktop + vsed -i -e 's/\$COMMENT\$/The Drive to Develop/' entry.desktop + vsed -i -e 's/\$WM_CLASS\$/jetbrains-studio/' entry.desktop +} + do_install() { vmkdir opt/${pkgname} vcopy bin opt/${pkgname}/ @@ -68,6 +80,6 @@ do_install() { vmkdir usr/bin ln -s /opt/android-studio/bin/studio.sh ${DESTDIR}/usr/bin/android-studio - vinstall "${FILESDIR}/android-studio.desktop" 644 usr/share/applications/ + vinstall entry.desktop 644 usr/share/applications android-studio.desktop chmod -R ugo+rX ${DESTDIR}/opt }