Commit 8d93253b authored by lyxell's avatar lyxell Committed by GitHub

Merge pull request #1110 from jam7/crew-postinstall

Modify crew to add postinstall function
parents ccc3ec18 d5252be8
......@@ -424,6 +424,13 @@ def build_and_preconfigure (target_dir)
end
end
def post_install (target_dir)
Dir.chdir target_dir do
puts "Performing post-install..."
@pkg.postinstall
end
end
def compress_doc (dir)
# check whether crew should compress
return if CREW_NOT_COMPRESS || !File.exist?("#{CREW_PREFIX}/bin/compressdoc")
......@@ -610,6 +617,9 @@ def install
install_package dest_dir
end
# perform post-install process
post_install target_dir
#add to installed packages
@device[:installed_packages].push(name: @pkg.name, version: @pkg.version)
File.open(CREW_CONFIG_PATH + 'device.json', 'w') do |file|
......
......@@ -69,10 +69,23 @@ class Package
@is_fake
end
# Function to perform build from source.
def self.build
end
# Function to perform install from source build.
def self.install
end
# Function to perform post-install for all even if it is a fake package.
def self.postinstall
end
# Function to perform check from source build.
# This is execute if and only if `crew build`.
def self.check
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment