summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2015-07-30 12:17:17 +0200
committerXZS2015-07-30 12:17:17 +0200
commite26da0c3e10460b4fe232c648fd7ac370bbeccaf (patch)
tree89657b719d1072cb05b515d9981e789729ef2c83
downloadaur-e26da0c3e10460b4fe232c648fd7ac370bbeccaf.tar.gz
intital import from old AUR version 3
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD78
2 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4f0ea4c880c8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = firefox-extension-hide-tab-bar-with-one-tab
+ pkgdesc = Hide the tab bar if there is only one tab.
+ pkgver = 1.5.1.signed
+ pkgrel = 1
+ url = http://forums.mozillazine.org/viewtopic.php?f=48&t=2141579
+ arch = any
+ license = MPLv2
+ makedepends = rasqal
+ depends = firefox
+ source = firefox-extension-hide-tab-bar-with-one-tab.zip::https://addons.mozilla.org/firefox/downloads/latest/hide-tab-bar-with-one-tab/platform:2/
+ md5sums = 0177f69d998d66a9f181b5744bee21a1
+
+pkgname = firefox-extension-hide-tab-bar-with-one-tab
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f8e7e5f3122a
--- /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-hide-tab-bar-with-one-tab
+pkgver=1.5.1.signed
+pkgrel=1
+pkgdesc='Hide the tab bar if there is only one tab.'
+url='http://forums.mozillazine.org/viewtopic.php?f=48&t=2141579'
+license=('MPLv2')
+md5sums=('0177f69d998d66a9f181b5744bee21a1')
+
+[ "$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%%-*}))
+}