summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 10071b31181c1d84670702fad7118a95fe535b53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Maintainer: FadeMind <fademind@gmail.com>
# Contributor: Tianjiao Yin <ytj000+aur@gmail.com>

_plugin_name=unmht
pkgname=firefox-extension-${_plugin_name}
pkgver=8.1.0
pkgrel=3
pkgdesc="view MHT (MHTML) web archive format files, and save complete web pages, including text and graphics, into a single MHT file"
license=('MPL')
arch=('any')
url="https://addons.mozilla.org/firefox/addon/${_plugin_name}"
depends=("firefox")
makedepends=('unzip')
source=("https://addons.cdn.mozilla.net/user-media/addons/8051/${_plugin_name}-${pkgver}-sm+tb+fx+an.xpi")
sha256sums=('f47f77e04e9938560c50e4684557ebe4c9355b6cacea430ce91d8d16f88e85b3')
noextract=("${_plugin_name}-${pkgver}-sm+tb+fx+an.xpi")

prepare(){
    unzip -qqo ${_plugin_name}-${pkgver}-sm+tb+fx+an.xpi
}

package() {
    cd "$srcdir"
    emid=$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' install.rdf)
    local dstdir="$pkgdir/usr/lib/firefox/browser/extensions/${emid}"
    install -d "$dstdir"
    rm *.xpi
    cp -dpr --no-preserve=ownership * "$dstdir"
    chmod -R 755 "$dstdir"
}