summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD44
-rw-r--r--config38
-rw-r--r--plume.install8
-rw-r--r--plume.service13
-rw-r--r--sysuser.conf1
6 files changed, 127 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..397b13399d69
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = plume
+ pkgdesc = Federated blogging application
+ pkgver = 0.3.0a2
+ pkgrel = 1
+ url = https://joinplu.me/
+ install = plume.install
+ arch = x86_64
+ license = AGPL3
+ makedepends = cargo
+ depends = cargo-web
+ depends = diesel_cli
+ depends = postgresql
+ source = plume-0.3.0a2.tar.gz::https://github.com/Plume-org/Plume/archive/0.3.0-alpha-2.tar.gz
+ source = sysuser.conf
+ source = plume.service
+ source = config
+ md5sums = 533231959873a2a7c7b416b8df0eaf0a
+ md5sums = ebfcfb05844a25ff281317af9b64f8bb
+ md5sums = c4e95f7b575ea1be0dd905e64f97eb9b
+ md5sums = 92c6867252e9276d5798c30858ed0278
+
+pkgname = plume
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0c2c432efdfe
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Jiuyang Liu <liujiuyang1994@gmail.com>
+
+pkgname=plume
+pkgver=0.3.0a2
+pkgrel=1
+pkgdesc='Federated blogging application'
+arch=(x86_64)
+url='https://joinplu.me/'
+license=(AGPL3)
+depends=(cargo-web diesel_cli postgresql)
+makedepends=(cargo)
+# TODO: fix the alpha version
+source=("$pkgname-$pkgver.tar.gz::https://github.com/Plume-org/Plume/archive/0.3.0-alpha-2.tar.gz"
+ "sysuser.conf"
+ "plume.service"
+ "config")
+install=$pkgname.install
+md5sums=('533231959873a2a7c7b416b8df0eaf0a'
+ 'ebfcfb05844a25ff281317af9b64f8bb'
+ 'c4e95f7b575ea1be0dd905e64f97eb9b'
+ '92c6867252e9276d5798c30858ed0278')
+
+build() {
+ cd "Plume-0.3.0-alpha-2"
+ cargo web deploy -p plume-front
+ # only use postgres as database backend
+ cargo build --release --features postgres
+ cd plume-cli
+ cargo build --release --features postgres
+}
+
+package() {
+ install -d $pkgdir/etc/plume
+ install -Dm644 "config" "$pkgdir/usr/share/webapps/plume/.env"
+ install -Dm644 "sysuser.conf" "$pkgdir/usr/lib/sysusers.d/plume.conf"
+ install -Dm644 "plume.service" "$pkgdir/usr/lib/systemd/system/plume.service"
+ cd "Plume-0.3.0-alpha-2"
+ install -Dm755 "target/release/plume" "$pkgdir/usr/bin/plume"
+ install -Dm755 "target/release/plm" "$pkgdir/usr/bin/plm"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+ cp -r "migrations/postgres" "$pkgdir/usr/share/webapps/plume/migrations"
+ cp -r "static" "$pkgdir/usr/share/webapps/plume"
+ ln -s "/usr/share/webapps/plume/.env" "$pkgdir/etc/plume/config"
+}
diff --git a/config b/config
new file mode 100644
index 000000000000..4a91cb86d97e
--- /dev/null
+++ b/config
@@ -0,0 +1,38 @@
+# the domain name, or IP and port on which Plume is listening. It is used in all federation-related code.
+BASE_URL=example.com
+
+# the URL of the database used by Plume (postgres://plume:plume@localhost/plume by default with PostgreSQL, plume.db with SQlite)
+DATABASE_URL=postgres://plume:plume@localhost/plume
+
+# The folder that stores the migration files for the database, migrations/postgres for PostgreSQL databases or migrations/sqlite for SQlite databases.
+MIGRATION_DIRECTORY=/usr/share/webapps/plume/migrations
+
+# The directory where the search index will be saved (search_index by default).
+SEARCH_INDEX=/usr/share/webapps/plume/search_index
+
+# the adress on which Plume should listen (0.0.0.0 by default).
+#ROCKET_ADDRESS=
+
+# the port on which Plume should listen (7878 by default).
+#ROCKET_PORT=
+
+# key used to sign private cookies and for CSRF protection. If it is not set, it will be regenerated everytime you restart Plume, meaning that all your users will get disconnected. You can generate one with openssl rand -base64 32.
+#ROCKET_SECRET_KEY=
+
+# the SMTP server to connect to.
+#MAIL_SERVER=
+# the username of the user that sends emails.
+#MAIL_USER=
+# its password.
+#MAIL_PASSWORD=
+# the name sent during EHLO/HELO.
+#MAIL_HELO_NAME=
+
+# it will change the logo in the header, the favicon, and the webmanifest (used when pinning a website to home screen on mobile phones). It is recommended to use SVG files when possible.
+#PLUME_LOGO=
+
+# that can change the favicon, if you want to use an image that is not PLUME_LOGO.
+#PLUME_LOGO_FAVICON=
+
+#where size is one of 48, 72, 96, 144, 160, 192, 256 or 512. It will change the icon to use in the webmanifest for the given size. You can of course specify it multiple times, with different sizes.
+#PLUME_LOGO_size=
diff --git a/plume.install b/plume.install
new file mode 100644
index 000000000000..4ba051784670
--- /dev/null
+++ b/plume.install
@@ -0,0 +1,8 @@
+post_install() {
+ chown plume:plume /usr/share/webapps/plume -R
+}
+
+post_upgrade() {
+ echo "Your need to upgrade database by runing ."
+ echo "sudo -su plume diesel migration run"
+}
diff --git a/plume.service b/plume.service
new file mode 100644
index 000000000000..9b891b3ad0a4
--- /dev/null
+++ b/plume.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=plume
+
+[Service]
+Type=simple
+User=plume
+ExecStart=/usr/bin/plume
+WorkingDirectory=/usr/lib/plume
+TimeoutSec=30
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sysuser.conf b/sysuser.conf
new file mode 100644
index 000000000000..cf03318ec8e3
--- /dev/null
+++ b/sysuser.conf
@@ -0,0 +1 @@
+u plume - "Plume daemon"