%define _libdir64 %{_prefix}/lib64 Summary: Library to make writing a vnc server easy Name: libvncserver Version: 0.9.9 Release: 1 # NOTE: --with-tightvnc-filetransfer => GPLv2 License: GPLv2+ Group: System Environment/Libraries URL: http://libvncserver.sourceforge.net/ Source0: http://downloads.sf.net/libvncserver/LibVNCServer-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # upstream name Obsoletes: LibVNCServer < %{version}-%{release} Provides: LibVNCServer = %{version}-%{release} # only required to compile examples BuildRequires: gtk2-devel >= 2.18.5-2 BuildRequires: gnutls-devel >= 2.6.6-2 BuildRequires: libjpeg-devel >= 6b-7 BuildRequires: libpng-devel >= 1.2.46-1 BuildRequires: zlib-devel >= 1.2.3-3 Requires: gnutls >= 2.6.6-2 Requires: libjpeg >= 6b-7 Requires: libpng >= 1.2.46-1 Requires: zlib >= 1.2.3-3 %description LibVNCServer makes writing a VNC server (or more correctly, a program exporting a framebuffer via the Remote Frame Buffer protocol) easy. It hides the programmer from the tedious task of managing clients and compression schemata. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libjpeg-devel >= 6b-7 Requires: libpng-devel >= 1.2.46-1 Requires: zlib-devel >= 1.2.3-3 Provides: LibVNCServer-devel = %{version}-%{release} %description devel %{summary}. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r -q64" or "gcc -maix64". %prep %setup -q -n LibVNCServer-%{version} # fix source perms find . -name "*.c" -exec chmod 0644 {} \; find . -name "*.h" -exec chmod 0644 {} \; mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="xlc_r" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-shared --disable-static \ --with-tightvnc-filetransfer \ --with-x make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --with-tightvnc-filetransfer \ --with-x make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects for i in client server ; do /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libvnc${i}.a ${RPM_BUILD_ROOT}%{_libdir64}/libvnc${i}.so* done ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/AUTHORS 32bit/ChangeLog 32bit/COPYING 32bit/NEWS 32bit/README 32bit/TODO %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %{_bindir}/*-config* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc /usr/bin/*-config* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Thu Feb 06 2014 Michael Perzl - 0.9.9-1 - updated to version 0.9.9 - added RTL-style shared libraries * Mon Nov 21 2011 Michael Perzl - 0.9.8.2-1 - updated to version 0.9.8.2 * Mon Nov 21 2011 Michael Perzl - 0.9.8.2-1 - updated to version 0.9.8.2 * Thu Mar 31 2011 Michael Perzl - 0.9.8-1 - updated to version 0.9.8 * Thu Sep 24 2009 Michael Perzl - 0.9.7-1 - first version for AIX V5.1 and higher