-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (42 loc) · 1.09 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Variables
DESTDIR ?=
WWWROOT ?= /var/www/html
WWWPREFIX ?= /http://morniteaque.org/
OUTPUT_DIR ?= out
# Private variables
sts = ps-pwa
all: $(addprefix build-pwa/,$(sts))
# Build
build: $(addprefix build-pwa/,$(sts))
# Build frontend
$(addprefix build-pwa/,$(sts)):
mkdir -p $(OUTPUT_DIR)
hugo --baseURL=/
tar czvf $(OUTPUT_DIR)/$(subst build-pwa/,,$@).tar.gz -C public .
# Install
install: $(addprefix install-pwa/,$(sts))
# Install frontend
$(addprefix install-pwa/,$(sts)):
mkdir -p $(DESTDIR)$(WWWROOT)$(WWWPREFIX)
cp -rf public/* $(DESTDIR)$(WWWROOT)$(WWWPREFIX)
# Uninstall
uninstall: $(addprefix uninstall-pwa/,$(sts))
# Uninstall frontend
$(addprefix uninstall-pwa/,$(sts)):
rm -rf $(DESTDIR)$(WWWROOT)$(WWWPREFIX)
# Run
run:
hugo server --baseURL=/ --appendPort=false
# Develop
dev:
hugo server -D --baseURL=/ --appendPort=false
# Clean
clean:
rm -rf out public resources static/assets
# Dependencies
depend:
npm i
find node_modules/@patternfly/patternfly/ -name "*.css" -type f -delete
rm -rf static/assets
mkdir -p static
cp -r node_modules/@patternfly/patternfly/assets static