Class: Debian::Build::ModulePackage

Inherits:
AbstractPackage show all
Defined in:
lib/debian/build/module_package.rb

Instance Attribute Summary

Attributes inherited from AbstractPackage

#exclude_from_build, #name, #package

Instance Method Summary collapse

Methods inherited from AbstractPackage

#default_platforms, #init, #initialize, #to_s

Methods included from BuildDirectoryMethods

#build_directory, #build_directory=

Methods included from HelperMethods

#get, #sudo, #uncompress

Constructor Details

This class inherits a constructor from Debian::Build::AbstractPackage

Instance Method Details

#defineObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/debian/build/module_package.rb', line 12

def define
  namespace @name do
    namespace :pbuild do
      Platform.each do |platform|
        desc "Pbuild #{platform} binary package for #{package}"
        task platform.task_name do |t, args|
          cp "execute-module-assistant", "#{AbstractPackage.build_directory}/tmp"

          pbuilder_options = {
            :logfile => "#{platform.build_result_directory}/pbuilder-#{package}.log"
          }

          platform.pbuilder(pbuilder_options).exec :execute, "-- #{AbstractPackage.build_directory}/tmp/execute-module-assistant #{module_name} #{platform.architecture} #{platform.build_result_directory}"
        end
      end

      desc "Pbuild binary package for #{package} (on #{default_platforms.join(', ')})"
      task :all => default_platforms.collect { |platform| platform.task_name }

    end

    desc "Upload packages for #{package}"
    task "upload" do
      Platform.each do |platform|
        Uploader.default.rsync platform.distribution, Dir["#{platform.build_result_directory}/#{package}-*.deb"]
      end
    end

    task "lintian" do
      # TODO : implement lintian on ModulePackage
    end

    # TODO : remove this mock
    namespace :source do 
      task :all 
    end

  end
end

#module_nameObject



4
5
6
# File 'lib/debian/build/module_package.rb', line 4

def module_name
  package.gsub(/-module$/,'')
end

#requires_sources?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/debian/build/module_package.rb', line 8

def requires_sources?
  false
end