summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2015-07-30 12:17:15 +0200
committerXZS2015-07-30 12:17:15 +0200
commitc078753bd402c0010772c8fbbaea9d4e6c61ffad (patch)
treec84237c2a084e0d1c380d9686e825bffc58e1b55
downloadaur-c078753bd402c0010772c8fbbaea9d4e6c61ffad.tar.gz
intital import from old AUR version 3
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD79
2 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e39a04b63e04
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = firefox-theme-nasa-night-launch
+ pkgdesc = Dark theme for Firefox. Inspired by the night launch of STS-116.
+ pkgver = 0.6.20150625
+ pkgrel = 1
+ url = http://home.comcast.net/~username54321/starfield/index.html
+ arch = any
+ license = custom
+ makedepends = rasqal
+ depends = firefox
+ source = firefox-theme-nasa-night-launch.zip::https://addons.mozilla.org/firefox/downloads/latest/nasa-night-launch/platform:2/
+ md5sums = 865000b40b8e5924117368837d2f9ce1
+
+pkgname = firefox-theme-nasa-night-launch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9bcc40aca9b2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,79 @@
+# Maintainer: XZS
+# Adapted from PKGBUILDs for firefox themes by Tianjiao Yin <ytj000+aur@gmail.com>
+# 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-theme-nasa-night-launch
+pkgdesc="Dark theme for Firefox. Inspired by the night launch of STS-116."
+pkgver=0.6.20150625
+pkgrel=1
+url="http://home.comcast.net/~username54321/starfield/index.html"
+license=('custom')
+md5sums=('865000b40b8e5924117368837d2f9ce1')
+
+[ "$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%%-*}))
+}