Browse files

use emacs 24 release tgz instead of git

  • Loading branch information...
1 parent f79d320 commit 520625f4038e26a2526f67b4a4f45f01636eac43 @dougm committed Dec 13, 2012
Showing with 16 additions and 10 deletions.
  1. +16 −10 site-cookbooks/emacs/recipes/source24.rb
View
26 site-cookbooks/emacs/recipes/source24.rb
@@ -17,33 +17,39 @@
#
if platform?("ubuntu","debian","linuxmint")
+ version = "24.2"
root_dir = "/usr/local/src"
- srcdir = "#{root_dir}/emacs"
+ srcdir = "#{root_dir}/emacs-#{version}"
- %w{ git-core build-essential texinfo autoconf libncurses-dev }.each {|prereq| package prereq}
+ %w{ build-essential texinfo autoconf libncurses-dev }.each {|prereq| package prereq}
directory srcdir do
recursive true
end
- git "#{srcdir}" do
- repository "git://git.savannah.gnu.org/emacs.git"
- depth 1
- action :checkout
+ tgz = "emacs-#{version}.tar.gz"
+ dst = "#{root_dir}/#{tgz}"
+
+ remote_file dst do
+ source "http://ftp.gnu.org/pub/gnu/emacs/#{tgz}"
+ not_if { ::File.exists?(dst) }
+ end
+
+ execute "tar -zxf #{dst}" do
+ cwd root_dir
+ not_if { ::File.exists?("emacs-#{version}/src/emacs.c") }
end
- bash "build emacs24" do
+ bash "build emacs #{version}" do
cwd srcdir
creates "#{srcdir}/src/emacs"
code <<-EOH
- ./autogen.sh && \
./configure --without-x && \
- make bootstrap && \
make 2>&1 >| make-#{node.name}-#{node['ohai_time']}
EOH
end
- execute "install emacs24" do
+ execute "install emacs #{version}" do
cwd srcdir
command "make install 2>&1 >| make-#{node.name}-#{node['ohai_time']}"
creates "/usr/local/bin/emacs"

0 comments on commit 520625f

Please sign in to comment.