Browse Source

First commit

master
chimo 1 year ago
commit
486814843c
26 changed files with 832 additions and 0 deletions
  1. +52
    -0
      aperture/APKBUILD
  2. +30
    -0
      chromic-blog/APKBUILD
  3. +36
    -0
      go-camo-bin/APKBUILD
  4. +3
    -0
      go-camo-bin/go-camo-bin.confd
  5. +20
    -0
      go-camo-bin/go-camo-bin.initd
  6. +5
    -0
      go-camo-bin/go-camo-bin.pre-install
  7. +44
    -0
      gtfs/APKBUILD
  8. +41
    -0
      indieauth-tokens/APKBUILD
  9. +42
    -0
      monocle/APKBUILD
  10. +40
    -0
      nanopub/APKBUILD
  11. +38
    -0
      postgis/APKBUILD
  12. +34
    -0
      py3-flask-hashfs/APKBUILD
  13. +33
    -0
      py3-flask-indieauth/APKBUILD
  14. +33
    -0
      py3-hashfs/APKBUILD
  15. +44
    -0
      quill/APKBUILD
  16. +49
    -0
      spano/APKBUILD
  17. +16
    -0
      spano/run.py
  18. +13
    -0
      spano/spano.ini
  19. +52
    -0
      switchboard/APKBUILD
  20. +9
    -0
      switchboard/switchboard.confd
  21. +24
    -0
      switchboard/switchboard.initd
  22. +58
    -0
      watchtower/APKBUILD
  23. +9
    -0
      watchtower/watchtower.confd
  24. +24
    -0
      watchtower/watchtower.initd
  25. +41
    -0
      weather/APKBUILD
  26. +42
    -0
      xray/APKBUILD

+ 52
- 0
aperture/APKBUILD View File

@ -0,0 +1,52 @@
# Maintainer: Chimo <chimo@chromic.org>
#
# FIXME: Use specific commit instead of latest master so that builds are
# reproducible
#
# Optional deps:
# - redis
# - nginx
# - mysql
# - php7-fpm
# - php7-pdo_mysql (?)
#
pkgname="aperture"
pkgver=0.0.1
pkgrel=0
pkgdesc="Aperture is a Microsub server"
url="https://github.com/aaronpk/Aperture"
arch="noarch"
license="Apache 2.0"
depends="
php7
php7-ctype
php7-curl
php7-dom
php7-json
php7-mbstring
php7-pdo
php7-session
php7-simplexml
php7-tokenizer
php7-xml
php7-xmlwriter
"
makedepends="composer"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/aaronpk/Aperture/archive/master.tar.gz
"
builddir="$srcdir/Aperture-master/aperture"
build() {
cd "$builddir"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$builddir" "$installdir"/"$pkgname"
}
sha512sums="a9888867ed4ed352971220950b951862ad64502f5763c22ae3e05c974e7a11d8c2a347434fdc000c5ead2ebce3058eee1877f041ff87efa95c9366fd49568cae aperture-0.0.1.tar.gz"

+ 30
- 0
chromic-blog/APKBUILD View File

@ -0,0 +1,30 @@
# Maintainer: Chimo <chimo@chromic.org>
pkgname="chromic-blog"
pkgver=0.0.1
pkgrel=0
pkgdesc="My blog"
url="https://chromic.org"
arch="noarch"
license="Apache 2.0"
depends="
nginx
"
makedepends="hugo"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://code.chromic.org/chimo/chromic.org/archive/master.tar.gz
"
builddir="$srcdir/chromic.org"
build() {
cd "$builddir"
hugo
}
package() {
installdir="$pkgdir/usr/share/webapps/chromic.org"
mkdir -p "$installdir"
cp -r "$srcdir/chromic.org/public" "$installdir/chromic.org/"
}
sha512sums="b26ab0ea36c2bf58e883e29679e7f285a0afd26818886a4214c185a57615ccd8cdb48254b7d10440555cdc9266d795c1d6921c5834bf17b1da130d4901df64b5 chromic-blog-0.0.1.tar.gz"

+ 36
- 0
go-camo-bin/APKBUILD View File

@ -0,0 +1,36 @@
# Maintainer: Chimo <chimo@chromic.org>
pkgname="go-camo-bin"
_pkgname="go-camo"
pkgver=1.1.4
pkgrel=0
pkgdesc="Go secure image proxy server"
url="https://github.com/cactus/go-camo"
arch="x86_64"
license="MIT"
depends=""
makedepends=""
subpackages="$pkgname-openrc"
install="$pkgname.pre-install"
options="!check"
source="
$_pkgname-$pkgver.tar.gz::https://github.com/cactus/$_pkgname/releases/download/v$pkgver/$_pkgname-$pkgver.go112.linux-amd64.tar.gz
go-camo-bin.initd
go-camo-bin.confd
"
builddir="$srcdir/$_pkgname-$pkgver"
package() {
cd "$builddir"
install -D -m755 bin/go-camo \
"$pkgdir"/usr/bin/go-camo
install -D -m755 bin/url-tool \
"$pkgdir"/usr/bin/url-tool
install -D -m644 "$srcdir"/go-camo-bin.confd \
"$pkgdir"/etc/conf.d/go-camo
install -Dm755 "$srcdir"/go-camo-bin.initd \
"$pkgdir"/etc/init.d/go-camo
}
sha512sums="bcc2cf21e9801aa2bb69283e7101c0161d4fa696ca5c8b6811e41868700188d83e6991efb67824b11ecb0d3f88d5425588cc36066da9585dbc80424f095aa962 go-camo-1.1.4.tar.gz
691e3f531edf4f9e44ac189e084d59c27cbb8a509d4bcfdf35dba8ddb574e2b669319f3cd9552e3cc33f4234973ad554aaa2ff06eabfeeb391d4a0e820e41007 go-camo-bin.initd
c63aafae74dc7492b383a3a82410e7dee23b797d7513a81bf178f2424fc5e8fcc2f4eb90cbb771e01819d3d8396c3af17dceb3864eda5a225da112a11bc5b562 go-camo-bin.confd"

+ 3
- 0
go-camo-bin/go-camo-bin.confd View File

@ -0,0 +1,3 @@
# Run the daemon as this user:
# CAMO_USER=camo

+ 20
- 0
go-camo-bin/go-camo-bin.initd View File

@ -0,0 +1,20 @@
#!/sbin/openrc-run
name="go-camo-bin"
description="Go secure image proxy server service"
supervisor=supervise-daemon
CAMO_USER=${CAMO_USER:-camo}
export GOCAMO_HMAC=${GOCAMO_HMAC:-changeme}
LOGS=/var/log/go-camo.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/go-camo"
command_user="$CAMO_USER:$CAMO_USER"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
}
start_pre() {
checkpath -f "$LOGS" -m 644 -o "$CAMO_USER:$CAMO_USER"
}

+ 5
- 0
go-camo-bin/go-camo-bin.pre-install View File

@ -0,0 +1,5 @@
#!/bin/sh
addgroup -S camo || true
adduser -SDH -s /sbin/nologin -g camo camo || true

+ 44
- 0
gtfs/APKBUILD View File

@ -0,0 +1,44 @@
# Maintainer: Chimo <chimo@chromic.org>
# NOTE: Opt Deps:
# - nginx
# - php7-fpm
# We need setuptools to install pygtfs, which is needed to convert
# gtfs.txt to sql
# We should probably create a APKBUILD for pygtfs, then add it as a dep here
# NOTE: py3-psycopg2 is an additional dep for Postgres support
pkgname="gtfs"
pkgver="0.0.1_git20190712"
_gitver="3d338358e9b2786cb70432d99c6dc6d067b5d873"
pkgrel=0
pkgdesc="GTFS thingy"
url="https://github.com/chimo/gtfs"
arch="noarch"
license="AGPL"
depends="
php7
php7-pdo
php7-pdo_pgsql
postgresql
"
makedepends="composer"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/chimo/gtfs/archive/$_gitver.tar.gz
"
builddir="$srcdir/gtfs-$_gitver"
build() {
cd "$builddir/private"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/gtfs-$_gitver" "$installdir"/"$pkgname"
}
sha512sums="5cac48bc279e006f7a943495487adad2147e7c0d8689cccfb7a58bf895be026636c10e9ecc1a5d8440c01862f1872dc7c0e9b07271d324196a5fe2d677f63b85 weather-0.0.1_git20190923.tar.gz"

+ 41
- 0
indieauth-tokens/APKBUILD View File

@ -0,0 +1,41 @@
# Maintainer: Chimo <chimo@chromic.org>
# FIXME: Check if this is the proper way to build a -git package.
# Should we be using the `giturl` option?
# TODO: Create a tokens user and give correct perms.
#
# NOTE: Opt Deps:
# - nginx
# - php7-fpm
pkgname="indieauth-tokens"
pkgver=0.0.1
pkgrel=0
pkgdesc="todo..."
url="https://github.com/aaronpk/IndieAuth-Token-Endpoint"
arch="noarch"
license="Apache 2.0"
depends="
php7
php7-curl
php7-dom
php7-json
php7-mbstring
"
makedepends="composer"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/aaronpk/IndieAuth-Token-Endpoint/archive/master.tar.gz
"
builddir="$srcdir/IndieAuth-Token-Endpoint-master"
build() {
cd "$builddir"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/IndieAuth-Token-Endpoint-master" "$installdir"/"$pkgname"
}
sha512sums="1061170c0050337ea720320ec2011ce0bfb0cba7d7041fc4aa81b4969c39c4d2ca22735d5bf09164a2bf5aff6fd964c23e6c9f9fa70b2b142fe722c893e7ae75 indieauth-tokens-0.0.1.tar.gz"

+ 42
- 0
monocle/APKBUILD View File

@ -0,0 +1,42 @@
# Maintainer: Chimo <chimo@chromic.org>
# FIXME: Check if this is the proper way to build a -git package.
# Should we be using the `giturl` option?
# TODO: Create a monocle user and give correct perms
#
# Optional deps:
# -
#
pkgname="monocle"
pkgver=0.0.1
pkgrel=0
pkgdesc="Monocle is a reader app that talks to a Microsub server"
url="https://github.com/aaronpk/Monocle"
arch="noarch"
license="MIT"
depends="
php7
php7-curl
php7-dom
php7-json
php7-mbstring
php7-session
"
makedepends="composer"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/aaronpk/Monocle/archive/master.tar.gz
"
builddir="$srcdir/Monocle-master"
build() {
cd "$builddir"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$builddir" "$installdir"/"$pkgname"
}
sha512sums="22a8777dfa9d72a524d4d99a25799b1b0b05952a5d4bf6b0d17e2db9095f0f93dbe7413b83dbd77dc4d9b38a9d81dea35d9c6c52e935f15140db08a5e7235665 monocle-0.0.1.tar.gz"

+ 40
- 0
nanopub/APKBUILD View File

@ -0,0 +1,40 @@
# Maintainer: Chimo <chimo@chromic.org>
#
# TODO: Either get our changes merged upstream, or pull the code from upstream
# and just include a patch in this package. I don't really want to pull
# from my repo (neither github or gitea)
pkgname="nanopub"
pkgver=0.0.1
pkgrel=0
pkgdesc="MicroPub support for Static Blog Engine"
url="https://code.dgold.eu/nanopub/"
arch="noarch"
license="AGPL"
depends="
php7
php7-ctype
php7-curl
php7-dom
php7-json
php7-simplexml
php7-xml
"
makedepends="composer"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://code.chromic.org/chimo/nanopub/archive/master.tar.gz
"
builddir="$srcdir/$pkgname"
build() {
cd "$builddir"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/$pkgname" "$installdir"/"$pkgname"
}
sha512sums="ab7bd033b9a8bf8687853a53a45f6872fdda2c66383e6f3f951bd77cd7a250af694a93c55a10e2e1ea4c5e9938104506527c8bf1da4f57b85d1295b0bd4b6e6a nanopub-0.0.1.tar.gz"

+ 38
- 0
postgis/APKBUILD View File

@ -0,0 +1,38 @@
# Contributor: Bjoern Schilberg <bjoern@intevation.de>
# Maintainer: Bjoern Schilberg <bjoern@intevation.de>
pkgname=postgis
pkgver=2.5.2
pkgrel=1
pkgdesc="PostGIS is a spatial database extender for PostgreSQL object-relational database."
url="https://postgis.net/"
# geos test fails on other archs
arch="x86 x86_64" # fails on x86*
license="GPL-2.0-or-later"
depends="postgresql perl"
makedepends="postgresql-dev geos-dev gdal-dev libxml2-dev proj4-dev perl-dev
json-c-dev pcre-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="http://download.osgeo.org/postgis/source/$pkgname-$pkgver.tar.gz"
options="!check" # tests depends on a running PostgreSQL server
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--disable-gtktest \
--disable-nls \
--disable-rpath \
--without-protobuf
make -j1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="b10781f0b74bad8162c33eb111a6090fba184b45fe5874d22cd3a5b0acfb057f3407c073bc44c9d4cd20ed8c2cb1fbb34480b0cf331340bc8b52580d4eccb819 postgis-2.5.2.tar.gz"

+ 34
- 0
py3-flask-hashfs/APKBUILD View File

@ -0,0 +1,34 @@
# Maintainer: Chimo <chimo@chromic.org>
# TODO: Run tests if applicable
pkgname="py3-flask-hashfs"
_pkgname="flask-hashfs"
pkgver=0.3.0
pkgrel=0
pkgdesc="A minimal API for watching web pages for changes, roughly speaks the WebSub protocol"
url="https://flask-hashfs.readthedocs.io/en/latest/"
arch="noarch"
license="MIT"
depends="
python3
py3-flask
py3-hashfs
"
makedepends=""
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/dgilland/flask-hashfs/archive/v0.3.0.tar.gz
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python3 setup.py build
}
package() {
cd "$builddir"
python3 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
}
sha512sums="6ddf3ec42059cf24ada00f839fa012262158be866595bc6c68c430cbd920816ed2bd680340ebd1a3cc5e7f69014f4080a913462f2c99d4158b0dc1dc026a5321 py3-flask-hashfs-0.3.0.tar.gz"

+ 33
- 0
py3-flask-indieauth/APKBUILD View File

@ -0,0 +1,33 @@
# Maintainer: Chimo <chimo@chromic.org>
#
# TODO: Run tests if applicable
pkgname="py3-flask-indieauth"
_pkgname="flask-indieauth"
pkgver=0.0.1
pkgrel=0
pkgdesc="Allows Flask apps to require IndieAuth authorization on routes."
url="https://github.com/martymcguire/Flask-IndieAuth"
arch="noarch"
license="MIT"
depends="
python3
py3-flask
"
makedepends=""
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/martymcguire/Flask-IndieAuth/archive/master.tar.gz
"
builddir="$srcdir/Flask-IndieAuth-master"
build() {
cd "$builddir"
python3 setup.py build
}
package() {
cd "$builddir"
python3 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
}
sha512sums="7083977af7c681f1f01d00527397f85e173fd7b7b612f9dff4fa4c8bc646ea0bf24f52a4283f74ca25a407da1f44f70775bb294bd58ab0f7257ab588290ce69e py3-flask-indieauth-0.0.1.tar.gz"

+ 33
- 0
py3-hashfs/APKBUILD View File

@ -0,0 +1,33 @@
# Maintainer: Chimo <chimo@chromic.org>
#
# TODO: Run tests if applicable
pkgname="py3-hashfs"
_pkgname="hashfs"
pkgver=0.7.1
pkgrel=0
pkgdesc="A content-addressable file management system for Python"
url="http://hashfs.readthedocs.org/"
arch="noarch"
license="MIT"
depends="
python3
"
makedepends=""
subpackages=""
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/dgilland/hashfs/archive/v0.7.1.tar.gz
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python3 setup.py build
}
package() {
cd "$builddir"
python3 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
}
sha512sums="36017aa562912a0eba89ede0af17cb445bab4f76ace51705a1b637447c644427d44b4b770d954d62342780d2b69051983c6e2ad3e4ad6857fd246a12923ae597 py3-hashfs-0.7.1.tar.gz"

+ 44
- 0
quill/APKBUILD View File

@ -0,0 +1,44 @@
# Maintainer: Chimo <chimo@chromic.org>
# NOTE: Opt Deps:
# - mariadb
# - sqlite
# - nginx
# - php7-fpm
# - php7-pdo_mysql
pkgname="quill"
pkgver=0.0.1
pkgrel=0
pkgdesc="A Micropub client for creating posts"
url="https://github.com/aaronpk/Quill"
arch="noarch"
license="Apache 2.0"
depends="
php7
php7-ctype
php7-curl
php7-dom
php7-json
php7-mbstring
php7-session
php7-simplexml
php7-xml
"
makedepends="composer"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/aaronpk/Quill/archive/master.tar.gz
"
builddir="$srcdir/Quill-master"
build() {
cd "$builddir"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/Quill-master" "$installdir"/"$pkgname"
}
sha512sums="b6ff460df67e9598673fa7b48686c720ac1f3a89315902dfb4ad73175ec86ee63a13fdd20b0990a049bc484ff9654180cf4070f69291bcec905eb63afc78b5a7 quill-0.0.1.tar.gz"

+ 49
- 0
spano/APKBUILD View File

@ -0,0 +1,49 @@
# Maintainer: Chimo <chimo@chromic.org>
# NOTE: Opt Deps:
# - nginx
# - uwsgi
#
# TODO: create user/group spano to run either uwsgi or the app directly
#
# NOTE: to run this via uwsgi, we need uswgi, uwsgi-python3
# and add the spano.ini file in this dir to /etc/uwsgi/conf.d
#
# File ownership for spano.ini should be spano:spano and nginx should
# be added to the 'spano' group to be able to access to socket at
# /run/spano/spano.sock. Then `service start uwsgi`
#
# We also need the patched version of /usr/share/webapps/spano/run.py
# which can be found in this dir.
#
# FIXME: some deps are probably redundant
# should probably be something like
# py3-flask-hashfs, py3-flask-indieauth, py3-magic
pkgname="spano"
pkgver=0.0.1
pkgrel=0
pkgdesc="A micropub media endpoint written in Python using Flask and Flask-HashFS"
url="https://github.com/martymcguire/spano"
arch="noarch"
license="Apache 2.0"
depends="
python3
py3-flask
py3-flask-hashfs
py3-flask-indieauth
py3-hashfs
py3-magic
"
makedepends=""
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/martymcguire/spano/archive/master.tar.gz
"
builddir="$srcdir/spano-master"
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/spano-master" "$installdir"/"$pkgname"
}
sha512sums="febf1b6637fe1d4da3e0507ce5208f5023047990b52697d301f5d1fcac2ecfd06e63b30108856cab88c4589625a84b72e371cc77119cfd3775d3c38f5213226b spano-0.0.1.tar.gz"

+ 16
- 0
spano/run.py View File

@ -0,0 +1,16 @@
#!/usr/bin/env python
from spano.app import create_app
app = create_app()
if __name__ == "__main__":
app.run(debug=True, port=5000)
#def main():
# from spano.app import create_app
# app = create_app()
# app.run(debug=True, port=5000)
#
#main()

+ 13
- 0
spano/spano.ini View File

@ -0,0 +1,13 @@
[uwsgi]
chdir = /usr/share/webapps/spano
protocol = uwsgi
# this requires modifications from our fork
# I have no idea how to start it otherwise...
mount = /=run:app
# nginx needs to be part of whichever group owns this file (ex: 'spano')
chmod-socket = 770
socket = /run/spano/spano.sock
logto = /usr/share/webapps/spano/logs/uwsgi.log
plugins = python3

+ 52
- 0
switchboard/APKBUILD View File

@ -0,0 +1,52 @@
# Maintainer: Chimo <chimo@chromic.org>
# FIXME: Check if this is the proper way to build a -git package.
# Should we be using the `giturl` option?
# TODO: Create a switchboard user and give correct perms.
#
# NOTE: We "need" to patch helpers.php to get PHP to connect to mariadb via
# unix sockets instead of TCP.
#
# NOTE: Opt Deps:
# - nginx
# - php7-fpm
# - php7-pdo_mysql
pkgname="switchboard"
pkgver=0.0.1
pkgrel=0
pkgdesc="todo..."
url="https://github.com/aaronpk/Switchboard"
arch="noarch"
license="Apache 2.0"
depends="
php7
php7-pdo
php7-posix
"
makedepends="composer"
subpackages="$pkgname-openrc"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/aaronpk/Switchboard/archive/master.tar.gz
switchboard.initd
switchboard.confd
"
builddir="$srcdir/Switchboard-master"
build() {
cd "$builddir"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/Switchboard-master" "$installdir"/"$pkgname"
install -Dm755 "$srcdir"/switchboard.initd \
"$pkgdir"/etc/init.d/switchboard
install -Dm644 "$srcdir"/switchboard.confd \
"$pkgdir"/etc/conf.d/switchboard
}
sha512sums="5a2ff5d956bb334ae891fe2e8a33d77869b7520c63484d8d728a10f614c592c5a96d84bebdffc52dc2ffb56613472e89874139c929f2470cda99348b925ae9c1 switchboard-0.0.1.tar.gz
291aa78752c901d5090bbcf65b896f695d6947478cfd80db24cb05cadf484fb86c8a7d92c92e8cf8bf53bbff905bfe17bb386273e80c9cc8917bae7a3a4b65b5 switchboard.initd
015e59e7133d735e9226b3da06a03541c3bdd46552c3ec2176c78e8e066b5987fb5c353ed805ec6005dbfcb61010af68d4cd9a2412b7d0f2e5d6189441d9f710 switchboard.confd"

+ 9
- 0
switchboard/switchboard.confd View File

@ -0,0 +1,9 @@
# Run the daemon as this user:
# SWITCHBOARD_USER=nobody
# If no, use an external sql server
# LOCAL_DB=yes
# If no, use an external beanstalkd server
# LOCAL_BEANSTALKD=yes

+ 24
- 0
switchboard/switchboard.initd View File

@ -0,0 +1,24 @@
#!/sbin/openrc-run
name="switchboard"
description="todo..."
supervisor=supervise-daemon
SWITCHBOARD_USER=${SWITCHBOARD_USER:-nobody}
LOGS=/var/log/switchboard.log
LOCAL_DB=${LOCAL_DB:-yes}
LOCAL_BEANSTALKD=${LOCAL_BEANSTALKD:-yes}
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/php"
command_args="/usr/share/webapps/switchboard/scripts/switchboard.php"
command_user="$SWITCHBOARD_USER:$SWITCHBOARD_USER"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
[ "$LOCAL_DB" = "yes" ] && need mariadb
[ "$LOCAL_BEANSTALKD" = "yes" ] && need beanstalkd
}
start_pre() {
checkpath -f "$LOGS" -m 644 -o "$SWITCHBOARD_USER:$SWITCHBOARD_USER"
}

+ 58
- 0
watchtower/APKBUILD View File

@ -0,0 +1,58 @@
# Maintainer: Chimo <chimo@chromic.org>
# FIXME: Check if this is the proper way to build a -git package.
# Should we be using the `giturl` option?
# TODO: Create a watchtower user and give correct perms.
#
# TODO: Needs cron running ./scripts/cron.php
# Print a note on how to add cron to /etc/crontabs/nobody?
#
# NOTE: We "need" to patch helpers.php to get PHP to connect to mariadb via
# unix sockets instead of TCP.
#
# NOTE: Opt Deps:
# - mariadb
# - beanstalk
# - nginx
# - php7-fpm
# - php7-pdo_mysql
pkgname="watchtower"
pkgver=0.0.1
pkgrel=0
pkgdesc="A minimal API for watching web pages for changes, roughly speaks the WebSub protocol"
url="https://github.com/aaronpk/Watchtower"
arch="noarch"
license="Apache 2.0"
depends="
php7
php7-curl
php7-json
php7-posix
"
makedepends="composer"
subpackages="$pkgname-openrc"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/aaronpk/Watchtower/archive/master.tar.gz
watchtower.initd
watchtower.confd
"
builddir="$srcdir/Watchtower-master"
build() {
cd "$builddir"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/Watchtower-master" "$installdir"/"$pkgname"
install -Dm755 "$srcdir"/watchtower.initd \
"$pkgdir"/etc/init.d/watchtower
install -Dm644 "$srcdir"/watchtower.confd \
"$pkgdir"/etc/conf.d/watchtower
}
sha512sums="2b23c1bf38fa7bce1d2fe2fd8751d5c8b511961b897032b5439019186f87c06c8b813f1bdf2167189cab39d06d7d4119005482aa65e4c77a9be84f65a646cba5 watchtower-0.0.1.tar.gz
95b6bc7d09afc0449e9a315651510ebc88822e6956d0e22be9ddac5e3160b4cea9217dc768d2f1db861fc6b6c296bc49f22809ec8d55fd022d601cd2700b0397 watchtower.initd
8b91611e26ba6478d63ba99df487e80f82e0b42118af8ebc649ed73ee0e14ac1d43ea010d088d89adca77c141445122a2696afef94514d27cf11446db52cb563 watchtower.confd"

+ 9
- 0
watchtower/watchtower.confd View File

@ -0,0 +1,9 @@
# Run the daemon as this user:
# WATCHTOWER_USER=nobody
# If no, use an external sql server
# LOCAL_DB=yes
# If no, use an external beanstalkd server
# LOCAL_BEANSTALKD=yes

+ 24
- 0
watchtower/watchtower.initd View File

@ -0,0 +1,24 @@
#!/sbin/openrc-run
name="watchtower"
description="A minimal API for watching web pages for changes, roughly speaks the WebSub protocol"
supervisor=supervise-daemon
WATCHTOWER_USER=${WATCHTOWER_USER:-nobody}
LOGS=/var/log/watchtower.log
LOCAL_DB=${LOCAL_DB:-yes}
LOCAL_BEANSTALKD=${LOCAL_BEANSTALKD:-yes}
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/php"
command_args="/usr/share/webapps/watchtower/scripts/watchtower.php"
command_user="$WATCHTOWER_USER:$WATCHTOWER_USER"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
[ "$LOCAL_DB" = "yes" ] && need mariadb
[ "$LOCAL_BEANSTALKD" = "yes" ] && need beanstalkd
}
start_pre() {
checkpath -f "$LOGS" -m 644 -o "$WATCHTOWER_USER:$WATCHTOWER_USER"
}

+ 41
- 0
weather/APKBUILD View File

@ -0,0 +1,41 @@
# Maintainer: Chimo <chimo@chromic.org>
# NOTE: Opt Deps:
# - nginx
# - php7-fpm
pkgname="weather"
pkgver="0.0.1_git20190923"
_gitver="3d338358e9b2786cb70432d99c6dc6d067b5d873"
pkgrel=0
pkgdesc="Weather endpoint for Environment Canada data"
url="https://github.com/chimo/weather"
arch="noarch"
license="AGPL"
depends="
php7
php7-json
php7-mbstring
php7-pdo
php7-pdo_pgsql
php7-simplexml
postgresql
postgis
"
makedepends="composer"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/chimo/weather/archive/$_gitver.tar.gz
"
builddir="$srcdir/weather-$_gitver"
build() {
cd "$builddir/private"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/weather-$_gitver" "$installdir"/"$pkgname"
}
sha512sums="5cac48bc279e006f7a943495487adad2147e7c0d8689cccfb7a58bf895be026636c10e9ecc1a5d8440c01862f1872dc7c0e9b07271d324196a5fe2d677f63b85 weather-0.0.1_git20190923.tar.gz"

+ 42
- 0
xray/APKBUILD View File

@ -0,0 +1,42 @@
# Maintainer: Chimo <chimo@chromic.org>
# NOTE: Opt Deps:
# - nginx
# - php7-fpm
pkgname="xray"
pkgver="0.0.1_git20190717"
_gitver="cc9e1bfb17781006f20290895f579d739f33b865"
pkgrel=0
pkgdesc="X-Ray returns structured data from any URL"
url="https://github.com/aaronpk/XRay"
arch="noarch"
license="MIT"
depends="
php7
php7-ctype
php7-curl
php7-dom
php7-json
php7-mbstring
php7-simplexml
php7-tokenizer
php7-xml
"
makedepends="composer"
options="!check"
source="
$pkgname-$pkgver.tar.gz::https://github.com/aaronpk/XRay/archive/$_gitver.tar.gz
"
builddir="$srcdir/XRay-$_gitver"
build() {
cd "$builddir"
composer install
}
package() {
installdir="$pkgdir/usr/share/webapps"
mkdir -p "$installdir"
cp -r "$srcdir/XRay-$_gitver" "$installdir"/"$pkgname"
}
sha512sums="4c30204034f479b51d36975881a4f756330adb2c062fa288de00e3f04f41e9056d5ad0f6b51f90628ffaf948cf868a774f767f22e7bed7dc136d048bdb6b7770 xray-0.0.1_git20190717.tar.gz"

Loading…
Cancel
Save