Commit 366ae7a9 authored by Leonardo Arena's avatar Leonardo Arena

testing/nextcloud: move apps into /var

Instead of shipping subpackages for apps not included by default,
install apps in /var/lib/nextcloud/apps and use the official App Store
to install them
parent 6abfb1e5
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=nextcloud
pkgver="9.0.50"
pkgrel=1
pkgrel=2
pkgdesc="A safe home for all your data"
url="http://nextcloud.com"
arch="noarch"
......@@ -15,7 +15,6 @@ install=
subpackages="$pkgname-doc $pkgname-pgsql $pkgname-sqlite $pkgname-mysql $pkgname-encryption
$pkgname-external $pkgname-gallery $pkgname-ldap
$pkgname-texteditor $pkgname-pdfviewer $pkgname-videoplayer"
replaces="$pkgname-plugins"
#missing subpkg="$pkgname-calendar $pkgname-contacts $pkgname-documents $pkgname-mozilla_sync
# $pkgname-music $pkgname-tasks"
......@@ -29,11 +28,11 @@ pkggroups="www-data"
#_builddir="$srcdir"/core-$pkgver
_builddir="$srcdir"/$pkgname
_ncbasedir="/var/lib/nextcloud"
_ncbasedir="/var/lib/$pkgname"
_ncdatadir="$_ncbasedir/data"
_ncwwwdir="/usr/share/webapps/nextcloud"
_ncappsdir="$_ncwwwdir/apps"
_ncconfdir="/etc/nextcloud"
_ncwwwdir="/usr/share/webapps/$pkgname"
_ncappsdir="$_ncbasedir/apps"
_ncconfdir="/etc/$pkgname"
prepare() {
......@@ -47,24 +46,24 @@ prepare() {
build() {
cd "$_builddir"
return 0
}
package() {
cd "$_builddir"
mkdir -p "$pkgdir"${_ncconfdir}
mkdir -p "$pkgdir"${_ncdatadir}
mkdir -p "$pkgdir"${_ncwwwdir}
for dir in ${_ncconfdir} ${_ncdatadir} ${_ncwwwdir}; do
mkdir -p "$pkgdir"$dir || return 1
done
rm -rf config data
mv * "$pkgdir"${_ncwwwdir} || return 1
chmod +x "$pkgdir"${_ncwwwdir}/occ || return 1
ln -s $_ncconfdir "$pkgdir"${_ncwwwdir}/config || return 1
install -m664 .htaccess "$pkgdir"${_ncwwwdir}/.htaccess
for dir in \
"$pkgdir"${_ncconfdir} \
"$pkgdir"${_ncdatadir} \
"$pkgdir"${_ncappsdir}; do
chown -R :www-data $dir || return 1
chmod 770 $dir || return 1
mv "$pkgdir"$_ncwwwdir/apps "$pkgdir"$_ncbasedir || return
ln -s $_ncappsdir "$pkgdir"$_ncwwwdir/apps || return 1
for dir in ${_ncconfdir} ${_ncdatadir} ${_ncappsdir}; do
chown -R :www-data "$pkgdir"$dir || return 1
chmod 770 "$pkgdir"$dir || return 1
done
}
......@@ -98,14 +97,6 @@ mysql() {
mkdir -p "$subpkgdir"${_ncwwwdir}
}
plugins() {
arch="noarch"
pkgdesc="Nextcloud 3rdparty plugins"
depends="nextcloud"
mkdir -p "$subpkgdir"${_ncwwwdir} || return 1
mv "$pkgdir"${_ncwwwdir}/3rdparty "$subpkgdir"${_ncwwwdir}
}
_mv_app() {
mkdir -p "$subpkgdir"${_ncappsdir} || return 1
if [ "$1" = "pkg" ]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment