| 1 | # Note that this is NOT a relocatable package | 
|---|
| 2 | %define _version     0.9.10 | 
|---|
| 3 | %define github_name  libvncserver | 
|---|
| 4 | # whether to use Github, or Netlabs's svn | 
|---|
| 5 | %define _github      0 | 
|---|
| 6 |  | 
|---|
| 7 | %if %_github | 
|---|
| 8 | %define github_url  https://github.com/LibVNC/%{github_name}/archive | 
|---|
| 9 | %define github_rev  LibVNCServer-%{_version} | 
|---|
| 10 | %else | 
|---|
| 11 | %define github_url     http://svn.netlabs.org/repos/ports/libvncserver/trunk | 
|---|
| 12 | %define github_rev     1315 | 
|---|
| 13 | %endif | 
|---|
| 14 |  | 
|---|
| 15 | Name:    %{github_name} | 
|---|
| 16 | Version: %{_version} | 
|---|
| 17 | Release: 4%{?dist} | 
|---|
| 18 | Summary: a library to make writing a vnc server easy | 
|---|
| 19 | License: GPL | 
|---|
| 20 | Group:  System/Libraries | 
|---|
| 21 | #Group: Libraries/Network | 
|---|
| 22 | Packager: Johannes.Schindelin <Johannes.Schindelin@gmx.de> | 
|---|
| 23 | # Source: %{name}-%{version}.tar.bz2 | 
|---|
| 24 | %if %_github | 
|---|
| 25 | Source: %{github_name}-%{github_rev}.zip | 
|---|
| 26 | Patch0: %{name}.patch | 
|---|
| 27 | %else | 
|---|
| 28 | Source: %{name}-%{version}%{?github_rev:-r%{github_rev}}.zip | 
|---|
| 29 | %endif | 
|---|
| 30 | BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot | 
|---|
| 31 | Requires: pthread zlib libgcc1 openssl libpng libjpeg | 
|---|
| 32 | BuildRequires: gcc make curl zip pthread-devel zlib-devel | 
|---|
| 33 | BuildRequires: openssl-devel  libpng-devel libjpeg-devel | 
|---|
| 34 |  | 
|---|
| 35 | %description | 
|---|
| 36 | LibVNCServer makes writing a VNC server (or more correctly, a program | 
|---|
| 37 | exporting a framebuffer via the Remote Frame Buffer protocol) easy. | 
|---|
| 38 |  | 
|---|
| 39 | It is based on OSXvnc, which in turn is based on the original Xvnc by | 
|---|
| 40 | ORL, later AT&T research labs in UK. | 
|---|
| 41 |  | 
|---|
| 42 | It hides the programmer from the tedious task of managing clients and | 
|---|
| 43 | compression schemata. | 
|---|
| 44 |  | 
|---|
| 45 | LibVNCServer was put together and is (actively ;-) maintained by | 
|---|
| 46 | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 
|---|
| 47 |  | 
|---|
| 48 | %package devel | 
|---|
| 49 | Requires:     %{name} = %{version} | 
|---|
| 50 | Summary:      Static Libraries and Header Files for LibVNCServer | 
|---|
| 51 | Group:        Libraries/Network | 
|---|
| 52 | Requires:     %{name} = %{version}-%{release} | 
|---|
| 53 |  | 
|---|
| 54 | %description devel | 
|---|
| 55 | Static Libraries and Header Files for LibVNCServer. | 
|---|
| 56 |  | 
|---|
| 57 | %debug_package | 
|---|
| 58 |  | 
|---|
| 59 | # %package x11vnc | 
|---|
| 60 | #Requires:     %{name} = %{version} | 
|---|
| 61 | #Summary:      VNC server for the current X11 session | 
|---|
| 62 | #Group:        User Interface/X | 
|---|
| 63 | #Requires:     %{name} = %{version} | 
|---|
| 64 |  | 
|---|
| 65 | # %description x11vnc | 
|---|
| 66 | #x11vnc is to X Window System what WinVNC is to Windows, i.e. a server | 
|---|
| 67 | #which serves the current X Window System desktop via RFB (VNC) | 
|---|
| 68 | #protocol to the user. | 
|---|
| 69 |  | 
|---|
| 70 | #Based on the ideas of x0rfbserver and on LibVNCServer, it has evolved | 
|---|
| 71 | #into a versatile and performant while still easy to use program. | 
|---|
| 72 |  | 
|---|
| 73 | %prep | 
|---|
| 74 | # %setup -n %{name}-%{version} | 
|---|
| 75 |  | 
|---|
| 76 | %if %_github | 
|---|
| 77 |  | 
|---|
| 78 | %if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi') | 
|---|
| 79 | %setup -n "%{github_name}-%{github_rev}" -q | 
|---|
| 80 | %else | 
|---|
| 81 | %setup -n "%{github_name}-%{github_rev}" -Tc | 
|---|
| 82 | rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" | 
|---|
| 83 | curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip" | 
|---|
| 84 | unzip -oC "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d .. | 
|---|
| 85 | %endif | 
|---|
| 86 |  | 
|---|
| 87 | %else | 
|---|
| 88 |  | 
|---|
| 89 | %if %{?github_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?github_rev):0} | 
|---|
| 90 | %setup -q | 
|---|
| 91 | %else | 
|---|
| 92 | %setup -n "%{name}-%{version}" -Tc | 
|---|
| 93 | svn export %{?github_rev:-r %{github_rev}} %{github_url} . --force | 
|---|
| 94 | rm -f "%{_sourcedir}/%{name}-%{version}%{?github_rev:-r%{github_rev}}.zip" | 
|---|
| 95 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?github_rev:-r%{github_rev}}.zip" "%{name}-%{version}") | 
|---|
| 96 | %endif | 
|---|
| 97 |  | 
|---|
| 98 | %endif | 
|---|
| 99 |  | 
|---|
| 100 | autoreconf -fi | 
|---|
| 101 |  | 
|---|
| 102 | %if %_github | 
|---|
| 103 | %patch0 -p1 | 
|---|
| 104 | %endif | 
|---|
| 105 |  | 
|---|
| 106 | %build | 
|---|
| 107 | export  LDFLAGS="-Zhigh-mem -lsocket -lmmap" RANLIB=echo | 
|---|
| 108 |  | 
|---|
| 109 | %configure --without-ipv6 | 
|---|
| 110 |  | 
|---|
| 111 | %{__make} %{?_smp_mflags} | 
|---|
| 112 |  | 
|---|
| 113 | %install | 
|---|
| 114 | # [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} | 
|---|
| 115 | # make install prefix=%{buildroot}%{_prefix} | 
|---|
| 116 | %makeinstall includedir="%{buildroot}%{_includedir}/rfb" | 
|---|
| 117 | emxomf -o %{buildroot}%{_libdir}/vncserver.lib %{buildroot}%{_libdir}/vncserver.a | 
|---|
| 118 | emximp -o %{buildroot}%{_libdir}/vncserver_dll.lib %{buildroot}%{_libdir}/vncsrv0.dll | 
|---|
| 119 | emximp -o %{buildroot}%{_libdir}/vncserver0_dll.lib %{buildroot}%{_libdir}/vncsrv0.dll | 
|---|
| 120 | emxomf -o %{buildroot}%{_libdir}/vncclient.lib %{buildroot}%{_libdir}/vncclient.a | 
|---|
| 121 | emximp -o %{buildroot}%{_libdir}/vncclient_dll.lib %{buildroot}%{_libdir}/vnccli0.dll | 
|---|
| 122 | emximp -o %{buildroot}%{_libdir}/vncclient0_dll.lib %{buildroot}%{_libdir}/vnccli0.dll | 
|---|
| 123 | # change shell path in libvncserver-config | 
|---|
| 124 | sed -e 's-\#\!\/bin\/sh-#! /@unixroot/usr/bin/sh-g' \ | 
|---|
| 125 | <%{buildroot}%{_bindir}/libvncserver-config \ | 
|---|
| 126 | >%{buildroot}%{_bindir}/libvncserver-config-1 | 
|---|
| 127 | rm -rf %{buildroot}%{_bindir}/libvncserver-config | 
|---|
| 128 | mv -f %{buildroot}%{_bindir}/libvncserver-config-1 %{buildroot}%{_bindir}/libvncserver-config | 
|---|
| 129 |  | 
|---|
| 130 | #%{__install} -d -m0755 %{buildroot}%{_datadir}/x11vnc/classes | 
|---|
| 131 | #%{__install} webclients/java-applet/VncViewer.jar webclients/index.vnc \ | 
|---|
| 132 | #  %{buildroot}%{_datadir}/x11vnc/classes | 
|---|
| 133 |  | 
|---|
| 134 | %clean | 
|---|
| 135 | [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} | 
|---|
| 136 |  | 
|---|
| 137 | %pre | 
|---|
| 138 | %post | 
|---|
| 139 | %preun | 
|---|
| 140 | %postun | 
|---|
| 141 |  | 
|---|
| 142 | %files | 
|---|
| 143 | %defattr(-,root,root) | 
|---|
| 144 | %doc README INSTALL AUTHORS ChangeLog NEWS TODO | 
|---|
| 145 | # %{_bindir}/LinuxVNC | 
|---|
| 146 | %{_bindir}/libvncserver-config | 
|---|
| 147 | %{_libdir}/vnccli0.dll | 
|---|
| 148 | %{_libdir}/vncsrv0.dll | 
|---|
| 149 |  | 
|---|
| 150 | %files devel | 
|---|
| 151 | %defattr(-,root,root) | 
|---|
| 152 | %{_includedir}/rfb/* | 
|---|
| 153 | %{_libdir}/pkgconfig/libvncclient.pc | 
|---|
| 154 | %{_libdir}/pkgconfig/libvncserver.pc | 
|---|
| 155 | %{_libdir}/vncclient*.a | 
|---|
| 156 | %{_libdir}/vncserver*.a | 
|---|
| 157 | %{_libdir}/vncclient*.lib | 
|---|
| 158 | %{_libdir}/vncserver*.lib | 
|---|
| 159 | %exclude %{_libdir}/libvncclient.la* | 
|---|
| 160 | %exclude %{_libdir}/libvncserver.la* | 
|---|
| 161 |  | 
|---|
| 162 | # %files x11vnc | 
|---|
| 163 | #%defattr(-,root,root) | 
|---|
| 164 | # %{_bindir}/x11vnc | 
|---|
| 165 | # %{_mandir}/man1/x11vnc.1* | 
|---|
| 166 | #%{_datadir}/x11vnc/classes | 
|---|
| 167 |  | 
|---|
| 168 | %changelog | 
|---|
| 169 | * Mon Mar 07 2016 Valery Sedletski <_valerius@mail.ru> - 0.9.10-4 | 
|---|
| 170 | - Corrected the wrong ASCII symbol in place of space in Requires directive | 
|---|
| 171 |  | 
|---|
| 172 | * Mon Feb 29 2016 Valery Sedletski <_valerius@mail.ru> - 0.9.10-3 | 
|---|
| 173 | - Added needed Requires and BuildRequires directives | 
|---|
| 174 |  | 
|---|
| 175 | * Thu Feb 18 2016 Valery Sedletski - <_valerius@mail.ru> 0.9.10-2 | 
|---|
| 176 | - changed libs format to both a.out and OMF | 
|---|
| 177 | - added debug package | 
|---|
| 178 | - added OS/2 DLL shortname | 
|---|
| 179 |  | 
|---|
| 180 | * Tue Nov 17 2015 Valery Sedletski - <_valerius@mail.ru> first OS/2 build | 
|---|
| 181 | - initial OS/2 build | 
|---|