Skip to content

Commit

Permalink
- use DEBEMAIL and DEBFULLNAME from environment as the default
Browse files Browse the repository at this point in the history
  maintainer. #37
- remove some print statements that we don't need
  • Loading branch information
jordansissel committed May 18, 2011
1 parent 317c69f commit c5d218f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
21 changes: 20 additions & 1 deletion lib/fpm/package.rb
Expand Up @@ -75,7 +75,26 @@ def initialize(source)
@url = source[:url] || "http://nourlgiven.example.com/no/url/given"
@category = source[:category] || "default"
@license = source[:license] || "unknown"
@maintainer = source[:maintainer] || "<#{ENV["USER"]}@#{Socket.gethostname}>"
#@maintainer = source[:maintainer] || "<#{ENV["USER"]}@#{Socket.gethostname}>"
@maintainer = source[:maintainer]

# Default maintainer if none given.
if @maintainer.nil? or @maintainer.empty?
# Reference
# http://www.debian.org/doc/manuals/maint-guide/first.en.html
# http://wiki.debian.org/DeveloperConfiguration
# https://github.com/jordansissel/fpm/issues/37
if ENV.include?("DEBEMAIL") and ENV.include?("DEBFULLNAME")
# Use DEBEMAIL and DEBFULLNAME as the default maintainer if available.
@maintainer = "#{ENV["DEBFULLNAME"]} <#{ENV["DEBEMAIL"]}>"
else
# TODO(sissel): Maybe support using 'git config' for a default as well?
# git config --get user.name, etc can be useful.
#
# Otherwise default to user@currenthost
@maintainer = "<#{ENV["USER"]}@#{Socket.gethostname}>"
end
end

# If @architecture is nil, the target package should provide a default.
# Special 'architecture' values include "all" (aka rpm's noarch, debian's all)
Expand Down
1 change: 0 additions & 1 deletion lib/fpm/source/gem.rb
Expand Up @@ -119,7 +119,6 @@ def make_tarball!(tar_path, builddir)
::FileUtils.mkdir_p(installdir)
args = ["gem", "install", "--quiet", "--no-ri", "--no-rdoc",
"--install-dir", installdir, "--ignore-dependencies"]
p :make_tarball => metadata
if self[:settings][:bin_path]
args += ["--bindir", File.join(tmpdir, self[:settings][:bin_path])]
@paths << self[:settings][:bin_path]
Expand Down
1 change: 0 additions & 1 deletion lib/fpm/source/python.rb
Expand Up @@ -38,7 +38,6 @@ def get_source(params)
end # def get_source

def download(package, version=nil)
p metadata
puts "Trying to download #{package} (using: #{self[:settings][:easy_install]})"
@tmpdir = ::Dir.mktmpdir("python-build", ::Dir.pwd)

Expand Down

0 comments on commit c5d218f

Please sign in to comment.