summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Buquet2016-11-06 03:51:26 +0900
committerMaxime Buquet2016-11-06 03:51:26 +0900
commit2b8b9c5334979cb96a3105151f62513129bc0c38 (patch)
tree38b4295a37f5a2617fbe225e86cae98a58a96cdf
parentcc9bb02c51ddd23cf5acd8f65fb98d068c11a463 (diff)
downloadaur-2b8b9c5334979cb96a3105151f62513129bc0c38.tar.gz
New revision. Updated the PKGBUILD so it copies only necessary files, and changed file permissions
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD100
-rw-r--r--movim.env4
-rw-r--r--movim.install16
-rw-r--r--movim.service10
5 files changed, 93 insertions, 65 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 54127e4ef860..db813169074b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,32 @@
# Generated by mksrcinfo v8
-# Tue Dec 15 20:36:26 UTC 2015
+# Sat Nov 5 18:50:33 UTC 2016
pkgbase = movim-git
pkgdesc = Movim is a decentralized social network, written in PHP and HTML5 and based on the XMPP standard protocol.
- pkgver = r4254
+ pkgver = r5044.a086079
pkgrel = 1
- url = https://movim.eu/
+ url = https://movim.eu
+ install = movim.install
arch = any
- makedepends = php-composer
+ license = AGPL3
makedepends = git
- makedepends = mercurial
+ makedepends = composer
depends = php-gd
depends = php-imagick
- optdepends = mariadb: to use the MySQL database backend
+ optdepends = postgresql: to use the postgresql database backend
+ optdepends = php-pgsql: php bindings for postgresql
+ optdepends = mariadb: to use the mysql database backend
+ optdepends = nginx: reverse proxy
+ optdepends = apache: reverse proxy
+ optdepends = php-fpm: PHP FactCGI process manager
+ provides = movim
+ backup = etc/webapps/movim/db.inc.php
backup = etc/default/movim
- source = movim-git::git+https://github.com/edhelas/movim
+ source = movim::git://github.com/movim/movim
source = movim.env
source = movim.service
- md5sums = SKIP
- md5sums = b0f837f56d80f7da3e8b01315890ec2e
- md5sums = 01c4b71e1c0c13363f8158922280b543
+ sha256sums = SKIP
+ sha256sums = 5c36a52a410a61f9af9daf9cd12e63b1ef7bab10dab9541b5d3cc8aa4805880c
+ sha256sums = 4e9730b357b909912ea2f15ed8ca24189725f79d910da140800d586921c3e431
pkgname = movim-git
diff --git a/PKGBUILD b/PKGBUILD
index aae6c6fc8cc3..e454c7ba5c14 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,68 +1,72 @@
-# $Id$
# Maintainer: Guillaume Friloux <guillaume@friloux.me>
+# Co-Maintainer: Maxime "pep" Buquet <archlinux@bouah.net>
+_pkgbase='movim'
pkgname=movim-git
-pkgver=r4254
+pkgver=r5044.a086079
pkgrel=1
pkgdesc="Movim is a decentralized social network, written in PHP and HTML5 and based on the XMPP standard protocol."
arch=('any')
-url="https://movim.eu/"
-licence=('AGPL')
+url='https://movim.eu'
+license=('AGPL3')
+provides=('movim')
depends=('php-gd' 'php-imagick')
-optdepends=('mariadb: to use the MySQL database backend')
-makedepends=('php-composer' 'git' 'mercurial')
-source=("$pkgname"::'git+https://github.com/edhelas/movim'
- 'movim.env'
- 'movim.service')
-md5sums=('SKIP'
- 'b0f837f56d80f7da3e8b01315890ec2e'
- '01c4b71e1c0c13363f8158922280b543')
-backup=('etc/default/movim')
+optdepends=('postgresql: to use the postgresql database backend'
+ 'php-pgsql: php bindings for postgresql'
+ 'mariadb: to use the mysql database backend'
+ 'nginx: reverse proxy'
+ 'apache: reverse proxy'
+ 'php-fpm: PHP FactCGI process manager')
+makedepends=('git' 'composer')
+source=("$_pkgbase::git://github.com/movim/movim"
+ movim.env
+ movim.service)
+install=movim.install
+sha256sums=('SKIP'
+ '5c36a52a410a61f9af9daf9cd12e63b1ef7bab10dab9541b5d3cc8aa4805880c'
+ '4e9730b357b909912ea2f15ed8ca24189725f79d910da140800d586921c3e431')
+backup=("etc/webapps/$_pkgbase/db.inc.php"
+ "etc/default/movim")
pkgver() {
- cd "$srcdir/$pkgname"
- printf 'r%s' "$(git rev-list --count HEAD)"
-}
-
-prepare() {
- cd "$srcdir/$pkgname"
-
- find . -type f -name .gitignore -delete
- find $(pwd) -name .git -type d -exec rm -rf {} +
- rm -fr INSTALL.md README.md .dir-locals.el \
- debian CHANGELOG.md .bzrignore build.sh tests
+ cd $srcdir/$_pkgbase
+ echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
build() {
- msg "Starting build..."
- cd "$srcdir/$pkgname"
- composer install
+ cd $srcdir/$_pkgbase
+ XDG_CACHE_HOME="$srcdir/cache" composer install \
+ --no-interaction --no-dev --no-suggest
+ rm -rf "$srcdir/cache"
}
package() {
- #find ${srcdir}/${pkgname}/ -type d -name .git -exec rm -rf {} \;
+ cd "$srcdir/$_pkgbase"
+
+ install -m755 -d "$pkgdir/usr/share/webapps/$_pkgbase"
+
+ # Movim-editable directories
+ install -o http -m755 -d "$pkgdir/usr/share/webapps/$_pkgbase"/{cache,users}
- # install license
- install -d ${pkgdir}/usr/share/licenses/${pkgname}
- mv ${srcdir}/${pkgname}/COPYING ${pkgdir}/usr/share/licenses/${pkgname}
+ cp -r app lib locales src system themes vendor "$pkgdir/usr/share/webapps/$_pkgbase"
+ install -Dm644 VERSION INSTALL.md README.md index.php linker.php manifest.webapp \
+ "$pkgdir/usr/share/webapps/$_pkgbase"
+ install -Dm755 daemon.php mud.php "$pkgdir/usr/share/webapps/$_pkgbase"
- # install project
- install -d ${pkgdir}/usr/share/webapps/
- cp -a ${srcdir}/${pkgname} ${pkgdir}/usr/share/webapps/
- chown -R http:http ${pkgdir}/usr/share/webapps/${pkgname}
- find ${pkgdir}/usr/share/webapps/${pkgname} -type f -exec chmod 0664 {} \;
- find ${pkgdir}/usr/share/webapps/${pkgname} -type d -exec chmod 0755 {} \;
+ # Configuration file
+ install -m750 -d "$pkgdir/etc/webapps/$_pkgbase"
+ install -Dm750 config/db.example.inc.php "$pkgdir/etc/webapps/$_pkgbase/db.inc.php"
+ chown -R http:root "$pkgdir/etc/webapps/$_pkgbase"
+ chmod -R u+rwX,g+rwX,o-rwx "$pkgdir/etc/webapps/$_pkgbase"
+ ln -s "/etc/webapps/$_pkgbase" "$pkgdir/usr/share/webapps/$_pkgbase/config"
- # move config to /etc
- install -d ${pkgdir}/etc/webapps/${pkgname}
- mv ${pkgdir}/usr/share/webapps/${pkgname}/config ${pkgdir}/etc/webapps/${pkgname}/config
- chown -R http:http ${pkgdir}/etc/webapps/${pkgname}
- ln -s /etc/webapps/${pkgname}/config ${pkgdir}/usr/share/webapps/${pkgname}/config
-
- # Add nginx example conf file
+ # Log files
+ install -m770 -d "$pkgdir/var/log/webapps/$_pkgbase"
+ chown -R http:root "$pkgdir/var/log/webapps/$_pkgbase"
+ ln -s "/var/log/webapps/$_pkgbase" "$pkgdir/usr/share/webapps/$_pkgbase/log"
- # Add systemd service
- install -d ${pkgdir}/etc/default
- install -m 744 ${srcdir}/movim.env ${pkgdir}/etc/default/movim
- install -Dm644 ${srcdir}/movim.service "${pkgdir}"/usr/lib/systemd/system/movim.service
+ # Systemd unit file
+ install -m755 -d "$pkgdir/etc/default"
+ install -o http -Dm640 "$srcdir/movim.env" "$pkgdir/etc/default/$_pkgbase"
+ install -Dm644 "$srcdir/movim.service" "$pkgdir/usr/lib/systemd/system/movim.service"
}
diff --git a/movim.env b/movim.env
index 7d6b7d69b394..5ac768a9fb07 100644
--- a/movim.env
+++ b/movim.env
@@ -1,2 +1,2 @@
-MOVIM_URL="http://localhost/movim"
-MOVIM_PORT="8080"
+MOVIM_URL=https://pod.example.org
+MOVIM_PORT=8080
diff --git a/movim.install b/movim.install
new file mode 100644
index 000000000000..8ea3d88554b1
--- /dev/null
+++ b/movim.install
@@ -0,0 +1,16 @@
+post_install() {
+ echo 'Post-installation tutorial'
+ echo 'https://github.com/movim/movim/wiki/Install-Movim#2-database-configuration'
+ echo
+ echo 'You should also read'
+ echo 'https://github.com/movim/movim/wiki/Install-Movim#general-behaviour'
+ echo
+ echo 'To complete the setup, please install a database and configure a reverse proxy.'
+ echo 'Don’t forget to adapt /etc/webapps/movim/db.inc.php and /etc/default/movim'
+ echo 'to your server settings'
+ echo 'Once everything is setup, use `systemctl start movim` to start the daemon'
+}
+
+post_upgrade() {
+ post_install $1
+}
diff --git a/movim.service b/movim.service
index 3922cb8ddd5c..6b01739acadf 100644
--- a/movim.service
+++ b/movim.service
@@ -1,14 +1,14 @@
[Unit]
-Description=Movim xmpp web client
-After=local-fs.target network.target mysql.service nginx.service
+Description=Movim Daemon
+After=network.target
[Service]
+User=http
WorkingDirectory=/usr/share/webapps/movim
EnvironmentFile=/etc/default/movim
+ExecStartPre=/usr/bin/php mud.php db --set
ExecStart=/usr/bin/php daemon.php $MOVIM_URL $MOVIM_PORT
-Restart= always
-User=http
+Restart=always
[Install]
WantedBy=multi-user.target
-