[packages/veewee] install templates and validation dirs
glen
glen at pld-linux.org
Mon May 6 09:51:09 CEST 2013
commit df73fa55f2deb2103c9ebe27120b2941d9c3cab3
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon May 6 10:47:04 2013 +0300
install templates and validation dirs
install-root.patch | 23 +++++++++++++++++++++++
veewee.spec | 10 ++++++++--
2 files changed, 31 insertions(+), 2 deletions(-)
---
diff --git a/veewee.spec b/veewee.spec
index 757b557..578f432 100644
--- a/veewee.spec
+++ b/veewee.spec
@@ -4,11 +4,12 @@
Summary: Build Vagrant base boxes or KVM, VirtualBox and Fusion images
Name: veewee
Version: 0.3.7
-Release: 0.7
+Release: 0.10
License: MIT
Group: Applications/Emulators
Source0: https://github.com/jedi4ever/veewee/archive/v%{version}.tar.gz
# Source0-md5: 2b5a2f293eabe65b9c104258574e5967
+Patch0: install-root.patch
URL: http://github.com/jedi4ever/veewee/
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.656
@@ -32,6 +33,8 @@ Conflicts: ruby-fog >= 2
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _appdir %{_datadir}/%{name}
+
%description
Vagrant is a great tool to test new things or changes in a virtual
machine (Virtualbox) using either Chef or Puppet.
@@ -48,13 +51,15 @@ Besides building Vagrant boxes, veewee can also be used for:
%prep
%setup -q
+%patch0 -p1
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir},%{_appdir}}
cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
+cp -a templates validation $RPM_BUILD_ROOT%{_appdir}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -65,6 +70,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/veewee
%{ruby_vendorlibdir}/%{name}.rb
%{ruby_vendorlibdir}/%{name}
+%{_appdir}
%{ruby_vendorlibdir}/fission.rb
%dir %{ruby_vendorlibdir}/fission
diff --git a/install-root.patch b/install-root.patch
new file mode 100644
index 0000000..baa9461
--- /dev/null
+++ b/install-root.patch
@@ -0,0 +1,23 @@
+--- veewee-0.3.7/lib/veewee/environment.rb 2013-01-10 12:02:14.000000000 +0200
++++ veewee-0.3.7/lib/veewee/environment.rb 2013-05-06 10:44:52.445210226 +0300
+@@ -52,7 +52,7 @@
+ attr_reader :ostypes
+
+ def initialize(options = {})
+-
++ install_dir = ENV['VEEWEE_INSTALL_DIR'] || '/usr/share/veewee'
+ cwd = ENV['VEEWEE_DIR'] || Dir.pwd
+ # If a cwd was provided as option it overrules the default
+ cwd = options[:cwd] if options.has_key?(:cwd)
+@@ -62,9 +62,9 @@
+ :veewee_filename => "Veeweefile",
+ :loglevel => :info,
+ :definition_dir => File.join(cwd, "definitions"),
+- :template_path => [File.expand_path(File.join(File.dirname(__FILE__), "..", "..", 'templates')), "templates"],
++ :template_path => [File.join(install_dir, 'templates'), "templates"],
+ :iso_dir => File.join(cwd, "iso"),
+- :validation_dir => File.join(File.expand_path(File.join(File.dirname(__FILE__), "..", "..")), "validation"),
++ :validation_dir => File.join(install_dir, "validation"),
+ :tmp_dir => File.join(cwd, "tmp")
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/veewee.git/commitdiff/9b84d4d74827dcee08cb8a9b3c04b14f14010099
More information about the pld-cvs-commit
mailing list