]>
Commit | Line | Data |
---|---|---|
15075004 | 1 | RELEASE=3.0 |
e6d0212c DM |
2 | |
3 | PACKAGE=vncterm | |
4f21735d | 4 | # Note: also change version in debian/control and debian/changelog |
15075004 DM |
5 | VERSION=1.1 |
6 | PACKAGERELEASE=1 | |
e6d0212c DM |
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 | ||
17 | DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb | |
18 | SNAP=${PACKAGE}-${VERSION}-${CDATE}.tar.gz | |
19 | ||
20 | KEYSTORE=/home/dietmar/pve2-proxdev/proxmox-dev/proxmox-java.keystore | |
21 | ||
22 | all: vncterm | |
23 | ||
24 | glyphs.h: genfont | |
25 | ./genfont > glyphs.h | |
26 | ||
27 | genfont: genfont.c | |
28 | gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz | |
29 | ||
30 | .PHONY: vnc | |
31 | ${VNCLIB} vnc: ${VNCSRC} | |
32 | rm -rf ${VNCDIR} | |
33 | tar xf ${VNCSRC} | |
34 | ln -s ../vncpatches ${VNCDIR}/patches | |
35 | cd ${VNCDIR}; quilt push -a | |
36 | cd ${VNCDIR}; ./configure; | |
37 | cd ${VNCDIR}; make | |
38 | ||
39 | vncterm: vncterm.c glyphs.h ${VNCLIB} | |
40 | gcc -O2 -g -o $@ vncterm.c -Wall -D_GNU_SOURCE -I ${VNCDIR} ${VNCLIB} -lnsl -lpthread -lz -ljpeg -lutil -lgnutls | |
41 | ||
42 | jar: tigervnc.org | |
43 | rm -rf tigervnc VncViewer.jar | |
44 | rsync -av --exclude .svn --exclude .svnignore tigervnc.org/ tigervnc | |
45 | ln -s ../tigerpatches tigervnc/patches | |
46 | cd tigervnc; quilt push -a | |
47 | cd tigervnc/java/src/com/tigervnc/vncviewer; make clean; make | |
48 | jarsigner -keystore ${KEYSTORE} -signedjar VncViewer.jar tigervnc/java/src/com/tigervnc/vncviewer/VncViewer.jar proxmox | |
49 | ||
50 | tigervnc.org: ${TIGERVNCSRC} | |
51 | rm -rf tigervnc.org | |
52 | tar xf ${TIGERVNCSRC} | |
53 | ||
54 | downlaod: | |
55 | rm -rf tigervnc.org | |
56 | svn co https://tigervnc.svn.sourceforge.net/svnroot/tigervnc/tags/1_1_0 tigervnc.org | |
57 | tar cf ${TIGERVNCSRC} tigervnc.org | |
58 | ||
59 | .PHONY: install | |
60 | install: vncterm vncterm.1 VncViewer.jar | |
61 | mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE} | |
62 | mkdir -p ${DESTDIR}/usr/share/man/man1 | |
63 | mkdir -p ${DESTDIR}/usr/bin | |
64 | install -s -m 0755 vncterm ${DESTDIR}/usr/bin | |
65 | mkdir -p ${DESTDIR}/usr/share/vncterm/ | |
66 | install -m 0644 VncViewer.jar ${DESTDIR}/usr/share/vncterm/ | |
67 | ||
68 | .PHONY: dinstall | |
69 | dinstall: ${DEB} | |
70 | dpkg -i ${DEB} | |
71 | ||
72 | vncterm.1: vncterm.pod | |
73 | rm -f $@ | |
74 | pod2man -n $< -s 1 -r ${VERSION} <$< >$@ | |
75 | ||
76 | .PHONY: deb | |
77 | ${DEB} deb: | |
78 | make clean | |
79 | rm -rf dest | |
80 | mkdir dest | |
81 | make DESTDIR=`pwd`/dest install | |
82 | install -d -m 0755 dest/DEBIAN | |
83 | install -m 0644 debian/control dest/DEBIAN | |
84 | echo "Architecture: ${ARCH}" >>dest/DEBIAN/control | |
85 | install -m 0644 debian/conffiles dest/DEBIAN | |
86 | install -m 0644 copyright dest/usr/share/doc/${PACKAGE} | |
87 | install -m 0644 vncterm.1 dest/usr/share/man/man1 | |
88 | install -m 0644 debian/changelog.Debian dest/usr/share/doc/${PACKAGE} | |
89 | gzip --best dest/usr/share/man/*/* | |
90 | gzip --best dest/usr/share/doc/${PACKAGE}/changelog.Debian | |
91 | dpkg-deb --build dest | |
92 | mv dest.deb ${DEB} | |
93 | rm -rf dest | |
94 | lintian ${DEB} | |
95 | ||
96 | .PHONY: upload | |
97 | upload: ${DEB} | |
98 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw | |
99 | mkdir -p /pve/${RELEASE}/extra | |
100 | rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb | |
101 | rm -f /pve/${RELEASE}/extra/Packages* | |
102 | cp ${DEB} /pve/${RELEASE}/extra | |
103 | cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz | |
104 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro | |
105 | ||
106 | .PHONY: clean | |
107 | clean: | |
108 | rm -rf vncterm vncterm.1 vncterm_*.deb tigervnc *~ ${VNCDIR} vncterm-*.tar.gz | |
109 | ||
110 | .PHONY: distclean | |
111 | distclean: clean | |
112 | rm -rf tigervnc.org | |
113 | ||
114 | .PHONY: dist | |
115 | ${SNAP} dist: distclean | |
116 | rm -rf ../${SNAP} | |
117 | cd ..; tar cvzf ${SNAP} --exclude .svn ${PACKAGE} | |
118 | mv ../${SNAP} ${SNAP} | |
119 | ||
120 | .PHONY: uploaddist | |
121 | uploaddist: ${SNAP} | |
122 | scp ${SNAP} pve.proxmox.com:/home/ftp/sources/ |