packages: prl-tools/prl-tools.spec (NEW)=?UTF-8?Q?=20?=- new; builds with 2.6.27.54-1 kernel
glen
glen at pld-linux.org
Thu Apr 19 18:43:24 CEST 2012
Author: glen Date: Thu Apr 19 16:43:24 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- new; builds with 2.6.27.54-1 kernel
---- Files affected:
packages/prl-tools:
prl-tools.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/prl-tools/prl-tools.spec
diff -u /dev/null packages/prl-tools/prl-tools.spec:1.1
--- /dev/null Thu Apr 19 18:43:24 2012
+++ packages/prl-tools/prl-tools.spec Thu Apr 19 18:43:18 2012
@@ -0,0 +1,143 @@
+# $Revision$, $Date$
+# TODO
+# - https://wiki.archlinux.org/index.php/Parallels
+#
+# Conditional build:
+%bcond_without kernel # without kernel modules
+%bcond_without dist_kernel # without distribution kernel
+%bcond_without userspace # without userspace package
+
+%define rel 0.1
+Summary: Parallels Guest Utilities
+Name: prl-tools
+Version: 6
+Release: %{rel}
+License: GPL
+Group: Applications/System
+# Get this from your Mac having Parallels installed: /Library/Parallels/Tools/
+Source0: %{name}-lin.iso
+# Source0-md5: f3c1e1f57127a06d17bbb3ccb086f657
+URL: http://download.parallels.com/desktop/v6/docs/en/Parallels_Desktop_Users_Guide/22570.htm
+BuildRequires: /usr/bin/isoinfo
+BuildRequires: rpmbuild(macros) >= 1.453
+%if %{with userspace}
+%endif
+%if %{with kernel} && %{with dist_kernel}
+BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.27
+%endif
+ExclusiveArch: %{ix86} %{x8664}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# constify %rel macro, so it wouldn't expand in kernel subpkgs
+%{expand:%%global rel %{release}}
+
+%description
+Parallels Guest Utilities.
+
+%package -n kernel%{_alt_kernel}-misc-prl
+Summary: Parallels Linux kernel modules
+Release: %{rel}@%{_kernel_ver_str}
+Group: Base/Kernel
+Requires(post,postun): /sbin/depmod
+Requires: dev >= 2.9.0-7
+%if %{with dist_kernel}
+%requires_releq_kernel
+Requires(postun): %releq_kernel
+%endif
+
+%description -n kernel%{_alt_kernel}-misc-prl
+Parallels Linux kernel modules.
+
+%prep
+%setup -qcT
+
+# unpack each file from .iso
+image_file=%{SOURCE0}
+for file in $(isoinfo -Rf -i $image_file); do
+ [ $file = /installer ] && continue
+ [ $file = /kmods ] && continue
+ [ $file = /tools ] && continue
+ [ $file = /tools/scripts ] && continue
+ dir=$(dirname .$file)
+ install -d $dir
+
+ isoinfo -R -i $image_file -x $file > .$file
+done
+
+%{__tar} -xzf kmods/prl_mod.tar* -C kmods
+
+cat << 'EOF' > kmods/prl_eth/pvmnet/Makefile
+obj-m := prl_eth.o
+prl_eth-objs := pvmnet.o
+EOF
+
+cat << EOF > kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile
+obj-m += prl_tg.o
+prl_tg-objs := prltg.o
+
+EXTRA_CFLAGS += -I$(pwd)/kmods/prl_tg
+EXTRA_CFLAGS += -DPRL_INTERRUPTIBLE_COMPLETION
+EOF
+
+cat << EOF > kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/Makefile
+obj-m := prl_tg.o
+prl_tg-objs := super.o inode.o file.o interface.o
+
+EXTRA_CFLAGS += -I$(pwd)/kmods/prl_fs
+EXTRA_CFLAGS += -DPRLFS_IGET
+EOF
+
+%build
+%if %{with kernel}
+%build_kernel_modules -C kmods/prl_eth/pvmnet -m prl_eth
+%build_kernel_modules -C kmods/prl_tg/Toolgate/Guest/Linux/prl_tg -m prl_tg
+%build_kernel_modules -C kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs -m prl_tg
+%build_kernel_modules -C kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze -m prl_fs_freeze
+%endif
+
+%if %{with userspace}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with kernel}
+%install_kernel_modules -d misc -m kmods/prl_eth/pvmnet/prl_eth
+%install_kernel_modules -d misc -m kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg
+# same module name, try renaming
+%install_kernel_modules -d misc -m kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_tg -s prl_fs
+%install_kernel_modules -d misc -m kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze
+%endif
+
+%if %{with userspace}
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n kernel%{_alt_kernel}-misc-prl
+%depmod %{_kernel_ver}
+
+%if %{with userspace}
+%files
+%defattr(644,root,root,755)
+%endif
+
+%if %{with kernel}
+%files -n kernel%{_alt_kernel}-misc-prl
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}/misc/prl_eth.ko*
+/lib/modules/%{_kernel_ver}/misc/prl_fs_freeze.ko*
+/lib/modules/%{_kernel_ver}/misc/prl_tg.ko*
+/lib/modules/%{_kernel_ver}/misc/prl_tg-prl_fs.ko*
+%endif
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2012/04/19 16:43:18 glen
+- new; builds with 2.6.27.54-1 kernel
+
================================================================
More information about the pld-cvs-commit
mailing list