-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
28 lines (22 loc) · 1013 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
KD2FW_URL=https://fossil.kd2.org/kd2fw/doc/tip/src/lib/KD2/
INSTALL_PATH=/var/lib/karadav
INSTALL_USER=www-data
deps: js-deps php-deps
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:
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'
server:
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}