Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/surf/
Date: Mon, 12 Jul 2021 15:32:25
Message-Id: 1626103932.f57556a029ef32d4f7d7aaef7b430ae4cb78aca6.juippis@gentoo
1 commit: f57556a029ef32d4f7d7aaef7b430ae4cb78aca6
2 Author: jakeogh <github.com <AT> v6y <DOT> net>
3 AuthorDate: Mon Jul 12 00:56:25 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 12 15:32:12 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f57556a0
7
8 www-client/surf: add xdg desktop entry
9
10 Closes: https://bugs.gentoo.org/694768
11 Signed-off-by: Justin Keogh <bugs.gentoo.org <AT> v6y.net>
12 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
13
14 www-client/surf/surf-9999.ebuild | 23 ++++++++++++++++++++++-
15 1 file changed, 22 insertions(+), 1 deletion(-)
16
17 diff --git a/www-client/surf/surf-9999.ebuild b/www-client/surf/surf-9999.ebuild
18 index 2b48a07f1c2..9dce31f4128 100644
19 --- a/www-client/surf/surf-9999.ebuild
20 +++ b/www-client/surf/surf-9999.ebuild
21 @@ -2,7 +2,7 @@
22 # Distributed under the terms of the GNU General Public License v2
23
24 EAPI=7
25 -inherit savedconfig toolchain-funcs
26 +inherit savedconfig toolchain-funcs desktop xdg
27
28 DESCRIPTION="a simple web browser based on WebKit/GTK+"
29 HOMEPAGE="https://surf.suckless.org/"
30 @@ -73,4 +73,25 @@ src_install() {
31 fi
32
33 save_config config.h
34 +
35 + newicon "${S}"/"${PN}".png "${PN}".png
36 +
37 + local mime_types="text/html;text/xml;application/xhtml+xml;"
38 + mime_types+="x-scheme-handler/http;x-scheme-handler/https;"
39 + make_desktop_entry \
40 + "surf" \
41 + "Surf" \
42 + "surf" \
43 + "Network;WebBrowser" \
44 + "MimeType=${mime_types}\nStartupWMClass=surf"
45 +}
46 +
47 +pkg_postinst() {
48 + xdg_desktop_database_update
49 + xdg_icon_cache_update
50 +}
51 +
52 +pkg_postrm() {
53 + xdg_desktop_database_update
54 + xdg_icon_cache_update
55 }