karadav/Makefile

29 lines
1,013 B
Makefile
Raw Normal View History

2022-10-21 17:22:37 +00:00
KD2FW_URL=https://fossil.kd2.org/kd2fw/doc/tip/src/lib/KD2/
2022-10-30 16:07:20 +00:00
INSTALL_PATH=/var/lib/karadav
INSTALL_USER=www-data
2022-10-21 17:22:37 +00:00
deps: js-deps php-deps
2022-10-10 12:01:20 +00:00
js-deps:
wget -O www/webdav.js https://raw.githubusercontent.com/kd2org/webdav-manager.js/main/webdav.js
wget -O www/webdav.css https://raw.githubusercontent.com/kd2org/webdav-manager.js/main/webdav.css
php-deps:
2022-10-21 17:22:37 +00:00
wget -O lib/KD2/ErrorManager.php '${KD2FW_URL}ErrorManager.php'
wget -O lib/KD2/WebDAV/Server.php '${KD2FW_URL}WebDAV/Server.php'
wget -O lib/KD2/WebDAV/AbstractStorage.php '${KD2FW_URL}WebDAV/AbstractStorage.php'
wget -O lib/KD2/WebDAV/NextCloud.php '${KD2FW_URL}WebDAV/NextCloud.php'
wget -O lib/KD2/WebDAV/WOPI.php '${KD2FW_URL}WebDAV/WOPI.php'
2022-08-30 05:01:39 +00:00
server:
2022-10-30 16:07:20 +00:00
php -S 0.0.0.0:8080 -t www www/_router.php
install: deps
mkdir -p ${INSTALL_PATH}
mkdir ${INSTALL_PATH}/data
cp -r lib www ${INSTALL_PATH}
cp schema.sql ${INSTALL_PATH}/schema.sql
cp config.dist.php ${INSTALL_PATH}/config.local.php
chown -R ${INSTALL_USER}:${INSTALL_USER} ${INSTALL_PATH}