Permalink
Browse files

started ArchLinux support

  • Loading branch information...
1 parent 785d8d6 commit 305b0b68bf01214d043d73f13408e58efa02ffec @caolan caolan committed Apr 10, 2012
Showing with 19 additions and 0 deletions.
  1. +10 −0 tasks/all.rake
  2. +4 −0 tasks/lib/distros.rb
  3. +5 −0 tasks/lib/package_dep.rb
View
@@ -66,6 +66,16 @@ namespace :build do
end
end
+ task :arch_dependencies => :known_distro do
+ if DISTRO[0] == :arch
+ # For building OTP
+ install_packages %w[ flex lksctp-tools zlib zip ]
+
+ # All Arch gets these.
+ install_packages %w[ libxslt automake make ruby libtool gcc libcap m4 openssl ]
+ end
+ end
+
task :mac_dependencies => :known_distro do
%w[ gcc make ].each do |dep|
raise 'Please install Xcode from Apple' if DISTRO[0] == :osx and system("#{dep} --version > /dev/null 2> /dev/null") == false
@@ -12,6 +12,10 @@ def detect_distro
return [:solaris, `uname -r`.chomp]
end
+ if `uname -r`.chomp[-4..-1] == "ARCH"
+ return [:arch, `uname -r`.chomp]
+ end
+
# Ubuntu
if File.exist? '/etc/lsb-release'
info = Hash[ *File.new('/etc/lsb-release').lines.map{ |x| x.split('=').map { |y| y.chomp } }.flatten ]
@@ -41,6 +41,11 @@ def package_dep opts
if !installed.member?(package)
sh "sudo pkg-get install #{package}"
end
+ when :arch
+ installed = `pacman -Q`.split("\n")
+ if !installed.member?(package)
+ sh "sudo pacman -S #{package}"
+ end
when :osx
installed = `brew list`.split("\n")
if !installed.member?(package)

0 comments on commit 305b0b6

Please sign in to comment.