diff options
author | Narrat | 2015-05-13 23:00:10 +0200 |
---|---|---|
committer | Narrat | 2015-05-13 23:00:10 +0200 |
commit | b5b5fc46177945ecab7228848e11214b28eae34a (patch) | |
tree | 13bb7d814a5f3bccea89d9cdeb5eb601b36e9b33 | |
download | aur-b5b5fc46177945ecab7228848e11214b28eae34a.tar.gz |
xdg-utils-mimeo: Latest files
History: https://github.com/Narrat/PKGBuilds
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | .gitignore | 15 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | mimeo-detection.diff | 161 |
4 files changed, 262 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7b36374f2034 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = xdg-utils-mimeo + pkgdesc = Command line tools that assist applications with a variety of desktop integration tasks; patched to use mimeo + pkgver = 1.1.0.git20150323 + pkgrel = 1 + url = http://cgit.freedesktop.org/xdg/xdg-utils/ + arch = any + license = MIT + makedepends = docbook-xsl + makedepends = lynx + makedepends = xmlto + makedepends = git + depends = sh + depends = xorg-xset + optdepends = kdebase-runtime: for KDE4 support in xdg-open + optdepends = kde-cli-tools: for KDE Plasma5 support in xdg-open + optdepends = libgnome: for GNOME support in xdg-open + optdepends = exo: for Xfce support in xdg-open + optdepends = xorg-xprop: for Xfce support in xdg-open + optdepends = pcmanfm: for LXDE support in xdg-open + optdepends = mimeo: for mimeo support in xdg-open + optdepends = perl-file-mimeinfo: for generic support in xdg-open + provides = xdg-utils + conflicts = xdg-utils + source = git://anongit.freedesktop.org/xdg/xdg-utils#commit=686f6f48f6ff939c757881e3fc7a852b61d32c94 + source = mimeo-detection.diff + md5sums = SKIP + md5sums = 5f38d0201009df739bb70452f2a3f5b4 + +pkgname = xdg-utils-mimeo + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..784bbcd3ca59 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*/src +*/pkg +*.gz +*.xz +*.bz2 +*.zip +*.part +*.sig +*.sign +*.txt +*.log +*.scm +*/xdg-utils +*/*.pkg +*/*.asc diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bbf78e8c0404 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Lex Black <autumn-wind at web dot de> +# Contributor: matthewbauer <mjbauer95+aur@gmail.com> +# Contributor: Jan de Groot <jgc@archlinux.org> +# Contributor: cantabile <cantabile dot desu at gmail dot com> + +pkgname=xdg-utils-mimeo +pkgver=1.1.0.git20150323 +pkgrel=1 +pkgdesc="Command line tools that assist applications with a variety of desktop integration tasks; patched to use mimeo" +arch=('any') +url="http://cgit.freedesktop.org/xdg/xdg-utils/" +license=('MIT') +depends=('sh' 'xorg-xset') # xset needed inside xdg-screensaver +makedepends=('docbook-xsl' 'lynx' 'xmlto' 'git') +optdepends=('kdebase-runtime: for KDE4 support in xdg-open' + 'kde-cli-tools: for KDE Plasma5 support in xdg-open' + 'libgnome: for GNOME support in xdg-open' + 'exo: for Xfce support in xdg-open' + 'xorg-xprop: for Xfce support in xdg-open' + 'pcmanfm: for LXDE support in xdg-open' + 'mimeo: for mimeo support in xdg-open' + 'perl-file-mimeinfo: for generic support in xdg-open') +provides=('xdg-utils') +conflicts=('xdg-utils') +source=(git://anongit.freedesktop.org/xdg/xdg-utils#commit=686f6f48f6ff939c757881e3fc7a852b61d32c94 + mimeo-detection.diff) +md5sums=('SKIP' + '5f38d0201009df739bb70452f2a3f5b4') + + +pkgver() { + cd xdg-utils + echo "1.1.0.git$(git log -1 --format="%cd" --date=short | sed 's|-||g')" +} + +prepare() { + cd xdg-utils + patch -p1 -i "${srcdir}"/mimeo-detection.diff +} + +build() { + cd xdg-utils + ./configure --prefix=/usr --mandir=/usr/share/man +# make scripts-clean -C scripts # needed if it's a git snapshot +# make man scripts -C scripts # needed if it's a git snapshot + make # for release builds +} + +package() { + cd xdg-utils + make DESTDIR="${pkgdir}" install + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # install empty directory to prevent xdg-desktop-menu install *.desktop to fail, see FS#33316 + install -dm755 $pkgdir/usr/share/desktop-directories +} diff --git a/mimeo-detection.diff b/mimeo-detection.diff new file mode 100644 index 000000000000..208d4bc74aac --- /dev/null +++ b/mimeo-detection.diff @@ -0,0 +1,161 @@ +--- xdg-utils/scripts/xdg-utils-common.in ++++ xdg-utils/scripts/xdg-utils-common.in +@@ -286,6 +286,7 @@ + elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; + elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce + elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; ++ elif which mimeo > /dev/null; then DE=mimeo; + fi + fi + + +--- xdg-utils/scripts/xdg-open.in ++++ xdg-utils/scripts/xdg-open.in +@@ -147,6 +147,17 @@ + { + enlightenment_open "$1" + ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++} ++ ++open_mimeo() ++{ ++ DEBUG 1 "Running mimeo \"$1\"" ++ mimeo "$1" + if [ $? -eq 0 ]; then + exit_success + else +@@ -420,6 +431,10 @@ + open_enlightenment "$url" + ;; + ++ mimeo) ++ open_mimeo "$url" ++ ;; ++ + generic) + open_generic "$url" + ;; + +--- xdg-utils/scripts/xdg-email.in ++++ xdg-utils/scripts/xdg-email.in +@@ -180,6 +180,18 @@ + { + DEBUG 1 "Running exo-open \"$1\"" + exo-open "$1" ++ ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++} ++ ++open_mimeo() ++{ ++ DEBUG 1 "Running mimeo \"$1\"" ++ mimeo "$1" + + if [ $? -eq 0 ]; then + exit_success +@@ -409,6 +421,10 @@ + open_xfce "${mailto}" + ;; + ++ mimeo) ++ open_mimeo "${mailto}" ++ ;; ++ + generic|lxde) + open_generic "${mailto}" + ;; + +--- xdg-utils/scripts/xdg-mime.in ++++ xdg-utils/scripts/xdg-mime.in +@@ -88,6 +88,16 @@ + info_generic "$1" + fi + ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++} ++ ++info_mimeo() ++{ ++ mimeo -m "$1" + if [ $? -eq 0 ]; then + exit_success + else +@@ -565,6 +575,10 @@ + info_gnome "$filename" + ;; + ++ mimeo) ++ info_mimeo "$filename" ++ ;; ++ + *) + info_generic "$filename" + ;; + +--- xdg-utils/scripts/xdg-settings.in ++++ xdg-utils/scripts/xdg-settings.in +@@ -463,6 +463,42 @@ + } + + # }}} xfce ++# {{{ mimeo ++ ++get_browser_mimeo() ++{ ++ DEBUG 1 "Running mimeo -c 'http:'" ++ mimeo -d http: | sed -rn '2s/ ([^ ]+) +.*/\1/p' ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++} ++ ++check_browser_mimeo() ++{ ++ browser=`get_browser_mimeo $1` ++ if [ x"$browser" != x"$1" ]; then ++ echo no ++ exit_success ++ fi ++ echo yes ++ exit_success ++} ++ ++set_browser_mimeo() ++{ ++ DEBUG 1 "Running mimeo --prefer x-scheme-handler/http \"$1\"" ++ mimeo --prefer x-scheme-handler/http \"$1\" ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++} ++ ++# }}} mimeo + # }}} default browser + + # {{{ default url scheme handler +@@ -754,7 +790,7 @@ + detectDE + + case "$DE" in +- kde|gnome*|xfce) ++ kde|gnome*|xfce|mimeo) + dispatch_specific "$@" + ;; + |