Initialize 1.0.0-1 version
This commit is contained in:
parent
4fcf86c52a
commit
6d949aeb5f
22
PKGBUILD
Normal file
22
PKGBUILD
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Maintainer: Your Name <youremail@domain.com>
|
||||||
|
pkgname=pamac-url-handler
|
||||||
|
pkgver=1.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Install ALPM packages with pamac-installer from URL scheme x-alpm-package://packagename"
|
||||||
|
arch=(any)
|
||||||
|
url=""
|
||||||
|
license=(unknown)
|
||||||
|
depends=('pamac-gtk')
|
||||||
|
provides=('pamac-url-handler')
|
||||||
|
backup=()
|
||||||
|
options=(!strip)
|
||||||
|
install='pamac-url-handler.install'
|
||||||
|
source=("pamac-url-handler"
|
||||||
|
"pamac-url-handler.desktop")
|
||||||
|
md5sums=('61007bb8b0d00dabb04c06a7e334653f'
|
||||||
|
'ca911444c12149c3f11be0a26dd9b2dc')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm644 ${srcdir}/pamac-url-handler.desktop ${pkgdir}/usr/share/applications/pamac-url-handler.desktop
|
||||||
|
install -Dm755 ${srcdir}/pamac-url-handler ${pkgdir}/usr/bin/pamac-url-handler
|
||||||
|
}
|
15
pamac-url-handler
Normal file
15
pamac-url-handler
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# ALPM package URL handler
|
||||||
|
# x-alpm-package://packagename
|
||||||
|
# install: xdg-mime default pamac-url-handler.desktop x-scheme-handler/x-alpm-package
|
||||||
|
|
||||||
|
packagename="${1#x-alpm-package://}"
|
||||||
|
echo "${packagename:0:4}"
|
||||||
|
if [[ "aur/" == "${packagename:0:4}" ]]; then
|
||||||
|
name="${packagename##*/}"
|
||||||
|
pamac-installer --build "$name"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
pamac-installer "$packagename"
|
||||||
|
|
13
pamac-url-handler.desktop
Normal file
13
pamac-url-handler.desktop
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=ALPM package URL Handler
|
||||||
|
Comment=Install ALPM packages with pamac-installer from URL scheme x-alpm-package://packagename
|
||||||
|
Icon=system-software-install
|
||||||
|
NoDisplay=true
|
||||||
|
Categories=System;
|
||||||
|
Exec=pamac-url-handler %u
|
||||||
|
Terminal=false
|
||||||
|
MimeType=x-scheme-handler/x-alpm-package;
|
||||||
|
X-Desktop-File-Install-Version=0.1
|
||||||
|
|
5
pamac-url-handler.install
Normal file
5
pamac-url-handler.install
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
post_install() {
|
||||||
|
# register pamac-url-handler script as a default application to handle x-scheme-handler/ x-alpm-package
|
||||||
|
xdg-mime default pamac-url-handler.desktop x-scheme-handler/x-alpm-package
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user