Added -plugin sub RPM, disabled by default, except for autobuild

This commit is contained in:
Daniel P. Berrange 2008-03-09 16:36:17 -04:00
parent a0890ddbef
commit 0de0e908fd
3 changed files with 61 additions and 5 deletions

View File

@ -3,11 +3,16 @@
set -e
set -v
# Make things clean.
test -f Makefile && make -k distclean || :
rm -rf build
mkdir build
cd build
../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT --enable-compile-warnings=error --enable-plugin
../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT \
--enable-compile-warnings=error \
--enable-plugin
make
make install
@ -22,5 +27,8 @@ if [ -f /usr/bin/rpmbuild ]; then
NOW=`date +"%s"`
EXTRA_RELEASE=".$USER$NOW"
fi
rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean *.tar.gz
rpmbuild --nodeps \
--define "extra_release $EXTRA_RELEASE" \
--define "with_plugin 1" \
-ta --clean *.tar.gz
fi

View File

@ -1,5 +1,5 @@
AC_INIT(virt-viewer, 0.0.2)
AC_INIT(virt-viewer, 0.0.3)
AC_CONFIG_SRCDIR(src/main.c)
AM_CONFIG_HEADER(config.h)
dnl Make automake keep quiet about wildcards & other GNUmake-isms
@ -22,6 +22,7 @@ PKG_CHECK_MODULES(GTKVNC, gtk-vnc-1.0 >= 0.0.1)
dnl --enable-plugin to enable the browser plugin.
NSPR_REQUIRED=4.0.0
FIREFOX_PLUGIN_REQUIRED=1.5.0
MOZILLA_PLUGIN_REQUIRED=1.8
AC_ARG_ENABLE(plugin,
[ --enable-plugin=[no/yes] enable browser plugin [default=no]],,
enable_plugin=no)
@ -30,7 +31,12 @@ if test "x$enable_plugin" = "xyes"; then
PKG_CHECK_MODULES(NSPR, nspr >= $NSPR_REQUIRED)
dnl Check for Firefox plugin package (also includes NSPR cflags/libs).
PKG_CHECK_MODULES(FIREFOX_PLUGIN,
firefox-plugin >= $FIREFOX_PLUGIN_REQUIRED)
firefox-plugin >= $FIREFOX_PLUGIN_REQUIRED, ,[
PKG_CHECK_MODULES(MOZILLA_PLUGIN,
mozilla-plugin >= $MOZILLA_PLUGIN_REQUIRED)
FIREFOX_PLUGIN_CFLAGS="$MOZILLA_PLUGIN_CFLAGS"
FIREFOX_PLUGIN_LIBS="$MOZILLA_PLUGIN_LIBS"
])
AC_SUBST(FIREFOX_PLUGIN_CFLAGS)
AC_SUBST(FIREFOX_PLUGIN_LIBS)
fi

View File

@ -1,10 +1,13 @@
# -*- rpm-spec -*-
# Plugin isn't ready for real world use yet - it needs
# a security audit at very least
%define _with_plugin %{?with_plugin:1}%{!?with_plugin:0}
Name: @PACKAGE@
Version: @VERSION@
Release: 1%{?dist}%{?extra_release}
Summary: Virtual Machine Viewer
Group: Applications/System
License: GPLv2+
URL: http://virt-manager.org/
@ -17,23 +20,53 @@ BuildRequires: libvirt-devel
BuildRequires: libxml2-devel
BuildRequires: gtk-vnc-devel >= 0.3.4
BuildRequires: /usr/bin/pod2man
%if %{_with_plugin}
%if "%{fedora}" > "8"
BuildRequires: xulrunner-devel
%else
BuildRequires: firefox-devel
%endif
%endif
%description
Virtual Machine Viewer provides a graphical console client for connecting
to virtual machines. It uses the GTK-VNC widget to provide the display,
and libvirt for looking up VNC server details.
%if %{_with_plugin}
%package plugin
Summary: Mozilla plugin for the gtk-vnc library
Group: Development/Libraries
Requires: %{name} = %{version}
%description plugin
gtk-vnc is a VNC viewer widget for GTK. It is built using coroutines
allowing it to be completely asynchronous while remaining single threaded.
This package provides a web browser plugin for Mozilla compatible
browsers.
%endif
%prep
%setup -q
%build
%if %{_with_plugin}
%configure --enable-plugin=yes
%else
%configure
%endif
%__make %{?_smp_mflags}
%__make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%__make install DESTDIR=$RPM_BUILD_ROOT
%if %{_with_plugin}
rm -f %{buildroot}%{_libdir}/mozilla/plugins/%{name}-plugin.a
rm -f %{buildroot}%{_libdir}/mozilla/plugins/%{name}-plugin.la
%endif
%clean
rm -rf $RPM_BUILD_ROOT
@ -44,7 +77,16 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%if %{_with_plugin}
%files plugin
%defattr(-, root, root)
%{_libdir}/mozilla/plugins/%{name}-plugin.so
%endif
%changelog
* Sun Mar 9 2008 Daniel P. Berrange <berrange@redhat.com> - 0.0.3-1
- Added optional plugin subRPM
* Tue Aug 28 2007 Daniel P. Berrange <berrange@redhat.com> - 0.0.2-1
- Added support for remote console access