aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/nethack.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2009-09-30 09:47:18 -0700
committerMax Howell2009-10-01 15:17:29 +0100
commit30b0ee4f217de58aba964d4e2de37f0a1830a6bc (patch)
treee92c44e94f7897856c0fc9477cbb002377d49c80 /Library/Formula/nethack.rb
parentff414bbf6f2301ca0f3c2f16343fb0107f439e9c (diff)
downloadhomebrew-30b0ee4f217de58aba964d4e2de37f0a1830a6bc.tar.bz2
Update usage of libexec for roguelikes.
Since "libexec" folders under the Cellar are already private per formula, there's no reason to create an additional folder underneath for namespacing. Removed the extra folder level from these formulas.
Diffstat (limited to 'Library/Formula/nethack.rb')
-rw-r--r--Library/Formula/nethack.rb24
1 files changed, 7 insertions, 17 deletions
diff --git a/Library/Formula/nethack.rb b/Library/Formula/nethack.rb
index 3aa05f136..811f37100 100644
--- a/Library/Formula/nethack.rb
+++ b/Library/Formula/nethack.rb
@@ -17,14 +17,11 @@ class Nethack <Formula
@md5='21479c95990eefe7650df582426457f9'
def patches
- {
- :p1 =>
-["http://github.com/adamv/nethack-osx/raw/82992eb6e4d8c76b05037579126293d644ef971d/patches/nethack-osx-343.patch"]
- }
+ "http://github.com/adamv/nethack-osx/raw/82992eb6e4d8c76b05037579126293d644ef971d/patches/nethack-osx-343.patch"
end
def skip_clean? path
- path == libexec + "nethack/save"
+ path == libexec + "save"
end
def install
@@ -34,29 +31,22 @@ class Nethack <Formula
# Symlink makefiles
system 'sh sys/unix/setup.sh'
- ## We are not using the default installer
- # Install to a sane location, geez.
- nethackdir = "#{prefix}/libexec/nethack"
- system "mkdir -p #{nethackdir}"
-
inreplace "include/config.h",
'# define HACKDIR "/usr/games/lib/nethackdir"',
- "#define HACKDIR \"#{nethackdir}\""
+ "#define HACKDIR \"#{libexec}\""
# Make the data first, before we munge the CFLAGS
system "cd dat;make"
Dir.chdir 'dat' do
- nethack_libexec = (libexec+'nethack')
-
%w(perm logfile).each do |f|
system "touch #{f}"
- nethack_libexec.install f
+ libexec.install f
end
# Stage the data
- nethack_libexec.install %w(help hh cmdhelp history opthelp wizhelp dungeon license data oracles options rumors quest.dat)
- nethack_libexec.install Dir['*.lev']
+ libexec.install %w(help hh cmdhelp history opthelp wizhelp dungeon license data oracles options rumors quest.dat)
+ libexec.install Dir['*.lev']
end
# Make the game
@@ -64,6 +54,6 @@ class Nethack <Formula
system 'cd src;make'
bin.install 'src/nethack'
- system "mkdir #{prefix}/libexec/nethack/save"
+ FileUtils.mkdir libexec+'save'
end
end