diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2015-12-23 23:15:11 -0500 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2015-12-23 23:15:11 -0500 |
commit | f3167d615a7d86e2ac5160a55a12de60996cca1e (patch) | |
tree | cc8d48941c5c418888dda6240255a3cde2eaf6f2 | |
parent | 67ee59f98101d1a5822512c5649818a9b46e9d14 (diff) | |
download | tigervnc-f3167d615a7d86e2ac5160a55a12de60996cca1e.tar.gz tigervnc-f3167d615a7d86e2ac5160a55a12de60996cca1e.zip |
Apply latest RPM package build fixes from master to 1.6-branch
Update 1.6 RPMS for modular builds and fixes for #254
-rw-r--r-- | contrib/packages/rpm/el5/SPECS/tigervnc.spec | 130 | ||||
-rw-r--r-- | contrib/packages/rpm/el6/SPECS/tigervnc.spec | 69 |
2 files changed, 165 insertions, 34 deletions
diff --git a/contrib/packages/rpm/el5/SPECS/tigervnc.spec b/contrib/packages/rpm/el5/SPECS/tigervnc.spec index b269e223..7eb4b5bb 100644 --- a/contrib/packages/rpm/el5/SPECS/tigervnc.spec +++ b/contrib/packages/rpm/el5/SPECS/tigervnc.spec @@ -1,7 +1,14 @@ %define _default_patch_fuzz 2 %define tigervnc_src_dir %{_builddir}/%{name}-%{version}%{?snap:-%{snap}} -%define xorg_buildroot %{tigervnc_src_dir}/xorg.build %{!?_self_signed: %define _self_signed 1} +%{!?_bootstrap: %define _bootstrap 1} +#%global scl_name %{name}$(echo %version | sed -e 's/\\.//;s/\\..*//') +%define scl_name %{name}16 +%if %{_bootstrap} +%define xorg_buildroot $RPM_BUILD_ROOT/opt/%{name}/%{scl_name} +%else +%define xorg_buildroot /opt/%{name}/%{scl_name} +%endif Name: tigervnc Version: @VERSION@ @@ -119,6 +126,9 @@ BuildRequires: expat-devel BuildRequires: git, gperf, intltool, libtalloc-devel BuildRequires: kernel-headers, libatomic_ops-devel BuildRequires: xz +%if !%{_bootstrap} +BuildRequires: %{name}-static-devel == %{version} +%endif Requires(post): initscripts chkconfig coreutils Requires(postun):coreutils @@ -270,7 +280,17 @@ BuildArch: noarch %description icons This package contains icons for TigerVNC viewer +%if %{_bootstrap} +%package static-devel +Summary: Static development files necessary to build TigerVNC +Group: Development/Libraries + +%description static-devel +This package contains static development files necessary to build TigerVNC +%endif + %prep +rm -rf $RPM_BUILD_ROOT rm -rf %{_builddir}/%{name}-%{version}%{?snap:-%{snap}} %setup -q -n %{name}-%{version}%{?snap:-%{snap}} @@ -281,6 +301,7 @@ sed -i -e "s#@_libdir@#%{xorg_buildroot}%{_libdir}#" cmake/Modules/FindX11.cmake %patch4 -p1 -b .cookie %patch12 -p1 -b .static-build-fixes +%if %{_bootstrap} tar xzf %SOURCE11 pushd fltk-* %patch15 -p1 -b .static-libs @@ -292,9 +313,11 @@ tar xjf %SOURCE14 tar xzf %SOURCE15 tar xzf %SOURCE16 xzcat %SOURCE17 | tar xf - +%endif mkdir xorg pushd xorg +%if %{_bootstrap} tar xjf %SOURCE100 tar xjf %SOURCE101 tar xjf %SOURCE102 @@ -362,7 +385,9 @@ tar xjf %SOURCE155 tar xjf %SOURCE156 tar xjf %SOURCE157 tar xjf %SOURCE158 +%endif tar xjf %SOURCE159 +%if %{_bootstrap} tar xjf %SOURCE160 tar xjf %SOURCE161 tar xjf %SOURCE162 @@ -406,6 +431,7 @@ popd tar xjf %SOURCE202 tar xjf %SOURCE203 tar xjf %SOURCE204 +%endif pushd xorg-server-1* %patch10000 -p1 -b .CVE-2014-mult %patch10001 -p1 -b .CVE-regressions @@ -414,7 +440,9 @@ for f in `find . -type f -perm -000`; do chmod +r "$f" done popd +%if %{_bootstrap} tar xzf %SOURCE205 +%endif popd cp -a xorg/xorg-server-1*/* unix/xserver @@ -436,17 +464,18 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC" export CXXFLAGS="$CFLAGS -static-libgcc" export PYTHON=python26 +%if %{_bootstrap} mkdir -p %{xorg_buildroot}%{_libdir} pushd %{xorg_buildroot}%{_libdir} -ln -s `g++44 -print-file-name=libz.a` -ln -s `g++44 -print-file-name=libgcc.a` -ln -s `g++44 -print-file-name=libexpat.a` -ln -s `g++44 -print-file-name=libcrypto.a` +ln -s `g++44 -print-file-name=libz.a` . +ln -s `g++44 -print-file-name=libgcc.a` . +ln -s `g++44 -print-file-name=libexpat.a` . +ln -s `g++44 -print-file-name=libcrypto.a` . popd echo "*** Building libjpeg-turbo ***" pushd libjpeg-turbo-* -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --disable-nls --enable-static --disable-shared +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --disable-nls --enable-static --disable-shared make %{?_smp_mflags} DESTDIR=%{xorg_buildroot} install popd @@ -456,13 +485,14 @@ pushd xorg echo "*** Building libsha1 ***" pushd libsha1-* autoreconf -fiv -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --disable-nls --enable-static --disable-shared +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --disable-nls --enable-static --disable-shared make %{?_smp_mflags} DESTDIR=%{xorg_buildroot} install find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{_libdir}|libdir=%{xorg_buildroot}%{_libdir}|" {} \; find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|prefix=%{_prefix}|prefix=%{xorg_buildroot}%{_prefix}|" {} \; popd popd +%endif export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{xorg_buildroot}%{_includedir}" export CXXFLAGS="$RPM_OPT_FLAGS -fPIC -I%{xorg_buildroot}%{_includedir} -static-libgcc" @@ -471,12 +501,13 @@ export LDFLAGS="-L%{xorg_buildroot}%{_libdir} -L%{xorg_buildroot}%{_libdir}/tige export ACLOCAL="aclocal -I %{xorg_buildroot}%{_datadir}/aclocal" export PKG_CONFIG_PATH="%{xorg_buildroot}%{_libdir}/pkgconfig:%{xorg_buildroot}%{_libdir}/tigervnc/pkgconfig:%{xorg_buildroot}%{_datadir}/pkgconfig:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig" +%if %{_bootstrap} echo "*** Building gmp ***" pushd gmp-* %ifarch x86_64 s390x ia64 ppc64 alpha sparc64 -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ABI=64 ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --enable-cxx +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ABI=64 ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --enable-cxx %else -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ABI=32 ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --enable-cxx +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ABI=32 ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --enable-cxx %endif make %{?_smp_mflags} DESTDIR=%{xorg_buildroot} install find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete @@ -486,7 +517,7 @@ popd echo "*** Building libtasn1 ***" pushd libtasn1-* -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared make %{?_smp_mflags} DESTDIR=%{xorg_buildroot} install find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{_libdir}|libdir=%{xorg_buildroot}%{_libdir}|" {} \; @@ -496,7 +527,7 @@ popd echo "*** Building nettle ***" pushd nettle-* autoreconf -fiv -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --disable-openssl +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --disable-openssl make %{?_smp_mflags} DESTDIR=%{xorg_buildroot} install find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{_libdir}|libdir=%{xorg_buildroot}%{_libdir}|" {} \; @@ -506,6 +537,8 @@ popd echo "*** Building gnutls ***" pushd gnutls-* LDFLAGS="-L%{xorg_buildroot}%{_libdir} -lgmp $LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure \ + --host=%{_host} \ + --build=%{_build} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --enable-static \ @@ -530,7 +563,7 @@ pushd xorg echo "*** Building freetype ***" pushd freetype-* -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool make DESTDIR=%{xorg_buildroot} install @@ -568,7 +601,7 @@ popd echo "*** Building fontconfig ***" pushd fontconfig-* autoreconf -fiv -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" HASDOCBOOK=no ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --with-confdir=%{_sysconfdir}/fonts --with-cache-dir=%{_localstatedir}/cache/fontconfig --with-default-fonts=%{_datadir}/fonts --with-add-fonts="%{_datadir}/X11/fonts/Type1,%{_datadir}/X11/fonts/OTF,%{_datadir}/X11/fonts/TTF,%{_datadir}/X11/fonts/misc,%{_datadir}/X11/fonts/100dpi,%{_datadir}/X11/fonts/75dpi,%{_prefix}/local/share/fonts,~/.fonts" +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" HASDOCBOOK=no ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --with-confdir=%{_sysconfdir}/fonts --with-cache-dir=%{_localstatedir}/cache/fontconfig --with-default-fonts=%{_datadir}/fonts --with-add-fonts="%{_datadir}/X11/fonts/Type1,%{_datadir}/X11/fonts/OTF,%{_datadir}/X11/fonts/TTF,%{_datadir}/X11/fonts/misc,%{_datadir}/X11/fonts/100dpi,%{_datadir}/X11/fonts/75dpi,%{_prefix}/local/share/fonts,~/.fonts" make %{?_smp_mflags} make DESTDIR=%{xorg_buildroot} install find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete @@ -578,7 +611,7 @@ popd pushd util-macros-* echo "Building macros" -LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared +LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared make DESTDIR=%{xorg_buildroot} install find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{_libdir}|libdir=%{xorg_buildroot}%{_libdir}|" {} \; @@ -695,21 +728,21 @@ for module in ${modules}; do extraoptions="${extraoptions} --with-freetype-config=%{xorg_buildroot}%{_bindir}/freetype-config" fi if [ "${module}" = "libXScrnSaver" ]; then - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic elif [ "${module}" = "libxkbfile" ]; then - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic elif [ "${module}" = "pixman" ]; then - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic elif [ "${module}" = "libXt" ]; then - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic --with-xfile-search-path="%{_sysconfdir}/X11/%%L/%%T/%%N%%C%%S:%{_sysconfdir}/X11/%%l/%%T/\%%N%%C%%S:%{_sysconfdir}/X11/%%T/%%N%%C%%S:%{_sysconfdir}/X11/%%L/%%T/%%N%%S:%{_sysconfdir}/X\11/%%l/%%T/%%N%%S:%{_sysconfdir}/X11/%%T/%%N%%S:%{_datadir}/X11/%%L/%%T/%%N%%C%%S:%{_datadir}/X1\1/%%l/%%T/%%N%%C%%S:%{_datadir}/X11/%%T/%%N%%C%%S:%{_datadir}/X11/%%L/%%T/%%N%%S:%{_datadir}/X11/%%\l/%%T/%%N%%S:%{_datadir}/X11/%%T/%%N%%S" + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic --with-xfile-search-path="%{_sysconfdir}/X11/%%L/%%T/%%N%%C%%S:%{_sysconfdir}/X11/%%l/%%T/\%%N%%C%%S:%{_sysconfdir}/X11/%%T/%%N%%C%%S:%{_sysconfdir}/X11/%%L/%%T/%%N%%S:%{_sysconfdir}/X\11/%%l/%%T/%%N%%S:%{_sysconfdir}/X11/%%T/%%N%%S:%{_datadir}/X11/%%L/%%T/%%N%%C%%S:%{_datadir}/X1\1/%%l/%%T/%%N%%C%%S:%{_datadir}/X11/%%T/%%N%%C%%S:%{_datadir}/X11/%%L/%%T/%%N%%S:%{_datadir}/X11/%%\l/%%T/%%N%%S:%{_datadir}/X11/%%T/%%N%%S" elif [ "${module}" = "libX11" ]; then - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic elif [ "${module}" = "libXtst" ]; then - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic elif [ "${module}" = "libXpm" ]; then - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic else - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic fi echo ====================== echo building ${module} @@ -735,7 +768,11 @@ for module in ${modules}; do popd done +%else +pushd xorg +%endif +%if %{_bootstrap} # build mesa echo "*** Building Mesa ***" pushd Mesa-* @@ -754,6 +791,8 @@ autoreconf -fiv # link libGL statically against any xorg libraries built above LDFLAGS="$LDFLAGS -Wl,-Bstatic -lxcb -lX11 -lXdmcp -lXau -lXext -lXxf86vm -ldrm -Wl,-Bdynamic -Wl,-rpath,"'\$$'"ORIGIN/../..%{_libdir}/tigervnc:%{_libdir}/tigervnc:%{_libdir}" \ PKG_CONFIG="pkg-config --static" ./configure %{common_flags} \ + --host=%{_host} \ + --build=%{_build} \ --prefix=%{_prefix} \ --libdir=%{_libdir}/tigervnc \ --disable-osmesa \ @@ -775,12 +814,16 @@ find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{_libdir}|libdir=%{xorg_buildroot}%{_libdir}|" {} \; find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|prefix=%{_prefix}|prefix=%{xorg_buildroot}%{_prefix}|" {} \; popd +%endif popd +%if %{_bootstrap} echo "*** Building libpng ***" pushd libpng-* CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" ./configure \ + --host=%{_host} \ + --build=%{_build} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --disable-shared \ @@ -791,10 +834,14 @@ popd echo "*** Building fltk ***" pushd fltk-* +%endif export CMAKE_PREFIX_PATH="%{xorg_buildroot}%{_prefix}:%{_prefix}" export CMAKE_EXE_LINKER_FLAGS=$LDFLAGS export PKG_CONFIG="pkg-config --static" -CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" ./configure \ +%if %{_bootstrap} +./configure \ + --host=%{_host} \ + --build=%{_build} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --enable-x11 \ @@ -812,6 +859,7 @@ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" ./configure \ make %{?_smp_mflags} make DESTDIR=%{xorg_buildroot} install popd +%endif echo "*** Building VNC ***" export CFLAGS="$CFLAGS -fPIC" @@ -835,7 +883,7 @@ sed -i -e 's/^\(\s*WAYLAND_SCANNER_RULES.*\)/dnl\1/' configure.ac autoreconf -fiv chmod +x ./configure # create a relocatable Xvnc so that we can bundle the custom libGL & swrast w/o overwriting existing libs -GL_LIBS='-Wl,-Bdynamic -lGL' LDFLAGS="$LDFLAGS -L%{xorg_buildroot}%{_libdir}/tigervnc -Wl,-rpath,"'\$$'"ORIGIN/../..%{_libdir}/tigervnc:%{_libdir}/tigervnc:%{_libdir}" \ +GL_LIBS='-Wl,-Bdynamic -lGL' LDFLAGS="$LDFLAGS -Wl,-rpath,"'\$$'"ORIGIN/../..%{_libdir}/tigervnc:%{_libdir}/tigervnc:%{_libdir}" \ %configure \ --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_datadir}/man \ --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} \ @@ -886,16 +934,17 @@ JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" make popd %install -rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT pushd unix/xserver/hw/vnc make install DESTDIR=$RPM_BUILD_ROOT popd -pushd xorg/Mesa-* -make install DESTDIR=$RPM_BUILD_ROOT -popd +mkdir -p $RPM_BUILD_ROOT%{_libdir}/tigervnc/dri +install -m644 -p %{xorg_buildroot}%{_libdir}/tigervnc/dri/swrast_dri.so $RPM_BUILD_ROOT%{_libdir}/tigervnc/dri +for f in `find %{xorg_buildroot}%{_libdir}/tigervnc -name "lib*" -print` ; do +cp -a $f $RPM_BUILD_ROOT%{_libdir}/tigervnc +done mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig @@ -926,6 +975,12 @@ popd %find_lang %{name} %{name}.lang +%if %{_bootstrap} +find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete +find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{xorg_buildroot}%{_libdir}|libdir=/opt/%{name}/%{scl_name}%{_libdir}|" {} \; +find %{xorg_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|prefix=%{xorg_buildroot}%{_prefix}|prefix=/opt/%{name}/%{scl_name}%{_prefix}|" {} \; +%endif + # remove unwanted files rm -rf $RPM_BUILD_ROOT%{_libdir}/tigervnc/pkgconfig rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig @@ -1000,7 +1055,26 @@ fi %defattr(-,root,root,-) %{_datadir}/icons/hicolor/*/apps/* +%if %{_bootstrap} +%files static-devel +%defattr(-,root,root,-) +/opt/%{name}/%{scl_name}%{_sysconfdir}/* +/opt/%{name}/%{scl_name}%{_bindir}/* +/opt/%{name}/%{scl_name}%{_datadir}/* +/opt/%{name}/%{scl_name}%{_includedir}/* +/opt/%{name}/%{scl_name}%{_libdir}/* +%ifarch x86_64 s390x ia64 ppc64 alpha sparc64 +/opt/%{name}/%{scl_name}%{_prefix}/lib/python2.6/* +%endif +%endif + %changelog +* Fri Dec 11 2015 Brian P. Hinz <bphinz@users.sourceforge.net> 1.6.80-3 +- Configure with --host and --build to avoid build host-specific compiler opts + +* Fri Nov 27 2015 Brian P. Hinz <bphinz@users.sourceforge.net> 1.6.80-2 +- Split static pre-reqs into separate package + * Thu Nov 26 2015 Brian P. Hinz <bphinz@users.sourceforge.net> 1.6.80-1 - Version bump for 1.6 release - Update libjpeg-turbo, gnutls, libtasn1, libpng to latest upstream versions. diff --git a/contrib/packages/rpm/el6/SPECS/tigervnc.spec b/contrib/packages/rpm/el6/SPECS/tigervnc.spec index f0e0154a..2c51e957 100644 --- a/contrib/packages/rpm/el6/SPECS/tigervnc.spec +++ b/contrib/packages/rpm/el6/SPECS/tigervnc.spec @@ -1,4 +1,12 @@ %{!?_self_signed: %define _self_signed 1} +%{!?_bootstrap: %define _bootstrap 1} +%define tigervnc_src_dir %{_builddir}/%{name}-%{version}%{?snap:-%{snap}} +%global scl_name %{name}16 +%if %{_bootstrap} +%define static_lib_buildroot %{tigervnc_src_dir}/opt/%{name}/%{scl_name} +%else +%define static_lib_buildroot /opt/%{name}/%{scl_name} +%endif Name: tigervnc Version: @VERSION@ @@ -33,6 +41,9 @@ BuildRequires: freetype-devel, libXdmcp-devel BuildRequires: desktop-file-utils, java-devel, jpackage-utils BuildRequires: libjpeg-turbo-devel, pam-devel BuildRequires: cmake >= 2.8 +%if !%{_bootstrap} +BuildRequires: %{name}-static-devel == %{version} +%endif %ifnarch s390 s390x BuildRequires: xorg-x11-server-devel %endif @@ -137,18 +148,29 @@ BuildArch: noarch %description icons This package contains icons for TigerVNC viewer +%if %{_bootstrap} +%package static-devel +Summary: Static development files necessary to build TigerVNC +Group: Development/Libraries + +%description static-devel +This package contains static development files necessary to build TigerVNC +%endif + %prep +rm -rf $RPM_BUILD_ROOT %setup -q -n %{name}-%{version}%{?snap:-%{snap}} -# sed -i -e 's/80/0/g' CMakeLists.txt %patch4 -p1 -b .cookie +%if %{_bootstrap} tar xzf %SOURCE11 tar xjf %SOURCE13 tar xjf %SOURCE14 tar xzf %SOURCE15 tar xzf %SOURCE16 xzcat %SOURCE17 | tar xf - +%endif cp -r /usr/share/xorg-x11-server-source/* unix/xserver pushd unix/xserver @@ -161,9 +183,9 @@ popd %patch16 -p0 -b .man %build -%define tigervnc_src_dir %{_builddir}/%{name}-%{version}%{?snap:-%{snap}} -%define static_lib_buildroot %{tigervnc_src_dir}/build +%if %{_bootstrap} mkdir -p %{static_lib_buildroot}%{_libdir} +%endif %ifarch sparcv9 sparc64 s390 s390x export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{static_lib_buildroot}%{_includedir}" @@ -174,6 +196,7 @@ export CXXFLAGS=$CFLAGS export CPPFLAGS=$CXXFLAGS export PKG_CONFIG_PATH="%{static_lib_buildroot}%{_libdir}/pkgconfig:%{static_lib_buildroot}%{_datadir}/pkgconfig:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig" +%if %{_bootstrap} echo "*** Building gmp ***" pushd gmp-* ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --enable-cxx --disable-assembly @@ -185,7 +208,7 @@ popd echo "*** Building libtasn1 ***" pushd libtasn1-* -LDFLAGS="-L%{static_lib_buildroot}%{_libdir} $LDFLAGS" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared +LDFLAGS="-L%{static_lib_buildroot}%{_libdir} $LDFLAGS" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --host=%{_host} --build=%{_build} make %{?_smp_mflags} DESTDIR=%{static_lib_buildroot} install find %{static_lib_buildroot}%{_prefix} -type f -name "*.la" -delete find %{static_lib_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{_libdir}|libdir=%{static_lib_buildroot}%{_libdir}|" {} \; @@ -195,7 +218,7 @@ popd echo "*** Building nettle ***" pushd nettle-* autoreconf -fiv -LDFLAGS="-L%{static_lib_buildroot}%{_libdir} -Wl,-Bstatic -ltasn1 -lgmp -Wl,-Bdynamic $LDFLAGS" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --disable-openssl +LDFLAGS="-L%{static_lib_buildroot}%{_libdir} -Wl,-Bstatic -ltasn1 -lgmp -Wl,-Bdynamic $LDFLAGS" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-static --disable-shared --disable-openssl --host=%{_host} --build=%{_build} make %{?_smp_mflags} DESTDIR=%{static_lib_buildroot} install find %{static_lib_buildroot}%{_prefix} -type f -name "*.la" -delete find %{static_lib_buildroot}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{_libdir}|libdir=%{static_lib_buildroot}%{_libdir}|" {} \; @@ -207,6 +230,8 @@ pushd gnutls-* LDFLAGS="-L%{static_lib_buildroot}%{_libdir} -Wl,-Bstatic -lnettle -lhogweed -ltasn1 -lgmp -Wl,-Bdynamic $LDFLAGS" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ + --host=%{_host} \ + --build=%{_build} \ --enable-static \ --disable-shared \ --without-p11-kit \ @@ -230,6 +255,8 @@ pushd libpng-* CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ + --host=%{_host} \ + --build=%{_build} \ --disable-shared \ --enable-static make %{?_smp_mflags} @@ -238,12 +265,16 @@ popd echo "*** Building fltk ***" pushd fltk-* +%endif export CMAKE_PREFIX_PATH="%{static_lib_buildroot}%{_prefix}:%{_prefix}" export CMAKE_EXE_LINKER_FLAGS=$LDFLAGS export PKG_CONFIG="pkg-config --static" +%if %{_bootstrap} CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="-L%{static_lib_buildroot}%{_libdir} -Wl,-Bstatic -lpng -Wl,-Bdynamic $LDFLAGS" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ + --host=%{_host} \ + --build=%{_build} \ --enable-x11 \ --enable-gl \ --disable-shared \ @@ -259,6 +290,7 @@ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="-L%{static_lib_buildroot}%{_l make %{?_smp_mflags} make DESTDIR=%{static_lib_buildroot} install popd +%endif %{cmake} -G"Unix Makefiles" \ -DBUILD_STATIC=off \ @@ -314,7 +346,17 @@ JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" make popd %install -rm -rf $RPM_BUILD_ROOT +%if %{_bootstrap} +for l in gmp libtasn1 nettle gnutls libpng fltk; do +pushd $l-* +make install DESTDIR=$RPM_BUILD_ROOT/opt/%{name}/%{scl_name} +popd +done +find %{buildroot}/opt/%{name}/%{scl_name}%{_prefix} -type f -name "*.la" -delete +find %{buildroot}/opt/%{name}/%{scl_name}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|libdir=%{_libdir}|libdir=/opt/%{name}/%{scl_name}%{_libdir}|" {} \; +find %{buildroot}/opt/%{name}/%{scl_name}%{_prefix} -type f -name "*.pc" -exec sed -i -e "s|prefix=%{_prefix}|prefix=/opt/%{name}/%{scl_name}%{_prefix}|" {} \; +%endif + make install DESTDIR=$RPM_BUILD_ROOT pushd unix/xserver/hw/vnc @@ -422,7 +464,22 @@ fi %defattr(-,root,root,-) %{_datadir}/icons/hicolor/*/apps/* +%if %{_bootstrap} +%files static-devel +%defattr(-,root,root,-) +/opt/%{name}/%{scl_name}%{_bindir}/* +/opt/%{name}/%{scl_name}%{_includedir}/* +/opt/%{name}/%{scl_name}%{_libdir}/* +/opt/%{name}/%{scl_name}%{_datadir}/* +%endif + %changelog +* Fri Dec 11 2015 Brian P. Hinz <bphinz@users.sourceforge.net> 1.6.80-3 +- Configure with --host and --build to avoid build host-specific compiler opts + +* Sun Nov 29 2015 Brian P. Hinz <bphinz@users.sourceforge.net> 1.6.80-2 +- Split static pre-reqs into separate package + * Thu Nov 26 2015 Brian P. Hinz <bphinz@users.sourceforge.net> 1.6.80-1 - Version bump for 1.6 release - Update gnutls, libtasn1, libpng to latest upstream versions. |