Check-in [ea982c537e]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | - Move files |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
ea982c537e21554274766700f215bfa1 |
User & Date: | jls@semicomplete.com 2011-01-06 06:31:16 |
Context
2011-01-06
| ||
06:31 | - add ../lib to RUBYLIB for local testing check-in: 4fc2dc9418 user: jls@semicomplete.com tags: trunk | |
06:31 | - Move files check-in: ea982c537e user: jls@semicomplete.com tags: trunk | |
04:26 | render templates in the context of the package, not the source This allows things like debs referring to x86_64 as amd64 to be in the Deb class. check-in: ff57d0a973 user: jjmadkisson@gmail.com tags: trunk | |
Changes
Deleted lib/fpm/deb.rb.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/fpm/dir.rb.
|
| < < < < < < < < < < < < |
Deleted lib/fpm/gem.rb.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added lib/fpm/source/dir.rb.
> > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | class FPM::Dir < FPM::Source def get_metadata self[:name] = File.basename(File.expand_path(root)) end def make_tarball!(tar_path) tar(tar_path, paths) # TODO(sissel): Make a helper method. system(*["gzip", "-f", tar_path]) end end |
Added lib/fpm/source/gem.rb.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | require 'fpm/namespace' require 'rubygems/package' class FPM::Gem < FPM::Source def get_metadata File.open(@path, 'r') do |f| ::Gem::Package.open(f, 'r') do |gem| spec = gem.metadata %w( description license summary version ).each do |field| self[field] = spec.send(field) end self[:name] = "rubygem-#{spec.name}" self[:maintainer] = spec.author self[:url] = spec.homepage # TODO [Jay]: this will be different for different # package managers. Need to decide how to handle this. self[:category] = 'Languages/Development/Ruby' self[:dependencies] = spec.runtime_dependencies.map do |dep| reqs = dep.requirements.gsub(/,/, '') "rubygem-#{dep.name} #{reqs}" end end end end end |
Added lib/fpm/target/deb.rb.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/usr/bin/env ruby # require "erb" require "fpm/namespace" require "fpm/package" class FPM::Deb < FPM::Package # Debian calls x86_64 "amd64" def architecture if @architecture == "x86_64" "amd64" else @architecture end end def specfile(builddir) "#{builddir}/control" end def build!(params) # Make the control system("tar -zcf control.tar.gz control md5sums") # create debian-binary File.open("debian-binary", "w") { |f| f.puts "2.0" } # pack up the .deb system("ar -qc #{params[:output]} debian-binary control.tar.gz data.tar.gz") end # def build end # class FPM::Deb |