mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-10-31 18:57:16 +00:00
localhost_frssoft
f9702f81a9
Patch from: https://git.freesoftwareextremist.com/bloat/commit/?id=887ed241d64ba5db3fd3d87194fb5595e5ad7d73 Patch description: Use cookies for session Remove the server side session storage and store all the session related data in the client side cookies. This decreases the exposure of the auth tokens. It also simplifies the installation process as bloat no longer requires write access to the filesystem. This is a breaking change, all the existing sessions will stop working.
42 lines
937 B
Makefile
42 lines
937 B
Makefile
GO=go
|
|
GOFLAGS=-mod=vendor
|
|
PREFIX=/usr/local
|
|
BINPATH=$(PREFIX)/bin
|
|
SHAREPATH=$(PREFIX)/share/bloat
|
|
|
|
TMPL=templates/*.tmpl
|
|
SRC=main.go \
|
|
config/*.go \
|
|
mastodon/*.go \
|
|
model/*.go \
|
|
renderer/*.go \
|
|
service/*.go \
|
|
util/*.go \
|
|
|
|
all: bloat
|
|
|
|
bloat: $(SRC) $(TMPL)
|
|
$(GO) build $(GOFLAGS) -o bloat main.go
|
|
sed -e "s%=templates%=$(SHAREPATH)/templates%g" \
|
|
-e "s%=static%=$(SHAREPATH)/static%g" \
|
|
< bloat.conf > bloat.gen.conf
|
|
|
|
install: bloat
|
|
mkdir -p $(DESTDIR)$(BINPATH) \
|
|
$(DESTDIR)$(SHAREPATH)/templates \
|
|
$(DESTDIR)$(SHAREPATH)/static
|
|
cp bloat $(DESTDIR)$(BINPATH)/bloat
|
|
chmod 0755 $(DESTDIR)$(BINPATH)/bloat
|
|
cp -r templates/* $(DESTDIR)$(SHAREPATH)/templates
|
|
chmod 0644 $(DESTDIR)$(SHAREPATH)/templates/*
|
|
cp -r static/* $(DESTDIR)$(SHAREPATH)/static
|
|
chmod 0644 $(DESTDIR)$(SHAREPATH)/static/*
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(BINPATH)/bloat
|
|
rm -fr $(DESTDIR)$(SHAREPATH)
|
|
|
|
clean:
|
|
rm -f bloat
|
|
rm -f bloat.gen.conf
|