]>
Commit | Line | Data |
---|---|---|
e6d0212c | 1 | PACKAGE=vncterm |
4f21735d | 2 | # Note: also change version in debian/control and debian/changelog |
0870c4f8 | 3 | VERSION=1.4 |
ec96b120 | 4 | PACKAGERELEASE=2 |
e6d0212c | 5 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
b5ae868d | 6 | GITVERSION:=$(shell cat .git/refs/heads/master) |
e6d0212c DM |
7 | CDATE:=$(shell date +%F) |
8 | ||
536237ba FG |
9 | VNCVER=0.9.11 |
10 | VNCREL=LibVNCServer-${VNCVER} | |
11 | VNCDIR=libvncserver-${VNCREL} | |
12 | VNCSRC=${VNCREL}.tar.gz | |
e6d0212c DM |
13 | VNCLIB=${VNCDIR}/libvncserver/.libs/libvncserver.a |
14 | ||
e6d0212c DM |
15 | DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb |
16 | SNAP=${PACKAGE}-${VERSION}-${CDATE}.tar.gz | |
17 | ||
e6d0212c DM |
18 | all: vncterm |
19 | ||
20 | glyphs.h: genfont | |
d4dcc66e FG |
21 | ./genfont > glyphs.h.tmp |
22 | mv glyphs.h.tmp glyphs.h | |
e6d0212c DM |
23 | |
24 | genfont: genfont.c | |
25 | gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz | |
26 | ||
27 | .PHONY: vnc | |
28 | ${VNCLIB} vnc: ${VNCSRC} | |
29 | rm -rf ${VNCDIR} | |
30 | tar xf ${VNCSRC} | |
31 | ln -s ../vncpatches ${VNCDIR}/patches | |
32 | cd ${VNCDIR}; quilt push -a | |
536237ba | 33 | cd ${VNCDIR}; ./autogen.sh --without-ssl --without-websockets --without-tightvnc-filetransfer; |
e6d0212c DM |
34 | cd ${VNCDIR}; make |
35 | ||
36 | vncterm: vncterm.c glyphs.h ${VNCLIB} | |
536237ba | 37 | gcc -O2 -g -o $@ vncterm.c -Wall -Wno-deprecated-declarations -D_GNU_SOURCE -I ${VNCDIR} ${VNCLIB} -lnsl -lpthread -lz -ljpeg -lutil -lgnutls -lpng |
e6d0212c | 38 | |
e6d0212c DM |
39 | |
40 | .PHONY: install | |
bdbcef67 | 41 | install: vncterm vncterm.1 |
e6d0212c | 42 | mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE} |
b5ae868d | 43 | install -m 0644 copyright ${DESTDIR}/usr/share/doc/${PACKAGE} |
e6d0212c | 44 | mkdir -p ${DESTDIR}/usr/share/man/man1 |
b5ae868d | 45 | install -m 0644 vncterm.1 ${DESTDIR}/usr/share/man/man1 |
e6d0212c DM |
46 | mkdir -p ${DESTDIR}/usr/bin |
47 | install -s -m 0755 vncterm ${DESTDIR}/usr/bin | |
e6d0212c DM |
48 | |
49 | .PHONY: dinstall | |
50 | dinstall: ${DEB} | |
51 | dpkg -i ${DEB} | |
52 | ||
53 | vncterm.1: vncterm.pod | |
54 | rm -f $@ | |
55 | pod2man -n $< -s 1 -r ${VERSION} <$< >$@ | |
56 | ||
57 | .PHONY: deb | |
c5ce64cf WB |
58 | deb: $(DEB) |
59 | ${DEB}: | |
e6d0212c | 60 | make clean |
b5ae868d DC |
61 | rsync -a . --exclude build build |
62 | echo "Architecture: ${ARCH}" >> build/debian/control | |
63 | echo "git clone git://git.proxmox.com/git/vncterm.git\\ngit checkout ${GIVERSION}" > build/debian/SOURCE | |
64 | cd build; dpkg-buildpackage -rfakeroot -b -us -uc | |
e6d0212c DM |
65 | lintian ${DEB} |
66 | ||
67 | .PHONY: upload | |
68 | upload: ${DEB} | |
0870c4f8 | 69 | tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch |
e6d0212c DM |
70 | |
71 | .PHONY: clean | |
72 | clean: | |
b5ae868d | 73 | rm -rf vncterm vncterm.1 vncterm_*.deb genfont *~ ${VNCDIR} vncterm-*.tar.gz glyph.h.tmp build *.changes |
e6d0212c DM |
74 | |
75 | .PHONY: distclean | |
76 | distclean: clean | |
e6d0212c DM |
77 | |
78 | .PHONY: dist | |
79 | ${SNAP} dist: distclean | |
80 | rm -rf ../${SNAP} | |
81 | cd ..; tar cvzf ${SNAP} --exclude .svn ${PACKAGE} | |
82 | mv ../${SNAP} ${SNAP} | |
83 | ||
84 | .PHONY: uploaddist | |
85 | uploaddist: ${SNAP} | |
c39031e8 | 86 | scp ${SNAP} pve.proxmox.com:/home/ftp/sources/ |