yast-rake 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/tasks/install.rake +75 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d47f7edd1820352b42b40bd48f1406dc0f33dc9b
|
4
|
+
data.tar.gz: 9663071cc242042625c5a6e26cde477733062051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edb90727c64b0f0ef41719cf58469cabe17c7e66f26a88f55fe1440838300756ce4ae7fcfb7d0c29d03b3d1d416f5119cc7054e0267546abec1763c2c965e95f
|
7
|
+
data.tar.gz: 872da08dfdb3663943c223f6e1bf76c4dcc1115b153839183dc776ad4bad68b9195f595a3bb2571c8c3bf43498cab61854b2a5f4d9d669528f51e38359c43684
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
@@ -0,0 +1,75 @@
|
|
1
|
+
#--
|
2
|
+
# Yast rake
|
3
|
+
#
|
4
|
+
# Copyright (C) 2014 Novell, Inc.
|
5
|
+
# This library is free software; you can redistribute it and/or modify
|
6
|
+
# it only under the terms of version 2.1 of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This library is distributed in the hope that it will be useful, but WITHOUT
|
10
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
11
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
12
|
+
# details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Lesser General Public
|
15
|
+
# License along with this library; if not, write to the Free Software
|
16
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
17
|
+
#++
|
18
|
+
|
19
|
+
require "packaging/configuration"
|
20
|
+
|
21
|
+
module Packaging
|
22
|
+
# extend configuration with install locations
|
23
|
+
class Configuration
|
24
|
+
attr_writer :install_locations
|
25
|
+
|
26
|
+
DESTDIR = ENV['DESTDIR'] || '/'
|
27
|
+
YAST_DIR = DESTDIR + '/usr/share/YaST2/'
|
28
|
+
YAST_LIB_DIR = DESTDIR + '/usr/lib/YaST2/'
|
29
|
+
YAST_DESKTOP_DIR = DESTDIR + '/usr/share/applications/YaST2/'
|
30
|
+
AUTOYAST_RNC_DIR = YAST_DIR + 'schema/autoyast/rnc/'
|
31
|
+
FILLUP_DIR = DESTDIR + '/var/adm/fillup-templates/'
|
32
|
+
|
33
|
+
|
34
|
+
#specific directory that contain dynamic part of package name
|
35
|
+
def install_doc_dir
|
36
|
+
DESTDIR + "/usr/share/doc/packages/#{package_name}/"
|
37
|
+
end
|
38
|
+
|
39
|
+
# Gets installation locations. Hash contain glob as keys and target
|
40
|
+
# directory as values. Each found file/directory from glob is passed
|
41
|
+
# to FileUtils.cp_r as source and value as destination
|
42
|
+
def install_locations
|
43
|
+
@install_locations ||= {
|
44
|
+
"**/src/clients" => YAST_DIR,
|
45
|
+
"**/src/modules" => YAST_DIR,
|
46
|
+
"**/src/include" => YAST_DIR,
|
47
|
+
"**/src/lib" => YAST_DIR,
|
48
|
+
"**/src/scrconf" => YAST_DIR,
|
49
|
+
"**/src/servers_non_y2" => YAST_LIB_DIR,
|
50
|
+
"**/src/bin" => YAST_LIB_DIR,
|
51
|
+
"**/src/autoyast_rnc/*" => AUTOYAST_RNC_DIR,
|
52
|
+
"**/src/fillup/*" => FILLUP_DIR,
|
53
|
+
"**/src/desktop/*.desktop" => YAST_DESKTOP_DIR,
|
54
|
+
"{README*,COPYING,CONTRIBUTING.md}" => install_doc_dir,
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
desc "Install to system"
|
61
|
+
task :install do
|
62
|
+
config = ::Packaging::Configuration.instance
|
63
|
+
config.install_locations.each_pair do |glob, install_to|
|
64
|
+
FileUtils.mkdir_p(install_to, :verbose => true) unless File.directory?(install_to)
|
65
|
+
Dir[glob].each do |source|
|
66
|
+
begin
|
67
|
+
# do not use FileUtils.cp_r as it have different behavior if target
|
68
|
+
# exists and we copy a symlink
|
69
|
+
sh "cp -r '#{source}' '#{install_to}'"
|
70
|
+
rescue => e
|
71
|
+
raise "Cannot instal file #{source} to #{install_to}: #{e.message}"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yast-rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josef Reidinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -48,6 +48,7 @@ extensions: []
|
|
48
48
|
extra_rdoc_files: []
|
49
49
|
files:
|
50
50
|
- lib/yast/rake.rb
|
51
|
+
- lib/tasks/install.rake
|
51
52
|
- lib/tasks/test_unit.rake
|
52
53
|
- lib/tasks/version.rake
|
53
54
|
- lib/tasks/run.rake
|