Building libresize
and libtranscode
:
This must be done on a Debian stretch system or chroot.
First, clone https://github.com/mickael-kerjean/filestash
.
cd filestash/server/plugin/plg_image_light/deps/
Copy ./create_libresize.sh
from this gist over and run it
Copy ./create_libtranscode.sh
from this gist over and run it
cd back into the root of filestash
and run
mkdir -p ./dist/data/state/config
cp config/config.json ./dist/data/state/config/
mkdir -p ./filestash/data/state/config
cp config/config.json ./filestash/data/state/config/
Backend:
Run make build_init
cd filestash/server/plugin/plg_image_light
Open lib_resize.go
and add // #cgo LDFLAGS: -lm -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -ldl -L./deps -l:libresize.a
at the top
Open lib_transcode.go
and add // #cgo LDFLAGS: -lm -lpthread -L./deps -l:libtranscode.a
at top
(If you want, edit server/plugin/plg_starter_http/index.go
and change go ensureAppHasBooted(fmt.Sprintf(":%d/about", port), fmt.Sprintf("[http] listening on :%d", port))
to go ensureAppHasBooted(fmt.Sprintf("http://127.0.0.1:%d/about", port), fmt.Sprintf("[http] listening on 127.0.0.1:%d", port))
if you only want it to listen on localhost
)
Run make build_backend
Run cp dist/filestash filestash/
Frontend:
Install npm < 7 (on Arch, you can use npm6
)
npm install
make build_frontend
cp -R ./dist/data/public ./filestash/data/public
Run:
Go to filestash
in the root, and run ./filestash