]> git.proxmox.com Git - spiceterm.git/blob - Makefile
0c3b16b6e0451d4706b1b12f9d88c9822f92df5e
[spiceterm.git] / Makefile
1 RELEASE=3.1
2
3 PACKAGE=spiceterm
4 VERSION=1.0
5 PACKAGERELEASE=2
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
11
12 PROGRAMS=spiceterm
13
14 HEADERS=translations.h event_loop.h glyphs.h spiceterm.h keysyms.h
15 SOURCES=screen.c event_loop.c input.c spiceterm.c auth-pve.c
16
17 #export G_MESSAGES_DEBUG=all
18 #export SPICE_DEBUG=1
19
20 all: ${PROGRAMS}
21
22 spiceterm: ${SOURCES} ${HEADERS} spiceterm.c
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)
24
25 genfont: genfont.c
26 gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz
27
28 keysyms.h: genkeysym.pl
29 ./genkeysym.pl >$@
30
31 .PHONY: glyphs
32 glyphs: genfont
33 ./genfont > glyphs.h
34
35 spiceterm.1: spiceterm.pod
36 rm -f $@
37 pod2man -n $< -s 1 -r ${VERSION} <$< >$@
38
39 .PHONY: install
40 install: spiceterm spiceterm.1
41 mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE}
42 install -m 0644 copyright ${DESTDIR}/usr/share/doc/${PACKAGE}
43 mkdir -p ${DESTDIR}/usr/share/man/man1
44 install -m 0644 spiceterm.1 ${DESTDIR}/usr/share/man/man1
45 mkdir -p ${DESTDIR}/usr/bin
46 install -s -m 0755 spiceterm ${DESTDIR}/usr/bin
47
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
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
71 .PHONY: test
72 test: spiceterm
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
75
76 .PHONY: distclean
77 distclean: clean
78
79 .PHONY: clean
80 clean:
81 rm -rf *~ ${PROGRAMS} build *.deb *.changes genfont