s3lph
b5cf1da548
Some checks failed
/ nextcloud-27 (push) Successful in 10m48s
/ nextcloud-27-app-calendar (push) Successful in 3m48s
/ nextcloud-27-app-contacts (push) Successful in 1m26s
/ nextcloud-27-app-deck (push) Successful in 3m30s
/ nextcloud-27-app-forms (push) Successful in 2m15s
/ nextcloud-27-app-gpoddersync (push) Successful in 59s
/ nextcloud-27-app-gpxpod (push) Successful in 2m47s
/ nextcloud-27-app-groupfolders (push) Successful in 1m45s
/ nextcloud-27-app-polls (push) Successful in 3m50s
/ nextcloud-27-app-previewgenerator (push) Successful in 1m1s
/ nextcloud-27-app-mail (push) Successful in 8m30s
/ nextcloud-27-app-news (push) Successful in 2m13s
/ nextcloud-27-app-nextpod (push) Successful in 1m32s
/ nextcloud-27-app-notes (push) Successful in 2m15s
/ nextcloud-27-app-notify-push (push) Successful in 4m42s
/ nextcloud-27-app-richdocuments (push) Successful in 2m39s
/ nextcloud-27-app-richdocumentscode (push) Successful in 12m11s
/ nextcloud-27-app-talk (push) Successful in 7m52s
/ nextcloud-27-app-tasks (push) Successful in 2m57s
/ nextcloud-27-app-twofactor-webauthn (push) Successful in 4m7s
/ nextcloud-27-app-user-oidc (push) Successful in 1m37s
/ nextcloud-28 (push) Successful in 16m55s
/ nextcloud-28-app-calendar (push) Successful in 4m15s
/ nextcloud-28-app-contacts (push) Successful in 1m57s
/ nextcloud-28-app-deck (push) Successful in 3m49s
/ nextcloud-28-app-forms (push) Successful in 1m39s
/ nextcloud-28-app-gpoddersync (push) Successful in 1m9s
/ nextcloud-28-app-gpxpod (push) Successful in 3m22s
/ nextcloud-28-app-groupfolders (push) Successful in 1m58s
/ nextcloud-28-app-polls (push) Successful in 3m48s
/ nextcloud-28-app-previewgenerator (push) Successful in 1m4s
/ nextcloud-28-app-mail (push) Successful in 6m36s
/ nextcloud-28-app-news (push) Failing after 40s
/ nextcloud-28-app-nextpod (push) Successful in 1m35s
/ nextcloud-28-app-notes (push) Successful in 2m15s
/ nextcloud-28-app-notify-push (push) Successful in 4m7s
/ nextcloud-28-app-richdocuments (push) Successful in 3m2s
/ nextcloud-28-app-richdocumentscode (push) Successful in 6m24s
/ nextcloud-28-app-talk (push) Successful in 4m30s
/ nextcloud-28-app-tasks (push) Successful in 1m7s
/ nextcloud-28-app-twofactor-webauthn (push) Successful in 1m33s
/ nextcloud-28-app-user-oidc (push) Successful in 52s
79 lines
2.9 KiB
Bash
Executable file
79 lines
2.9 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
set -exo pipefail
|
|
|
|
. ../.skel/helpers.sh
|
|
|
|
VERSION=28
|
|
|
|
URL="https://download.nextcloud.com/server/releases/latest-${VERSION}.tar.bz2"
|
|
|
|
ROOT=$(pwd)
|
|
function fetch() {
|
|
cd "${SRCDIR}"
|
|
wget "${URL}" --output-document "nextcloud-${VERSION}.tar.bz2"
|
|
tar -xf "nextcloud-${VERSION}.tar.bz2"
|
|
patch --strip=1 --directory="${SRCDIR}" --ignore-whitespace < "${ROOT}/patches/01_isfairuse_userfacing_ui.patch"
|
|
}
|
|
|
|
function prepare() {
|
|
mkdir -p \
|
|
"${PKGDIR}/DEBIAN" \
|
|
"${PKGDIR}/var/lib/nextcloud" \
|
|
"${PKGDIR}/usr/lib/nextcloud" \
|
|
"${PKGDIR}/var/lib/nextcloud/data" \
|
|
"${PKGDIR}/lib/systemd/system" \
|
|
"${PKGDIR}/var/log/nextcloud" \
|
|
"${PKGDIR}/usr/local/bin" \
|
|
"${PKGDIR}/etc/apache2/sites-available" \
|
|
"${PKGDIR}/usr/share/doc/${PKGNAME}"
|
|
VERSION=$(cat "${SRCDIR}/nextcloud/version.php" | grep "OC_VersionString" | cut -d"'" -f2)
|
|
cp -r "${SRCDIR}/nextcloud" "${PKGDIR}/var/lib/nextcloud/webroot"
|
|
mv "${PKGDIR}/var/lib/nextcloud/webroot/apps" "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps"
|
|
cp "${ROOT}/config.php" "${PKGDIR}/var/lib/nextcloud/webroot/config/config.php"
|
|
cp "${ROOT}/debian.control" "${PKGDIR}/DEBIAN/control"
|
|
cp "${ROOT}/debian.conffiles" "${PKGDIR}/DEBIAN/conffiles"
|
|
cp "${ROOT}/debian.postinst" "${PKGDIR}/DEBIAN/postinst"
|
|
cp "${ROOT}/nextcloud-cron.service" "${ROOT}/nextcloud-cron.timer" "${PKGDIR}/lib/systemd/system/"
|
|
cp "${ROOT}/nextcloud.site.conf" "${PKGDIR}/etc/apache2/sites-available/"
|
|
cp "${ROOT}/occ.sh" "${PKGDIR}/usr/local/bin/occ"
|
|
sed -re "s/__VERSION__/${VERSION}/g" -i "${PKGDIR}/DEBIAN/control"
|
|
sed -re "s/__MAINTAINER__/${MAINTAINER}/g" -i "${PKGDIR}/DEBIAN/control"
|
|
cp "${SRCDIR}/nextcloud/COPYING" "${PKGDIR}/usr/share/doc/${PKGNAME}/copyright"
|
|
github_changelog nextcloud/server
|
|
find "${PKGDIR}" -exec touch -m --reference "${SRCDIR}/nextcloud/version.php" {} \;
|
|
}
|
|
|
|
function _chown() {
|
|
chown 0:0 -R "${PKGDIR}/"
|
|
# www-data:www-data
|
|
chown 33:33 -R \
|
|
"${PKGDIR}/var/lib/nextcloud" \
|
|
"${PKGDIR}/var/log/nextcloud" \
|
|
"${PKGDIR}/usr/lib/nextcloud"
|
|
find "${PKGDIR}/var/lib/nextcloud/webroot" "${PKGDIR}/var/log/nextcloud" -type f -exec chmod 0640 {} \;
|
|
find "${PKGDIR}/var/lib/nextcloud/webroot" "${PKGDIR}/var/log/nextcloud" -type d -exec chmod 0750 {} \;
|
|
find "${PKGDIR}/usr/lib/nextcloud" -type f -exec chmod 0644 {} \;
|
|
find "${PKGDIR}/usr/lib/nextcloud" -type d -exec chmod 0755 {} \;
|
|
ln -sf "/var/lib/nextcloud/webroot/core" "${PKGDIR}/usr/lib/nextcloud/core"
|
|
}
|
|
|
|
function package() {
|
|
cd "${BUILDDIR}"
|
|
dpkg-deb --build "${PKGDIR}" "${BUILDDIR}"
|
|
}
|
|
|
|
function build() {
|
|
export PKGNAME="nextcloud-${VERSION}"
|
|
export BUILDDIR=${ROOT}/build
|
|
export SRCDIR=${ROOT}/build/srcdir
|
|
export PKGDIR=${ROOT}/build/pkgdir
|
|
mkdir -p ${SRCDIR} ${PKGDIR}
|
|
fetch
|
|
prepare
|
|
_chown
|
|
package
|
|
}
|
|
|
|
|
|
build
|