Class: Pkgr::Distributions::Fedora
- Defined in:
- lib/pkgr/distributions/fedora.rb
Overview
Contains the various components required to make a packaged app integrate well with a Debian system.
Direct Known Subclasses
Defined Under Namespace
Classes: FedoraFpmCommand
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #fpm_command(build_dir) ⇒ Object
- #installer_dependencies ⇒ Object
- #package_install_command(packages) ⇒ Object
- #package_test_command(package) ⇒ Object
-
#release ⇒ Object
Only keep major digits.
- #runner ⇒ Object
Methods inherited from Base
#build_dependencies, #buildpacks, #check, #crons_dir, #default_buildpack_list, #dependencies, #initialize, #initializers_for, #os, #postinstall_file, #postuninstall_file, #preinstall_file, #preuninstall_file, #slug, #target, #templates, #verify
Constructor Details
This class inherits a constructor from Pkgr::Distributions::Base
Instance Method Details
#fpm_command(build_dir) ⇒ Object
31 32 33 |
# File 'lib/pkgr/distributions/fedora.rb', line 31 def fpm_command(build_dir) FedoraFpmCommand.new(self, build_dir).command end |
#installer_dependencies ⇒ Object
27 28 29 |
# File 'lib/pkgr/distributions/fedora.rb', line 27 def installer_dependencies super.push("which").uniq end |
#package_install_command(packages) ⇒ Object
23 24 25 |
# File 'lib/pkgr/distributions/fedora.rb', line 23 def package_install_command(packages) "sudo yum -q check-update ; sudo yum install -y #{packages.map{|package| "\"#{package}\""}.join(" ")}" end |
#package_test_command(package) ⇒ Object
19 20 21 |
# File 'lib/pkgr/distributions/fedora.rb', line 19 def package_test_command(package) "rpm -qa '#{package}' | grep '#{package}' > /dev/null 2>&1" end |
#release ⇒ Object
Only keep major digits
11 12 13 |
# File 'lib/pkgr/distributions/fedora.rb', line 11 def release @release[/^[0-9]+/] end |
#runner ⇒ Object
15 16 17 |
# File 'lib/pkgr/distributions/fedora.rb', line 15 def runner @runner ||= Runner.new("sysv", "lsb-3.1", "chkconfig") end |