summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2016-10-14 21:30:58 -0400
committerIan Stakenvicius <axs@gentoo.org>2016-10-29 10:35:45 -0400
commitdd0d66a343d384fe9d8c62622180b04e8ac94041 (patch)
tree2ab7c406e6918cbccdd49564794155ffb163bcf8 /app-misc/mswinurl_launcher/mswinurl_launcher-1.0.ebuild
parentmedia-sound/playerctl: fix xdg related sandbox violation #596166 (diff)
downloadgentoo-dd0d66a343d384fe9d8c62622180b04e8ac94041.tar.gz
gentoo-dd0d66a343d384fe9d8c62622180b04e8ac94041.tar.bz2
gentoo-dd0d66a343d384fe9d8c62622180b04e8ac94041.zip
app-misc/mswinurl_launcher: rescue from sunrise
This package has been a long time coming. Introduced to the Sunrise overlay in 2008, it was kept out of the tree primarily due to a license issue (since the upstream script doesn't have one). To be honest I'm not sure if *.url files are still created in recent versions of Windows anymore, but I personally still have filesystems with WindowsXP installed on them that I only access through linux, and having this file association open the url in my system's default browser is quite handy. The main difference between this package and that from Sunrise is that the .desktop file is created inline rather than being a separate file, and that there is an appropriate LICENSE and RESTRICT=mirror to allow the package to legally exist in the gentoo repo. This ebuild has also been converted to EAPI6. The ChangeLog from sunrise is as follows: 10 Sep 2009; Thomas Sachau (Tommy[D]) <tommy@gentoo.org> mswinurl_launcher-1.0.ebuild: Drop src_unpack and S assignment, use DISTDIR in src_install directly 08 Sep 2009; Ian Stakenvicius (_AxS_) <ian@aerobiology.ca> +mswinurl_launcher-1.0.ebuild, +files/mswinurl_launcher.desktop, +metadata.xml: New package for bug #283698 - thanks to ssuominen for the ebuild help Package-Manager: portage-2.3.0
Diffstat (limited to 'app-misc/mswinurl_launcher/mswinurl_launcher-1.0.ebuild')
-rw-r--r--app-misc/mswinurl_launcher/mswinurl_launcher-1.0.ebuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/app-misc/mswinurl_launcher/mswinurl_launcher-1.0.ebuild b/app-misc/mswinurl_launcher/mswinurl_launcher-1.0.ebuild
new file mode 100644
index 000000000000..ee0930443322
--- /dev/null
+++ b/app-misc/mswinurl_launcher/mswinurl_launcher-1.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils fdo-mime python-r1
+
+GIST_STRING="77635-a46707715aa2e112d2ea5ec26771030ff5e7eb64"
+
+DESCRIPTION="Launcher and desktop association for MS Windows *.URL (text/x-uri) files"
+HOMEPAGE="https://gist.github.com/endolith/77635"
+SRC_URI="https://gist.github.com/endolith/${GIST_STRING/-//archive/}.tar.gz -> ${P}.tar.gz"
+
+RESTRICT="mirror"
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-util/desktop-file-utils"
+RDEPEND="${PYTHON_DEPS}"
+
+S="${WORKDIR}"/$GIST_STRING
+
+src_install() {
+ dobin ${PN}.py
+ python_replicate_script "${ED%/}"/usr/bin/${PN}.py
+
+ cat <<DESKTOP_EOF >"${T}"/${PN}.desktop
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=MS Windows URL file launcher
+Comment=Python script to parse and launch .url files (html links) from MS Windows
+NoDisplay=true
+Terminal=false
+TryExec=mswinurl_launcher.py
+Exec=mswinurl_launcher.py %F
+Icon=text-html
+MimeType=text/x-uri;
+DESKTOP_EOF
+ domenu "${T}"/${PN}.desktop
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}