Packaged tarball on server
Sapan Bhatia [Mon, 17 Jan 2011 22:27:25 +0000 (17:27 -0500)]
openvswitch.spec

index e69de29..40469ad 100644 (file)
@@ -0,0 +1,66 @@
+%define url $URL$
+
+%define name openvswitch
+%define version 1.1.0pre2
+%define taglevel 1
+
+%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+
+Vendor: PlanetLab
+Packager: PlanetLab Central <support@planet-lab.org>
+Distribution: PlanetLab %{plrelease}
+URL: %(echo %{url} | cut -d ' ' -f 2)
+
+Summary: pl_openvswitch
+Name: %{name}
+Version: %{version}
+Release: %{release}
+License: GPL
+Group: System Environment/Kernel
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+#Requires: 
+
+Source0: http://openvswitch.org/releases/openvswitch-%{version}.tar.gz
+
+%description
+Openvswitch - virtual switches on PlanetLab
+
+%prep
+%setup
+
+%build
+KVER=`ls -l /usr/src/kernels | awk '{printf $9;}'`
+./configure --with-l26=/usr/src/kernels/$KVER
+make -j17
+
+%install
+KVER=`ls -l /usr/src/kernels | awk '{printf $9;}'`
+mkdir -p $RPM_BUILD_ROOT/bin
+mkdir -p $RPM_BUILD_ROOT/sbin
+mkdir -p $RPM_BUILD_ROOT/share
+mkdir -p $RPM_BUILD_ROOT/var
+mkdir -p $RPM_BUILD_ROOT/lib/modules/$KVER/kernel/drivers/net
+
+make install DESTDIR=$RPM_BUILD_ROOT
+cp -R datapath/linux-2.6/*.ko $RPM_BUILD_ROOT/lib/modules/$KVER/kernel/drivers/net
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+/bin
+/sbin
+/share
+/var
+/lib/modules
+/usr
+
+%post
+# XXX
+
+%postun
+
+%changelog
+* Mon Jan 17 2011 Sapan Bhatia <sapanb@cs.princeton.edu> - openvswitch-1.1.0pre2-1
+- Fixed a build issue.
+