| 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 1197
|
|---|
| 13 | %endif
|
|---|
| 14 |
|
|---|
| 15 | Name: %{github_name}
|
|---|
| 16 | Version: %{_version}
|
|---|
| 17 | Release: 1%{?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 | BuildRequires: gcc make curl zip
|
|---|
| 32 |
|
|---|
| 33 | %description
|
|---|
| 34 | LibVNCServer makes writing a VNC server (or more correctly, a program
|
|---|
| 35 | exporting a framebuffer via the Remote Frame Buffer protocol) easy.
|
|---|
| 36 |
|
|---|
| 37 | It is based on OSXvnc, which in turn is based on the original Xvnc by
|
|---|
| 38 | ORL, later AT&T research labs in UK.
|
|---|
| 39 |
|
|---|
| 40 | It hides the programmer from the tedious task of managing clients and
|
|---|
| 41 | compression schemata.
|
|---|
| 42 |
|
|---|
| 43 | LibVNCServer was put together and is (actively ;-) maintained by
|
|---|
| 44 | Johannes Schindelin <Johannes.Schindelin@gmx.de>
|
|---|
| 45 |
|
|---|
| 46 | %package devel
|
|---|
| 47 | Requires: %{name} = %{version}
|
|---|
| 48 | Summary: Static Libraries and Header Files for LibVNCServer
|
|---|
| 49 | Group: Libraries/Network
|
|---|
| 50 | Requires: %{name} = %{version}
|
|---|
| 51 |
|
|---|
| 52 | %description devel
|
|---|
| 53 | Static Libraries and Header Files for LibVNCServer.
|
|---|
| 54 |
|
|---|
| 55 | # %package x11vnc
|
|---|
| 56 | #Requires: %{name} = %{version}
|
|---|
| 57 | #Summary: VNC server for the current X11 session
|
|---|
| 58 | #Group: User Interface/X
|
|---|
| 59 | #Requires: %{name} = %{version}
|
|---|
| 60 |
|
|---|
| 61 | # %description x11vnc
|
|---|
| 62 | #x11vnc is to X Window System what WinVNC is to Windows, i.e. a server
|
|---|
| 63 | #which serves the current X Window System desktop via RFB (VNC)
|
|---|
| 64 | #protocol to the user.
|
|---|
| 65 |
|
|---|
| 66 | Based on the ideas of x0rfbserver and on LibVNCServer, it has evolved
|
|---|
| 67 | into a versatile and performant while still easy to use program.
|
|---|
| 68 |
|
|---|
| 69 | %prep
|
|---|
| 70 | # %setup -n %{name}-%{version}
|
|---|
| 71 |
|
|---|
| 72 | %if %_github
|
|---|
| 73 |
|
|---|
| 74 | %if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
|
|---|
| 75 | %setup -n "%{github_name}-%{github_rev}" -q
|
|---|
| 76 | %else
|
|---|
| 77 | %setup -n "%{github_name}-%{github_rev}" -Tc
|
|---|
| 78 | rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
|---|
| 79 | curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
|---|
| 80 | unzip -oC "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d ..
|
|---|
| 81 | %endif
|
|---|
| 82 |
|
|---|
| 83 | %else
|
|---|
| 84 |
|
|---|
| 85 | %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}
|
|---|
| 86 | %setup -q
|
|---|
| 87 | %else
|
|---|
| 88 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 89 | svn export %{?github_rev:-r %{github_rev}} %{github_url} . --force
|
|---|
| 90 | rm -f "%{_sourcedir}/%{name}-%{version}%{?github_rev:-r%{github_rev}}.zip"
|
|---|
| 91 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?github_rev:-r%{github_rev}}.zip" "%{name}-%{version}")
|
|---|
| 92 | %endif
|
|---|
| 93 |
|
|---|
| 94 | %endif
|
|---|
| 95 |
|
|---|
| 96 | autoreconf -fi
|
|---|
| 97 |
|
|---|
| 98 | %if %_github
|
|---|
| 99 | %patch0 -p1
|
|---|
| 100 | %endif
|
|---|
| 101 |
|
|---|
| 102 | %build
|
|---|
| 103 | PATH=`echo $PATH | tr '\\\' '/'` \
|
|---|
| 104 | PATHSEP=";" EXEEXT=".exe" IMPLIBPREF="" IMPLIBSUFF="_dll.a" \
|
|---|
| 105 | LDFLAGS="-lsocket -lmmap" SORT=sort \
|
|---|
| 106 | CC=gcc.exe CXX=g++.exe ECHO=echo RANLIB=echo \
|
|---|
| 107 | AR=ar.exe LD=ld.exe PKG_CONFIG=pkg-config \
|
|---|
| 108 | EMXOMFLD_TYPE="wlink" EMXOMFLD_LINKER="wl.exe" \
|
|---|
| 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 |
|
|---|
| 118 | #%{__install} -d -m0755 %{buildroot}%{_datadir}/x11vnc/classes
|
|---|
| 119 | #%{__install} webclients/java-applet/VncViewer.jar webclients/index.vnc \
|
|---|
| 120 | # %{buildroot}%{_datadir}/x11vnc/classes
|
|---|
| 121 |
|
|---|
| 122 | %clean
|
|---|
| 123 | [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|---|
| 124 |
|
|---|
| 125 | %pre
|
|---|
| 126 | %post
|
|---|
| 127 | %preun
|
|---|
| 128 | %postun
|
|---|
| 129 |
|
|---|
| 130 | %files
|
|---|
| 131 | %defattr(-,root,root)
|
|---|
| 132 | %doc README INSTALL AUTHORS ChangeLog NEWS TODO
|
|---|
| 133 | # %{_bindir}/LinuxVNC
|
|---|
| 134 | %{_bindir}/libvncserver-config
|
|---|
| 135 | %{_libdir}/vncclie0.dll
|
|---|
| 136 | %{_libdir}/vncserv0.dll
|
|---|
| 137 |
|
|---|
| 138 | %files devel
|
|---|
| 139 | %defattr(-,root,root)
|
|---|
| 140 | %{_includedir}/rfb/*
|
|---|
| 141 | %{_libdir}/pkgconfig/libvncclient.pc
|
|---|
| 142 | %{_libdir}/pkgconfig/libvncserver.pc
|
|---|
| 143 | %{_libdir}/vncclie0.dbg
|
|---|
| 144 | %{_libdir}/vncserv0.dbg
|
|---|
| 145 | %{_libdir}/vncclient*.a
|
|---|
| 146 | %{_libdir}/vncserver*.a
|
|---|
| 147 | %{_libdir}/libvncclient.la
|
|---|
| 148 | %{_libdir}/libvncserver.la
|
|---|
| 149 |
|
|---|
| 150 | # %files x11vnc
|
|---|
| 151 | #%defattr(-,root,root)
|
|---|
| 152 | # %{_bindir}/x11vnc
|
|---|
| 153 | # %{_mandir}/man1/x11vnc.1*
|
|---|
| 154 | #%{_datadir}/x11vnc/classes
|
|---|
| 155 |
|
|---|
| 156 | %changelog
|
|---|
| 157 | * Tue Nov 17 2015 Valery Sedletski - <_valerius@mail.ru> first OS/2 build
|
|---|
| 158 | - initial OS/2 build
|
|---|