summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmaël Bouya2016-10-31 00:10:17 +0100
committerIsmaël Bouya2016-10-31 00:10:17 +0100
commit6e54332efd28883b597779c4b99655d1fafb4c54 (patch)
treed149a9dc5dc20e418f9ba1482d92fb2c9603d108
downloadaur-6e54332efd28883b597779c4b99655d1fafb4c54.tar.gz
Initial commit to AUR
-rw-r--r--.SRCINFO47
-rw-r--r--PKGBUILD80
-rw-r--r--mediagoblin-celeryd.service16
-rw-r--r--mediagoblin-paster.service18
-rw-r--r--mediagoblin-tmpfiles.conf1
-rwxr-xr-xmediagoblin.install29
-rw-r--r--mediagoblin_local.ini64
-rw-r--r--paste_local.ini86
8 files changed, 341 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ed61519c6b4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,47 @@
+# Generated by mksrcinfo v8
+# Sun Oct 30 23:10:11 UTC 2016
+pkgbase = mediagoblin
+ pkgdesc = A free software media publishing platform
+ pkgver = 0.9.0
+ pkgrel = 1
+ url = http://mediagoblin.org
+ install = mediagoblin.install
+ arch = i686
+ arch = x86_64
+ license = AGPL
+ makedepends = git
+ makedepends = automake
+ depends = python2
+ depends = python2-lxml
+ depends = sqlite
+ depends = python2-pillow
+ depends = python2-virtualenv
+ depends = npm
+ depends = nodejs
+ optdepends = postgresql: to use the postgresql database backend
+ optdepends = python2-psycopg2: to use the postgresql database backend
+ optdepends = python2-gobject: to handle videos
+ optdepends = gst-libav: to handle videos
+ optdepends = gst-python2: to handle videos
+ optdepends = gst-plugins-good: to handle videos
+ optdepends = gst-plugins-bad: to handle videos
+ optdepends = gst-plugins-ugly: to handle videos
+ provides = mediagoblin
+ conflicts = mediagoblin-git
+ backup = etc/webapps/mediagoblin/paste_local.ini
+ backup = etc/webapps/mediagoblin/mediagoblin_local.ini
+ source = mediagoblin::git://git.savannah.gnu.org/mediagoblin.git#tag=v0.9.0
+ source = mediagoblin-paster.service
+ source = mediagoblin-celeryd.service
+ source = paste_local.ini
+ source = mediagoblin_local.ini
+ source = mediagoblin-tmpfiles.conf
+ sha256sums = SKIP
+ sha256sums = f666807655f0dcafb041be9b684c2a1ff285e24cf06c5d2e8ab0974e8b2936b2
+ sha256sums = aecbb1f1b60d5c2b524ea68e49feda0264cb49bc66d82c4511b800ac81642f01
+ sha256sums = ac914d60886d9bf53d3f40b8b00a60d46ada1cac9130210e045a4776d898e884
+ sha256sums = 9adf338f5dbfb94ee7ae29433091b6991a1fa39a6135a8295f9f1cc1fde0edc1
+ sha256sums = 1bf9172ba79bdac4694c5d4c8c2134bbcfdfadf29f0b4cfc88fa0a329201b202
+
+pkgname = mediagoblin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..fff13349e64
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer : Immae <ismael.bouya@normalesup.org>
+
+pkgname=mediagoblin
+pkgver=0.9.0
+pkgrel=1
+pkgdesc='A free software media publishing platform'
+arch=('i686' 'x86_64')
+url='http://mediagoblin.org'
+license=('AGPL')
+provides=('mediagoblin')
+conflicts=('mediagoblin-git')
+depends=('python2' 'python2-lxml' 'sqlite' 'python2-pillow' 'python2-virtualenv' 'npm' 'nodejs')
+optdepends=(
+ 'postgresql: to use the postgresql database backend'
+ 'python2-psycopg2: to use the postgresql database backend'
+ 'python2-gobject: to handle videos'
+ 'gst-libav: to handle videos'
+ 'gst-python2: to handle videos'
+ 'gst-plugins-good: to handle videos'
+ 'gst-plugins-bad: to handle videos'
+ 'gst-plugins-ugly: to handle videos'
+ )
+backup=('etc/webapps/mediagoblin/paste_local.ini' 'etc/webapps/mediagoblin/mediagoblin_local.ini')
+install=mediagoblin.install
+makedepends=('git' 'automake')
+source=(
+ 'mediagoblin::git://git.savannah.gnu.org/mediagoblin.git#tag=v0.9.0'
+ 'mediagoblin-paster.service'
+ 'mediagoblin-celeryd.service'
+ 'paste_local.ini'
+ 'mediagoblin_local.ini'
+ 'mediagoblin-tmpfiles.conf'
+)
+sha256sums=('SKIP'
+ 'f666807655f0dcafb041be9b684c2a1ff285e24cf06c5d2e8ab0974e8b2936b2'
+ 'aecbb1f1b60d5c2b524ea68e49feda0264cb49bc66d82c4511b800ac81642f01'
+ 'ac914d60886d9bf53d3f40b8b00a60d46ada1cac9130210e045a4776d898e884'
+ '9adf338f5dbfb94ee7ae29433091b6991a1fa39a6135a8295f9f1cc1fde0edc1'
+ '1bf9172ba79bdac4694c5d4c8c2134bbcfdfadf29f0b4cfc88fa0a329201b202')
+
+prepare() {
+ cd "$srcdir/mediagoblin"
+ git submodule init
+ git submodule update
+}
+
+build() {
+ cd "$srcdir/mediagoblin"
+
+ ./bootstrap.sh
+ ./configure
+ make || make
+ ./bin/easy_install flup
+}
+
+package() {
+ cd "$srcdir/mediagoblin"
+ rm -rf .git .gitignore
+
+ install -dm755 "$pkgdir"/usr/share/webapps/mediagoblin/
+ cp -a . "$pkgdir"/usr/share/webapps/mediagoblin
+
+ cd "$pkgdir"/usr/share/webapps/mediagoblin
+ find . -name '*.pyc' -delete
+ find . -type f -exec sed -i "s|$srcdir/mediagoblin|/usr/share/webapps/mediagoblin|g" {} \;
+
+ install -dm755 "$pkgdir"/var/lib/mediagoblin
+ install -dm755 "$pkgdir"/etc/webapps/mediagoblin
+
+ install -Dm644 "$srcdir"/paste_local.ini "$pkgdir"/etc/webapps/mediagoblin/paste_local.ini
+ ln -s /etc/webapps/mediagoblin/paste_local.ini "$pkgdir"/usr/share/webapps/mediagoblin/paste_local.ini
+ install -Dm644 "$srcdir"/mediagoblin_local.ini "$pkgdir"/etc/webapps/mediagoblin/mediagoblin_local.ini
+ ln -s /etc/webapps/mediagoblin/mediagoblin_local.ini "$pkgdir"/usr/share/webapps/mediagoblin/mediagoblin_local.ini
+
+ ln -s /var/lib/mediagoblin/ "$pkgdir"/usr/share/webapps/mediagoblin/user_dev
+
+ install -Dm644 "$srcdir"/mediagoblin-paster.service "$pkgdir"/usr/lib/systemd/system/mediagoblin-paster.service
+ install -Dm644 "$srcdir"/mediagoblin-celeryd.service "$pkgdir"/usr/lib/systemd/system/mediagoblin-celeryd.service
+ install -Dm644 "$srcdir"/mediagoblin-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/mediagoblin.conf
+}
diff --git a/mediagoblin-celeryd.service b/mediagoblin-celeryd.service
new file mode 100644
index 00000000000..76f3115d938
--- /dev/null
+++ b/mediagoblin-celeryd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Mediagoblin Celeryd
+
+[Service]
+User=mediagoblin
+Group=mediagoblin
+Type=simple
+WorkingDirectory=/usr/share/webapps/mediagoblin/
+Environment=MEDIAGOBLIN_CONFIG=/usr/share/webapps/mediagoblin/mediagoblin_local.ini \
+ CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery
+ExecStart=/usr/share/webapps/mediagoblin/bin/celery worker \
+ --loglevel=INFO
+PIDFile=/var/run/mediagoblin/mediagoblin-celeryd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mediagoblin-paster.service b/mediagoblin-paster.service
new file mode 100644
index 00000000000..962b6718391
--- /dev/null
+++ b/mediagoblin-paster.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Mediagoblin
+
+[Service]
+Type=simple
+WorkingDirectory=/usr/share/webapps/mediagoblin
+User=mediagoblin
+Group=mediagoblin
+ExecStart=/usr/share/webapps/mediagoblin/bin/paster serve \
+ /usr/share/webapps/mediagoblin/paste_local.ini \
+ --pid-file=/var/run/mediagoblin/mediagoblin.pid
+ExecStop=/usr/share/webapps/mediagoblin/bin/paster serve \
+ --pid-file=/var/run/mediagoblin/mediagoblin.pid \
+ /usr/share/webapps/mediagoblin/paste_local.ini stop
+PIDFile=/var/run/mediagoblin/mediagoblin.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mediagoblin-tmpfiles.conf b/mediagoblin-tmpfiles.conf
new file mode 100644
index 00000000000..9a7d888810c
--- /dev/null
+++ b/mediagoblin-tmpfiles.conf
@@ -0,0 +1 @@
+D /var/run/mediagoblin 0755 mediagoblin mediagoblin -
diff --git a/mediagoblin.install b/mediagoblin.install
new file mode 100755
index 00000000000..db0bc1d5fde
--- /dev/null
+++ b/mediagoblin.install
@@ -0,0 +1,29 @@
+pkgname=mediagoblin-git
+
+post_install() {
+ if [ ! `grep mediagoblin /etc/group` ]; then
+ groupadd mediagoblin &>/dev/null;
+ fi
+
+ id mediagoblin &>/dev/null || \
+ useradd -g mediagoblin -d /var/lib/mediagoblin -s /bin/false mediagoblin
+
+ /usr/bin/systemd-tmpfiles --create mediagoblin.conf
+
+ chown -R mediagoblin:mediagoblin /var/run/mediagoblin /var/lib/mediagoblin
+
+ cd /usr/share/webapps/mediagoblin/
+ /bin/su -s /bin/sh -c "/usr/share/webapps/mediagoblin/bin/gmg dbupdate" mediagoblin
+}
+
+post_upgrade() {
+ cd /usr/share/webapps/mediagoblin/
+ /bin/su -s /bin/sh -c "/usr/share/webapps/mediagoblin/bin/gmg dbupdate" mediagoblin
+}
+
+pre_remove() {
+ /usr/bin/systemd-tmpfiles --remove mediagoblin.conf
+
+ userdel mediagoblin &> /dev/null
+ groupdel mediagoblin &> /dev/null
+}
diff --git a/mediagoblin_local.ini b/mediagoblin_local.ini
new file mode 100644
index 00000000000..2f7753ab7f6
--- /dev/null
+++ b/mediagoblin_local.ini
@@ -0,0 +1,64 @@
+# If you want to make changes to this file, first copy it to
+# mediagoblin_local.ini, then make the changes there.
+#
+# If you don't see what you need here, have a look at mediagoblin/config_spec.ini
+# It defines types and defaults so it's a good place to look for documentation
+# or to find hidden options that we didn't tell you about. :)
+
+# To change the directory you should make sure you change the
+# directory in paste.ini and/or your webserver configuration.
+#
+[DEFAULT]
+data_basedir = "/var/lib/mediagoblin"
+
+[mediagoblin]
+direct_remote_path = /mgoblin_static/
+email_sender_address = "notice@mediagoblin.example.org"
+
+## Uncomment and change to your DB's appropiate setting.
+## Default is a local sqlite db "mediagoblin.db".
+## Don't forget to run `./bin/gmg dbupdate` after having changed it.
+sql_engine = sqlite:///%(data_basedir)s/mediagoblin.db
+
+# Set to false to enable sending notices
+email_debug_mode = true
+
+# Set to false to disable registrations
+allow_registration = true
+
+# Set to false to disable the ability for users to report offensive content
+allow_reporting = true
+
+## Uncomment this to put some user-overriding templates here
+# local_templates = %(data_basedir)s/templates/
+
+## You can set your theme by specifying this (not specifying it will
+## use the default theme). Run `gmg assetlink` to apply the change.
+## The airy and sandyseventiesspeedboat theme comes with GMG; please
+## see the theming docs on how to install other themes.
+# theme = airy
+
+## If you want the terms of service displayed, you can uncomment this
+# show_tos = true
+
+user_privilege_scheme = "uploader,commenter,reporter"
+[storage:queuestore]
+base_dir = %(data_basedir)s/media/queue
+
+[storage:publicstore]
+base_dir = %(data_basedir)s/media/public
+base_url = /mgoblin_media/
+
+[celery]
+CELERY_RESULT_DBURI = sqlite:///%(data_basedir)s/celery.db
+BROKER_URL = sqlite:///%(data_basedir)s/kombu.db
+
+# Put celery stuff here
+
+# Place plugins here, each in their own subsection of [plugins].
+# See http://docs.mediagoblin.org/siteadmin/plugins.html for details.
+[plugins]
+[[mediagoblin.plugins.geolocation]]
+[[mediagoblin.plugins.basic_auth]]
+[[mediagoblin.plugins.processing_info]]
+[[mediagoblin.media_types.image]]
diff --git a/paste_local.ini b/paste_local.ini
new file mode 100644
index 00000000000..ce3f01e85d7
--- /dev/null
+++ b/paste_local.ini
@@ -0,0 +1,86 @@
+# If you want to make changes to this file, first copy it to
+# paste_local.ini, then make the changes there.
+
+[DEFAULT]
+# Set to true to enable web-based debugging messages and etc.
+debug = false
+
+[pipeline:main]
+# pipeline = errors mediagoblin
+pipeline = mediagoblin
+
+[app:mediagoblin]
+use = egg:mediagoblin#app
+config = %(here)s/mediagoblin_local.ini %(here)s/mediagoblin.ini
+# static paths
+/mgoblin_media = %(here)s/user_dev/media/public
+/mgoblin_static = %(here)s/mediagoblin/static
+/theme_static = %(here)s/user_dev/theme_static
+/plugin_static = %(here)s/user_dev/plugin_static
+
+[loggers]
+keys = root
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = INFO
+handlers = console
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(asctime)s %(levelname)-7.7s [%(name)s] %(message)s
+
+[filter:errors]
+use = egg:mediagoblin#errors
+debug = false
+
+
+##############################
+# Server configuration options
+##############################
+
+# The server that is run by default.
+# By default, should only be accessable locally
+[server:main]
+use = egg:waitress#main
+host = 127.0.0.1
+port = 6543
+# # Gunicorn settings. See http://docs.gunicorn.org/en/19.0/settings.html
+# # for more information about configuring Gunicorn
+# proc_name = gmg
+# reload = true
+# accesslog = -
+
+#######################
+# Helper server configs
+# ---------------------
+# If you are configuring the paste config manually, you can remove
+# these.
+
+# Use this if you want to run on port 6543 and have MediaGoblin be
+# viewable externally
+[server:broadcast]
+use = egg:waitress#main
+host = 0.0.0.0
+port = 6543
+
+# Use this if you want to connect via fastcgi
+[server:fcgi]
+use = egg:flup#fcgi_fork
+host = %(fcgi_host)s
+port = %(fcgi_port)s
+
+[server:http]
+use = egg:waitress#main
+host = %(http_host)s
+port = %(http_port)s