libvncserver: refresh TLS patch
[vncterm.git] / Makefile
1 RELEASE=4.0
2
3 PACKAGE=vncterm
4 # Note: also change version in debian/control and debian/changelog
5 VERSION=1.2
6 PACKAGERELEASE=1
7 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
8 CDATE:=$(shell date +%F)
9
10 VNCVER=0.9.7
11 VNCDIR=LibVNCServer-${VNCVER}
12 VNCSRC=${VNCDIR}.tar.gz
13 VNCLIB=${VNCDIR}/libvncserver/.libs/libvncserver.a
14
15 TIGERVNCSRC=tigervnc-1.1.0.tgz
16 #TIGERVNCSRC=tigervnc-1.2.0.tgz
17
18 DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb
19 SNAP=${PACKAGE}-${VERSION}-${CDATE}.tar.gz
20
21 KEYSTORE=/home/dietmar/pve2-proxdev/proxmox-dev/comodo-for-java.keystore
22
23 all: vncterm
24
25 glyphs.h: genfont
26         ./genfont > glyphs.h.tmp
27         mv glyphs.h.tmp glyphs.h
28
29 genfont: genfont.c
30         gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz
31
32 .PHONY: vnc
33 ${VNCLIB} vnc: ${VNCSRC}
34         rm -rf ${VNCDIR}
35         tar xf ${VNCSRC}
36         ln -s ../vncpatches ${VNCDIR}/patches
37         cd ${VNCDIR}; quilt push -a
38         cd ${VNCDIR}; ./configure; 
39         cd ${VNCDIR}; make
40
41 vncterm: vncterm.c glyphs.h ${VNCLIB}
42         gcc -O2 -g -o $@ vncterm.c -Wall -Wno-deprecated-declarations -D_GNU_SOURCE -I ${VNCDIR} ${VNCLIB} -lnsl -lpthread -lz -ljpeg -lutil -lgnutls
43
44 jar: tigervnc.org
45         if test ! -f /usr/share/icedtea-web/plugin.jar; then echo "please install package icedtea-netx-common"; exit 1; fi
46         rm -rf tigervnc VncViewer.jar
47         rsync -av --exclude .svn --exclude .svnignore  tigervnc.org/ tigervnc
48         ln -s ../tigerpatches tigervnc/patches
49         cd tigervnc; quilt push -a
50         cd tigervnc/java/src/com/tigervnc/vncviewer; make clean; make
51         jarsigner -keystore ${KEYSTORE} -signedjar VncViewer.jar  tigervnc/java/src/com/tigervnc/vncviewer/VncViewer.jar "dc475d72-124a-11e4-a53f-005056c00008"
52
53 # this is for version 1.2
54 #       ln -s ../newtigerpatches tigervnc/patches
55 #       cd tigervnc/java;cmake -G "Unix Makefiles"; make
56 #       jarsigner -keystore ${KEYSTORE} -signedjar VncViewer.jar  tigervnc/java/VncViewer.jar proxmox
57
58 tigervnc.org: ${TIGERVNCSRC}
59         rm -rf tigervnc.org
60         tar xf ${TIGERVNCSRC}
61
62 download:
63         rm -rf tigervnc.org
64         svn co https://tigervnc.svn.sourceforge.net/svnroot/tigervnc/tags/1_1_0 tigervnc.org 
65         tar cf ${TIGERVNCSRC} tigervnc.org
66
67 .PHONY: install
68 install: vncterm vncterm.1 VncViewer.jar
69         mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE}
70         mkdir -p ${DESTDIR}/usr/share/man/man1
71         mkdir -p ${DESTDIR}/usr/bin
72         install -s -m 0755 vncterm ${DESTDIR}/usr/bin
73         mkdir -p ${DESTDIR}/usr/share/vncterm/
74         install -m 0644 VncViewer.jar ${DESTDIR}/usr/share/vncterm/
75
76 .PHONY: dinstall
77 dinstall: ${DEB}
78         dpkg -i ${DEB}
79
80 vncterm.1: vncterm.pod
81         rm -f $@
82         pod2man -n $< -s 1 -r ${VERSION} <$< >$@
83
84 .PHONY: deb
85 ${DEB} deb:
86         make clean
87         rm -rf dest
88         mkdir dest
89         make DESTDIR=`pwd`/dest install
90         install -d -m 0755 dest/DEBIAN
91         install -m 0644 debian/control dest/DEBIAN
92         echo "Architecture: ${ARCH}" >>dest/DEBIAN/control
93         install -m 0644 debian/conffiles dest/DEBIAN
94         install -m 0644 copyright dest/usr/share/doc/${PACKAGE}
95         install -m 0644 vncterm.1 dest/usr/share/man/man1
96         install -m 0644 debian/changelog.Debian dest/usr/share/doc/${PACKAGE}
97         gzip --best dest/usr/share/man/*/*
98         gzip --best dest/usr/share/doc/${PACKAGE}/changelog.Debian
99         dpkg-deb --build dest
100         mv dest.deb ${DEB}
101         rm -rf dest
102         lintian ${DEB}  
103
104 .PHONY: upload
105 upload: ${DEB}
106         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw 
107         mkdir -p /pve/${RELEASE}/extra
108         rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
109         rm -f /pve/${RELEASE}/extra/Packages*
110         cp ${DEB} /pve/${RELEASE}/extra
111         cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
112         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
113
114 .PHONY: clean
115 clean:
116         rm -rf vncterm vncterm.1 vncterm_*.deb tigervnc *~ ${VNCDIR} vncterm-*.tar.gz glyph.h.tmp
117
118 .PHONY: distclean
119 distclean: clean
120         rm -rf tigervnc.org
121
122 .PHONY: dist
123 ${SNAP} dist: distclean
124         rm -rf ../${SNAP}
125         cd ..; tar cvzf ${SNAP} --exclude .svn ${PACKAGE}
126         mv ../${SNAP} ${SNAP}
127
128 .PHONY: uploaddist
129 uploaddist: ${SNAP}
130         scp ${SNAP} pve.proxmox.com:/home/ftp/sources/