Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
13866843bb | |||
1e31b671da | |||
41cd8d2ba2 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,6 +3,6 @@
|
|||||||
build
|
build
|
||||||
*.o
|
*.o
|
||||||
*.min.js
|
*.min.js
|
||||||
/bouquins
|
bouquins
|
||||||
externals
|
externals
|
||||||
ksql.h
|
bouquins*.tar.gz
|
||||||
|
@ -4,14 +4,10 @@ stages:
|
|||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- make
|
- make package
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- '*.o'
|
- build/*
|
||||||
- bouquins
|
|
||||||
- '*.min.js'
|
|
||||||
- '*.html'
|
|
||||||
- '*.min.js'
|
|
||||||
expire_in: 1 hour
|
expire_in: 1 hour
|
||||||
tags:
|
tags:
|
||||||
- kcgi
|
- kcgi
|
||||||
|
43
Makefile
43
Makefile
@ -60,11 +60,19 @@ sinclude GNUmakefile.local
|
|||||||
DATABASE = metadata.db
|
DATABASE = metadata.db
|
||||||
OBJS = db.o db_author.o db_book.o db_series.o json.o main.o
|
OBJS = db.o db_author.o db_book.o db_series.o json.o main.o
|
||||||
|
|
||||||
|
EXT = externals
|
||||||
|
|
||||||
|
BOOTSTRAP_VERSION = 3.3.7
|
||||||
|
BOOTSTRAP_DIST = bootstrap-$(BOOTSTRAP_VERSION)-dist
|
||||||
|
BOOTSTRAP_URL = https://github.com/twbs/bootstrap/releases/download/v$(BOOTSTRAP_VERSION)/$(BOOTSTRAP_DIST).zip
|
||||||
|
BOOTSTRAP_TMP_ZIP = $(EXT)/bootstrap.zip
|
||||||
|
VUE_URL = https://vuejs.org/js/vue.min.js
|
||||||
|
|
||||||
|
VUEJS = $(EXT)/vue.min.js
|
||||||
HTMLS = index.html book.html author.html series.html search.html
|
HTMLS = index.html book.html author.html series.html search.html
|
||||||
JSMINS = index.min.js book.min.js author.min.js series.min.js search.min.js
|
JSMINS = index.min.js book.min.js author.min.js series.min.js search.min.js $(VUEJS)
|
||||||
EXTJS = externals/vue.min.js
|
CSS = $(EXT)/$(BOOTSTRAP_DIST)/css/bootstrap.min.css
|
||||||
CSS = externals/bootstrap.min.css
|
FONTS = $(EXT)/$(BOOTSTRAP_DIST)/fonts/*
|
||||||
FONTS = externals/fonts/*
|
|
||||||
|
|
||||||
CFLAGS += -g -W -Wall -O2 $(SECURE)
|
CFLAGS += -g -W -Wall -O2 $(SECURE)
|
||||||
CFLAGS += -DLOGFILE=\"$(LOGFILE)\"
|
CFLAGS += -DLOGFILE=\"$(LOGFILE)\"
|
||||||
@ -80,10 +88,35 @@ all: $(TARGET) $(HTMLS) $(JSMINS)
|
|||||||
|
|
||||||
api: swagger.json
|
api: swagger.json
|
||||||
|
|
||||||
|
$(BOOTSTRAP_TMP_ZIP):
|
||||||
|
fetch -o $(BOOTSTRAP_TMP_ZIP) $(BOOTSTRAP_URL)
|
||||||
|
|
||||||
|
$(EXT)/$(BOOTSTRAP_DIST): $(BOOTSTRAP_TMP_ZIP)
|
||||||
|
unzip -d $(EXT) $(BOOTSTRAP_TMP_ZIP)
|
||||||
|
|
||||||
|
$(VUEJS):
|
||||||
|
fetch -o $(VUEJS) $(VUE_URL)
|
||||||
|
|
||||||
|
$(EXT): $(EXT)/$(BOOTSTRAP_DIST) $(VUEJS)
|
||||||
|
|
||||||
|
packwww: $(EXT) $(HTMLS) $(JSMINS)
|
||||||
|
mkdir -p build build/css build/fonts build/js
|
||||||
|
cp $(HTMLS) build
|
||||||
|
cp $(JSMINS) $(VUEJS) build/js
|
||||||
|
cp $(CSS) build/css
|
||||||
|
cp $(FONTS) build/fonts
|
||||||
|
|
||||||
|
packcgi: $(TARGET)
|
||||||
|
mkdir -p build/cgi-bin
|
||||||
|
cp $(TARGET) build/cgi-bin
|
||||||
|
cp $(OBJS) build/cgi-bin
|
||||||
|
|
||||||
|
package: packcgi packwww
|
||||||
|
|
||||||
installwww: all
|
installwww: all
|
||||||
mkdir -p $(HTDOCS) $(HTDOCS)/css $(HTDOCS)/fonts $(HTDOCS)/js
|
mkdir -p $(HTDOCS) $(HTDOCS)/css $(HTDOCS)/fonts $(HTDOCS)/js
|
||||||
install -m 0444 $(HTMLS) $(HTDOCS)
|
install -m 0444 $(HTMLS) $(HTDOCS)
|
||||||
install -m 0444 $(JSMINS) $(EXTJS) $(HTDOCS)/js
|
install -m 0444 $(JSMINS) $(HTDOCS)/js
|
||||||
install -m 0444 $(CSS) $(HTDOCS)/css
|
install -m 0444 $(CSS) $(HTDOCS)/css
|
||||||
install -m 0444 $(FONTS) $(HTDOCS)/fonts
|
install -m 0444 $(FONTS) $(HTDOCS)/fonts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user