]>
Commit | Line | Data |
---|---|---|
3777ece9 DM |
1 | RELEASE=3.1 |
2 | ||
3 | PACKAGE=spiceterm | |
4 | VERSION=1.0 | |
5 | PACKAGERELEASE=1 | |
6 | ||
7 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) | |
8 | GITVERSION:=$(shell cat .git/refs/heads/master) | |
9 | ||
10 | DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb | |
cc04455b | 11 | |
7409b684 | 12 | PROGRAMS=spiceterm |
22e5ba02 | 13 | |
7f3ff8c0 | 14 | HEADERS=translations.h event_loop.h glyphs.h spiceterm.h keysyms.h |
1631c5a9 | 15 | SOURCES=screen.c event_loop.c input.c spiceterm.c auth-pve.c |
cc04455b | 16 | |
f3112e00 DM |
17 | #export G_MESSAGES_DEBUG=all |
18 | #export SPICE_DEBUG=1 | |
19 | ||
cc04455b DM |
20 | all: ${PROGRAMS} |
21 | ||
22e5ba02 | 22 | spiceterm: ${SOURCES} ${HEADERS} spiceterm.c |
c4d1da14 | 23 | gcc -Werror -Wall -Wtype-limits ${SOURCES} -g -O2 -o $@ -lutil $(shell pkg-config) $(shell pkg-config --cflags --libs gthread-2.0,spice-protocol,spice-server) |
7f3ff8c0 | 24 | |
31b5cce2 DM |
25 | genfont: genfont.c |
26 | gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz | |
27 | ||
7f3ff8c0 DM |
28 | keysyms.h: genkeysym.pl |
29 | ./genkeysym.pl >$@ | |
1d7f2da4 | 30 | |
ca84c6f1 DM |
31 | .PHONY: glyphs |
32 | glyphs: genfont | |
31b5cce2 DM |
33 | ./genfont > glyphs.h |
34 | ||
300ace05 DM |
35 | spiceterm.1: spiceterm.pod |
36 | rm -f $@ | |
37 | pod2man -n $< -s 1 -r ${VERSION} <$< >$@ | |
38 | ||
b06b4cdc | 39 | .PHONY: install |
300ace05 | 40 | install: spiceterm spiceterm.1 |
b06b4cdc | 41 | mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE} |
3777ece9 | 42 | install -m 0644 copyright ${DESTDIR}/usr/share/doc/${PACKAGE} |
b06b4cdc | 43 | mkdir -p ${DESTDIR}/usr/share/man/man1 |
300ace05 | 44 | install -m 0644 spiceterm.1 ${DESTDIR}/usr/share/man/man1 |
b06b4cdc DM |
45 | mkdir -p ${DESTDIR}/usr/bin |
46 | install -s -m 0755 spiceterm ${DESTDIR}/usr/bin | |
47 | ||
3777ece9 DM |
48 | .PHONY: deb |
49 | ${DEB} deb: | |
50 | make clean | |
51 | rsync -a . --exclude build build | |
52 | echo "git clone git://git.proxmox.com/git/spiceterm.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE | |
53 | cd build; dpkg-buildpackage -rfakeroot -b -us -uc | |
54 | lintian ${DEB} | |
55 | ||
56 | .PHONY: dinstall | |
57 | dinstall: ${DEB} | |
58 | dpkg -i ${DEB} | |
59 | ||
6c31241b DM |
60 | |
61 | .PHONY: upload | |
62 | upload: ${DEB} | |
63 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw | |
64 | mkdir -p /pve/${RELEASE}/extra | |
65 | rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb | |
66 | rm -f /pve/${RELEASE}/extra/Packages* | |
67 | cp ${DEB} /pve/${RELEASE}/extra | |
68 | cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz | |
69 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro | |
70 | ||
7409b684 DM |
71 | .PHONY: test |
72 | test: spiceterm | |
7f3ff8c0 DM |
73 | ./spiceterm --noauth --keymap de & remote-viewer spice://localhost?tls-port=5900 |
74 | #G_MESSAGES_DEBUG=all SPICE_DEBUG=1 SPICE_TICKET=test ./spiceterm & G_MESSAGES_DEBUG=all SPICE_DEBUG=1 remote-viewer --debug 'spice://localhost?tls-port=5900' --spice-ca-file /etc/pve/pve-root-ca.pem --spice-secure-channels=all | |
2cc3e3cc DM |
75 | |
76 | .PHONY: distclean | |
77 | distclean: clean | |
78 | ||
79 | .PHONY: clean | |
80 | clean: | |
300ace05 | 81 | rm -rf *~ ${PROGRAMS} build *.deb *.changes genfont |