File xenstore_uvp.spec of Package xenstore-uvp
Name: xenstore_uvp
Version: 3.0.0
Release: 1
License: GPL-2.0
URL: http://bits.xensource.com/oss-xen/release/4.1.6.1/xen-4.1.6.1.tar.gz
Source0: xen-4.1.6.1.tar.gz
Source1: xenstore-Makefile
Source2: arm32.mk
Source3: arm64.mk
Patch0: xs_weak_write.patch
Patch1: xenstore-Makefile.diff
Patch2: xenstore-devpath.diff
BuildRequires: python
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
Summary: UVP xenstore tools with XS_WEAK_WRITE support
Group: System Environment/Base
# sysctl
%description
The UVP hypervisor has some features on top of standard Xen, one of which is a weak write operation.
These utils take advantage of a patched version of libxenstore to support this.
%package -n libxenstore_uvp3_0
Summary: UVP libxenstore with XS_WEAK_WRITE support
Group: System Environment/Libraries
%description -n libxenstore_uvp3_0
The UVP hypervisor has some features on top of standard Xen, one of which is a weak write operation.
This patched version of libxenstore (libxenstore_uvp) contains the userspace support for this.
%package devel
Requires: libxenstore_uvp3_0 = %{version}
Summary: Header and devel files for libxenstore_uvp
Group: Development/Libraries
%description devel
This package contains the header files and the .so library to link
against for apps that want to use libxenstore_uvp.
%prep
%setup -q -n xen-4.1.6.1
%patch0 -p1
%patch1 -p1
%patch2 -p1
cp -p %SOURCE2 config/armv7l.mk
cp -p %SOURCE3 config/aarch64.mk
#autoreconf -fi
%build
cd tools/xenstore
ln -s ../../xen/include/public xen
export RPM_OPT_FLAGS
make xenstore xenstore-control
%install
#export RPM_OPT_FLAGS
#BUILD=$RPM_BUILD_ROOT/build DESTDIR=$RPM_BUILD_ROOT/usr make install LIB=%{_lib} VERBOSE=1
install -d $RPM_BUILD_ROOT/%{_libdir}
install -m 0755 tools/xenstore/libxenstore_uvp.so.3.0.0 $RPM_BUILD_ROOT/%{_libdir}/
ln -s libxenstore_uvp.so.3.0.0 $RPM_BUILD_ROOT/%{_libdir}/libxenstore_uvp.so.3.0
ln -s libxenstore_uvp.so.3.0 $RPM_BUILD_ROOT/%{_libdir}/libxenstore_uvp.so
install -d $RPM_BUILD_ROOT/bin
install -m 0755 tools/xenstore/xenstore $RPM_BUILD_ROOT/bin/xenstore_uvp
install -m 0755 tools/xenstore/xenstore-control $RPM_BUILD_ROOT/bin/xenstore-control_uvp
install -d $RPM_BUILD_ROOT/usr/include/xen
install -m 0644 tools/xenstore/xs*.h $RPM_BUILD_ROOT/usr/include/
install -m 0644 xen/include/public/*.h $RPM_BUILD_ROOT/usr/include/xen/
for name in xen/include/public/*; do if test -d $name; then install -d $RPM_BUILD_ROOT/usr/include/xen/${name##*/}; install -m 0644 $name/*.h $RPM_BUILD_ROOT/usr/include/xen/${name##*/}/; fi; done
rm -rf $RPM_BUILD_ROOT/build
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libxenstore_uvp3_0 -p /sbin/ldconfig
%postun -n libxenstore_uvp3_0 -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
/bin/xenstore*uvp
%files -n libxenstore_uvp3_0
%defattr(-,root,root,-)
%{_libdir}/libxenstore_uvp.so.3.0*
%files devel
%defattr(-,root,root,-)
/usr/include/xs*
%dir /usr/include/xen
/usr/include/xen/*
%{_libdir}/libxenstore_uvp.so
%changelog