diff options
author | Assaf Sapir | 2017-06-21 01:06:30 +0300 |
---|---|---|
committer | Assaf Sapir | 2017-06-21 01:08:52 +0300 |
commit | d2b33d6adb1d69cb3e4ad124263998791f65d5f0 (patch) | |
tree | 64ec1099383243a3d89c03185d101d708e58d0a4 | |
download | aur-d2b33d6adb1d69cb3e4ad124263998791f65d5f0.tar.gz |
First commmit - addin new dump1090-mictronics-git package
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | dump1090-mictronics.install | 20 | ||||
-rw-r--r-- | dump1090.service | 17 | ||||
-rw-r--r-- | lighttpd.conf | 42 |
5 files changed, 157 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0cc722be5885 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = dump1090-mictronics-git + pkgdesc = FMictronics fork of dump1090, a simple Mode S decoder for RTLSDR devices. + pkgver = 3.3.0.r189.g18ac2cc + pkgrel = 1 + url = https://github.com/Mictronics/dump1090 + install = dump1090-mictronics.install + arch = i686 + arch = x86_64 + arch = armv6h + arch = armv7h + license = BSD + makedepends = git + depends = rtl-sdr + depends = lighttpd + depends = bladerf + provides = dump1090 + provides = dump1090-fa + provides = dump1090-fa-git + conflicts = dump1090 + conflicts = dump1090-git + conflicts = dump1090_mr-git + conflicts = dump1090-fa-git + source = dump1090::git+git://github.com/Mictronics/dump1090 + source = dump1090.service + source = lighttpd.conf + md5sums = SKIP + md5sums = b0b8292df98aab3f514c43f03eb71d06 + md5sums = e01a5f1b57d5d553bf595f9c0f83ceb9 + +pkgname = dump1090-mictronics-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..872c054cbc67 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Contributor : anish [ at ] gatech [dot] edu +# Maintainer : meijin007 [ at ] gmail [dot] com + +pkgname=dump1090-mictronics-git +_gitname=dump1090 +pkgver=3.3.0.r189.g18ac2cc +pkgrel=1 +pkgdesc="FMictronics fork of dump1090, a simple Mode S decoder for RTLSDR devices." +arch=('i686' 'x86_64' 'armv6h' 'armv7h') +url="https://github.com/Mictronics/dump1090" +license=('BSD') +depends=('rtl-sdr' 'lighttpd' 'bladerf') +conflicts=('dump1090' 'dump1090-git' 'dump1090_mr-git' 'dump1090-fa-git') +provides=('dump1090' 'dump1090-fa' 'dump1090-fa-git') +makedepends=('git') +source=('dump1090::git+git://github.com/Mictronics/dump1090' + 'dump1090.service' + 'lighttpd.conf') +md5sums=('SKIP' + 'b0b8292df98aab3f514c43f03eb71d06' + 'e01a5f1b57d5d553bf595f9c0f83ceb9') +install='dump1090-mictronics.install' + +pkgver() { + cd "${srcdir}/${_gitname}" + git describe --long --tags --match=v* | sed 's/dev.//g' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}/${_gitname}" +} + +build() { + cd "${srcdir}/${_gitname}" + make all faup1090 EXTRACFLAGS=-DHTMLPATH=\\\"/usr/share/dump1090/html\\\" +} + +package() { + # mkdir -p "${pkgdir}/usr/bin" + install -D -m755 "${srcdir}/${_gitname}/dump1090" "${pkgdir}/usr/bin/dump1090" + install -D -m755 "${srcdir}/${_gitname}/view1090" "${pkgdir}/usr/bin/view1090" + install -D -m755 "${srcdir}/${_gitname}/faup1090" "${pkgdir}/usr/lib/piaware/helpers/faup1090" + install -d -m755 "${pkgdir}/usr/share/dump1090/html" + install -D -m644 dump1090.service "${pkgdir}/usr/lib/systemd/system/dump1090.service" + cp -r "${srcdir}"/"${_gitname}"/public_html/* "${pkgdir}/usr/share/dump1090/html" + install -D -m644 "${srcdir}"/lighttpd.conf "${pkgdir}/usr/share/dump1090/lighttpd.conf" +} diff --git a/dump1090-mictronics.install b/dump1090-mictronics.install new file mode 100644 index 000000000000..7b3c64275649 --- /dev/null +++ b/dump1090-mictronics.install @@ -0,0 +1,20 @@ +post_install() { + if [ ! -L /usr/share/dump1090/html/data ]; then + ln -s /var/run/dump1090 /usr/share/dump1090/html/data + fi + + echo "Internal webserver has been permanently disabled in dump1090" + echo "To enable lighttpd, copy /usr/share/dump1090/lighttpd.conf to /etc/lighttpd/lighttpd.conf" + echo "Then run systemctl enable lighttpd && systemctl start lighttpd" +} + +pre_remove() { + systemctl stop dump1090 + systemctl disable dump1090 + unlink /usr/share/dump1090/html/data +} + +post_upgrade() { + post_install +} + diff --git a/dump1090.service b/dump1090.service new file mode 100644 index 000000000000..2a12d32403ca --- /dev/null +++ b/dump1090.service @@ -0,0 +1,17 @@ +[Unit] +Description=RtlSdr mode S decoder +Wants=network-online.target +After=syslog.target network-online.target lighttpd.service + +[Service] +Restart=always +RestartSec=30 +RuntimeDirectory=dump1090 +#PermissionsStartOnly=true +#ExecStartPre=-/usr/bin/mkdir /var/run/dump1090 +#ExecStartPre=/usr/bin/chown -R nobody:nobody /var/run/dump1090/ +ExecStart=/usr/bin/dump1090 --quiet --net --gain -10 --write-json /var/run/dump1090 + +[Install] +Alias=dump1090-fa.service +WantedBy=multi-user.target diff --git a/lighttpd.conf b/lighttpd.conf new file mode 100644 index 000000000000..187338e3a73b --- /dev/null +++ b/lighttpd.conf @@ -0,0 +1,42 @@ +# This is a minimal example config +# See /usr/share/doc/lighttpd +# and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions + +server.port = 80 +server.username = "http" +server.groupname = "http" +server.errorlog = "/var/log/lighttpd/error.log" +dir-listing.activate = "enable" +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain", + ".css" => "text/css", + ".js" => "application/x-javascript", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".gif" => "image/gif", + ".png" => "image/png", + "" => "application/octet-stream" + ) + +# Allows access to the static files that provide the dump1090 map view, +# and also to the dynamically-generated json parts that contain aircraft +# data and are periodically written by the dump1090 daemon. + +server.document-root = "/usr/share/dump1090/html" +index-file.names = ( "index.html" ) + +url.redirect += ( + "^/dump1090/$" => "/dump1090/index.html", + "^/dump1090$" => "/dump1090/index.html" +) + +alias.url += ( + "/dump1090/data/" => "/run/dump1090/", + "/dump1090/" => "/usr/share/dump1090/html/" +) + +# The stat cache must be disabled, as aircraft.json changes +# frequently and lighttpd's stat cache often ends up with the +# wrong content length. +server.stat-cache-engine = "disable" |