summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Friloux2015-12-15 21:40:29 +0100
committerGuillaume Friloux2015-12-15 21:40:29 +0100
commitcc9bb02c51ddd23cf5acd8f65fb98d068c11a463 (patch)
treeee01894b5fc80a21e4a0a5714ac62eca7c2be337
downloadaur-cc9bb02c51ddd23cf5acd8f65fb98d068c11a463.tar.gz
Adding first version of this pkgbuild and associated files.
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD68
-rw-r--r--movim.env2
-rw-r--r--movim.service14
4 files changed, 108 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..54127e4ef860
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+# Generated by mksrcinfo v8
+# Tue Dec 15 20:36:26 UTC 2015
+pkgbase = movim-git
+ pkgdesc = Movim is a decentralized social network, written in PHP and HTML5 and based on the XMPP standard protocol.
+ pkgver = r4254
+ pkgrel = 1
+ url = https://movim.eu/
+ arch = any
+ makedepends = php-composer
+ makedepends = git
+ makedepends = mercurial
+ depends = php-gd
+ depends = php-imagick
+ optdepends = mariadb: to use the MySQL database backend
+ backup = etc/default/movim
+ source = movim-git::git+https://github.com/edhelas/movim
+ source = movim.env
+ source = movim.service
+ md5sums = SKIP
+ md5sums = b0f837f56d80f7da3e8b01315890ec2e
+ md5sums = 01c4b71e1c0c13363f8158922280b543
+
+pkgname = movim-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aae6c6fc8cc3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# $Id$
+# Maintainer: Guillaume Friloux <guillaume@friloux.me>
+
+pkgname=movim-git
+pkgver=r4254
+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')
+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')
+
+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
+}
+
+build() {
+ msg "Starting build..."
+ cd "$srcdir/$pkgname"
+ composer install
+}
+
+package() {
+ #find ${srcdir}/${pkgname}/ -type d -name .git -exec rm -rf {} \;
+
+ # install license
+ install -d ${pkgdir}/usr/share/licenses/${pkgname}
+ mv ${srcdir}/${pkgname}/COPYING ${pkgdir}/usr/share/licenses/${pkgname}
+
+ # 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 {} \;
+
+ # 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
+
+ # 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
+}
diff --git a/movim.env b/movim.env
new file mode 100644
index 000000000000..7d6b7d69b394
--- /dev/null
+++ b/movim.env
@@ -0,0 +1,2 @@
+MOVIM_URL="http://localhost/movim"
+MOVIM_PORT="8080"
diff --git a/movim.service b/movim.service
new file mode 100644
index 000000000000..3922cb8ddd5c
--- /dev/null
+++ b/movim.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Movim xmpp web client
+After=local-fs.target network.target mysql.service nginx.service
+
+[Service]
+WorkingDirectory=/usr/share/webapps/movim
+EnvironmentFile=/etc/default/movim
+ExecStart=/usr/bin/php daemon.php $MOVIM_URL $MOVIM_PORT
+Restart= always
+User=http
+
+[Install]
+WantedBy=multi-user.target
+