]> git.proxmox.com Git - spiceterm.git/blame - Makefile
drop SASL support allowing using Debians libspice-server
[spiceterm.git] / Makefile
CommitLineData
169c1cc6 1RELEASE=5.0
3777ece9
DM
2
3PACKAGE=spiceterm
169c1cc6 4VERSION=3.0
79660a65 5PACKAGERELEASE=5
3777ece9
DM
6
7ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
8GITVERSION:=$(shell cat .git/refs/heads/master)
9
10DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb
cc04455b 11
7409b684 12PROGRAMS=spiceterm
22e5ba02 13
7f3ff8c0 14HEADERS=translations.h event_loop.h glyphs.h spiceterm.h keysyms.h
1631c5a9 15SOURCES=screen.c event_loop.c input.c spiceterm.c auth-pve.c
cc04455b 16
16ca49da 17PKGS := glib-2.0 spice-protocol spice-server
f6943f4b
WB
18CFLAGS += `pkg-config --cflags $(PKGS)`
19LIBS += `pkg-config --libs $(PKGS)`
20
f3112e00
DM
21#export G_MESSAGES_DEBUG=all
22#export SPICE_DEBUG=1
23
cc04455b
DM
24all: ${PROGRAMS}
25
22e5ba02 26spiceterm: ${SOURCES} ${HEADERS} spiceterm.c
f6943f4b 27 gcc -Werror -Wall -Wl,-z,relro -Wtype-limits ${SOURCES} -g -O2 $(CFLAGS) -o $@ -lutil $(LIBS)
7f3ff8c0 28
31b5cce2
DM
29genfont: genfont.c
30 gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz
31
7f3ff8c0
DM
32keysyms.h: genkeysym.pl
33 ./genkeysym.pl >$@
1d7f2da4 34
ca84c6f1
DM
35.PHONY: glyphs
36glyphs: genfont
31b5cce2
DM
37 ./genfont > glyphs.h
38
300ace05
DM
39spiceterm.1: spiceterm.pod
40 rm -f $@
41 pod2man -n $< -s 1 -r ${VERSION} <$< >$@
42
b06b4cdc 43.PHONY: install
300ace05 44install: spiceterm spiceterm.1
b06b4cdc 45 mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE}
3777ece9 46 install -m 0644 copyright ${DESTDIR}/usr/share/doc/${PACKAGE}
b06b4cdc 47 mkdir -p ${DESTDIR}/usr/share/man/man1
300ace05 48 install -m 0644 spiceterm.1 ${DESTDIR}/usr/share/man/man1
b06b4cdc
DM
49 mkdir -p ${DESTDIR}/usr/bin
50 install -s -m 0755 spiceterm ${DESTDIR}/usr/bin
51
3777ece9 52.PHONY: deb
6f0a5229
WB
53deb: ${DEB}
54${DEB}:
3777ece9
DM
55 make clean
56 rsync -a . --exclude build build
57 echo "git clone git://git.proxmox.com/git/spiceterm.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
58 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
59 lintian ${DEB}
60
61.PHONY: dinstall
62dinstall: ${DEB}
63 dpkg -i ${DEB}
64
6c31241b
DM
65
66.PHONY: upload
67upload: ${DEB}
351b18cf 68 tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
6c31241b 69
7409b684
DM
70.PHONY: test
71test: spiceterm
7f3ff8c0
DM
72 ./spiceterm --noauth --keymap de & remote-viewer spice://localhost?tls-port=5900
73 #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
74
75.PHONY: distclean
76distclean: clean
77
78.PHONY: clean
79clean:
300ace05 80 rm -rf *~ ${PROGRAMS} build *.deb *.changes genfont