diff options
author | XZS | 2015-07-30 12:17:18 +0200 |
---|---|---|
committer | XZS | 2015-07-30 12:17:18 +0200 |
commit | 60beeb08caa539b841fb16e8d895a69eb443b6f6 (patch) | |
tree | ded0862e400bf03ddb90d847d145aa25673122f4 | |
download | aur-60beeb08caa539b841fb16e8d895a69eb443b6f6.tar.gz |
intital import from old AUR version 3
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 78 |
2 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..88f1873dcd0f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = firefox-extension-flash-video-downloader + pkgdesc = download your favorite videos in 1 click + pkgver = 7.3.1.1.signed + pkgrel = 1 + url = http://www.flashvideodownloader.org/ + arch = any + license = MPLv1.1 + makedepends = rasqal + depends = firefox + source = firefox-extension-flash-video-downloader.zip::https://addons.mozilla.org/firefox/downloads/latest/flash-video-downloader/platform:2/ + md5sums = ee49d420a55574f967cbb02138d93541 + +pkgname = firefox-extension-flash-video-downloader + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5cee7f908ce3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,78 @@ +# Maintainer: XZS <d.f.fischer at web dot de> +# This PKGBUILD is maintained on GitHub <https://github.com/dffischer/mozilla-extensions>. +# You may find it convenient to file issues and pull requests there. + +pkgname=firefox-extension-flash-video-downloader +pkgver=7.3.1.1.signed +pkgrel=1 +pkgdesc='download your favorite videos in 1 click' +url='http://www.flashvideodownloader.org/' +license=('MPLv1.1') +md5sums=('ee49d420a55574f967cbb02138d93541') + +[ "$arch" ] || arch=('any') + +source+=("${pkgname}.zip::https://addons.mozilla.org/firefox/downloads/latest/${pkgname#*-*-}/platform:2/") + +prepare() { + rm ${pkgname}.zip +} + +makedepends+=(rasqal) + +sparql() { + roqet -e "PREFIX em: <http://www.mozilla.org/2004/em-rdf#> SELECT ?x WHERE { $1 }" \ + -D "${2:-install.rdf}" -r csv 2>/dev/null | tr -d '\r' | tail -n 1 | head -c -1 +} + +pkgver() { + sparql '<urn:mozilla:install-manifest> em:version ?x' | tr - . +} + +version-range() { + local emid=$(emid $1) + echo "$1>$(version min $emid)" "$1<$(version max $emid)" +} + +emid() { + case $1 in + firefox) echo '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}' ;; + thunderbird) echo '{3550f703-e582-4d05-9a08-453d09bdfdc6}' ;; + *) return 1 ;; + esac +} + +version() { + local version; + version=$(sparql "[] em:id '$2' ; em:${1}Version ?x" \ + "$srcdir/install.rdf" ) + if [[ $version =~ ([[:digit:]]+).\* ]]; then + if [[ $1 = max ]]; then + echo $(( ${BASH_REMATCH[1]} + 1 )) + else + echo "=${BASH_REMATCH[1]}" + fi + else + echo "=$version" + fi +} + +prepare_target() { + local target=${pkgname%%-*} + id="$(sparql '<urn:mozilla:install-manifest> em:id ?x')" + destdir="$pkgdir/usr/lib/${target/firefox/firefox\/browser}/extensions" + install -d "$destdir" +} + +depends=(${pkgname%%-*}) + +package() { + compose_dependencies + prepare_target + cp --no-preserve=ownership,mode -r . "$destdir/$id" +} + +# Hidden from mksrcinfo in silly subfunction. +compose_dependencies() { + depends=($(version-range ${pkgname%%-*})) +} |