-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
55 lines (40 loc) · 2.3 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
FRAMEBUFFER_COMMIT=1f31c0c79fac74344c0eaca37b02f9a3cf6dca10
FUSE_URL=https://ftp.halifax.rwth-aachen.de/debian/pool/main/f/fuse/fuse_2.9.9-1+deb10u1_armhf.deb
FUSE_FILENAME=fuse_2.9.9-1+deb10u1_armhf.deb
FUSE_CHECKSUM=610b19c800bd7624b19b34de8eb2030c4596a64b2ce6f9efe074d844e3fb798b
.DEFAULT: dist
.PHONY: cryptodaemon gocryptfs password_prompt print framebuffer dist dist_tar
dist: cryptodaemon dist/home/crypto/bin/fusermount gocryptfs password_prompt print framebuffer
dist_go: cryptodaemon gocryptfs
dist_qt: password_prompt print framebuffer
dist_rest: dist/home/crypto/bin/fusermount
cryptodaemon:
GOARCH=arm CGO_ENABLED=0 go build -o dist/home/crypto/bin/cryptodaemon ./cryptodaemon
dist/home/crypto/bin/fusermount: Makefile
wget ${FUSE_URL} -O ${FUSE_FILENAME}
echo "${FUSE_CHECKSUM} ${FUSE_FILENAME}" | sha256sum -c || (echo "Fuse Package Checksum Mismatch" && rm ${FUSE_FILENAME} && exit 1)
ar -p ${FUSE_FILENAME} data.tar.xz | tar --to-stdout -Jx ./bin/fusermount > ./dist/home/crypto/bin/fusermount
rm ${FUSE_FILENAME}
chmod +x ./dist/home/crypto/bin/fusermount
dist_tar: dist
tar cvzf remarkable-crypto-files.tar.gz -C ./dist .
gocryptfs:
GOARCH=arm CGO_ENABLED=0 go build -tags without_openssl -o dist/home/crypto/bin/gocryptfs "github.com/rfjakob/gocryptfs/v2"
password_prompt:
cd gui/password_prompt && qmake && make && mv password_prompt ../../dist/home/crypto/bin/password_prompt
print:
cd gui/print && qmake && make && mv print ../../dist/home/crypto/bin/print
framebuffer:
mkdir -p ./dist/home/crypto/lib
[ -d "remarkable2-framebuffer" ] || git clone https://github.com/ddvk/remarkable2-framebuffer.git
cd remarkable2-framebuffer && git checkout ${FRAMEBUFFER_COMMIT}
cd remarkable2-framebuffer && git reset --hard && git apply ../framebuffer.patch # remove this when https://github.com/ddvk/remarkable2-framebuffer/pull/120 is merged
cd remarkable2-framebuffer && qmake && make
arm-linux-gnueabihf-strip remarkable2-framebuffer/src/client/librm2fb_client.so.1.0.1
cp remarkable2-framebuffer/src/client/librm2fb_client.so.1.0.1 dist/home/crypto/lib/librm2fb_client.so
cp remarkable2-framebuffer/src/server/librm2fb_server.so.1.0.1 dist/home/crypto/lib/librm2fb_server.so
clean:
git clean -f -X dist
rm -rf remarkable2-framebuffer
cd gui/password_prompt && make clean
cd gui/print && make clean