Permalink
Browse files

adding extconf stuff

  • Loading branch information...
0 parents commit 743a0941194fb307bf24636520bcd5051042dd91 @tenderlove committed Aug 11, 2009
Showing with 167 additions and 0 deletions.
  1. +23 −0 .autotest
  2. +6 −0 CHANGELOG.rdoc
  3. +7 −0 Manifest.txt
  4. +48 −0 README.rdoc
  5. +13 −0 Rakefile
  6. +3 −0 bin/never_say_die
  7. +56 −0 ext/neversaydie/extconf.rb
  8. +3 −0 lib/never_say_die.rb
  9. +8 −0 test/test_never_say_die.rb
@@ -0,0 +1,23 @@
+# -*- ruby -*-
+
+require 'autotest/restart'
+
+# Autotest.add_hook :initialize do |at|
+# at.extra_files << "../some/external/dependency.rb"
+#
+# at.libs << ":../some/external"
+#
+# at.add_exception 'vendor'
+#
+# at.add_mapping(/dependency.rb/) do |f, _|
+# at.files_matching(/test_.*rb$/)
+# end
+#
+# %w(TestA TestB).each do |klass|
+# at.extra_class_map[klass] = "test/test_misc.rb"
+# end
+# end
+
+# Autotest.add_hook :run_command do |at|
+# system "rake build"
+# end
@@ -0,0 +1,6 @@
+=== 1.0.0 / 2009-08-10
+
+* 1 major enhancement
+
+ * Birthday!
+
@@ -0,0 +1,7 @@
+History.txt
+Manifest.txt
+README.txt
+Rakefile
+bin/never_say_die
+lib/never_say_die.rb
+test/test_never_say_die.rb
@@ -0,0 +1,48 @@
+= never_say_die
+
+* FIX (url)
+
+== DESCRIPTION:
+
+FIX (describe your package)
+
+== FEATURES/PROBLEMS:
+
+* FIX (list of features or problems)
+
+== SYNOPSIS:
+
+ FIX (code sample of usage)
+
+== REQUIREMENTS:
+
+* FIX (list of requirements)
+
+== INSTALL:
+
+* FIX (sudo gem install, anything else)
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2009 FIX
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,13 @@
+# -*- ruby -*-
+
+require 'rubygems'
+require 'hoe'
+
+Hoe.spec 'neversaydie' do
+ developer('Aaron Patterson', 'aaronp@rubyforge.org')
+ self.readme_file = 'README.rdoc'
+ self.history_file = 'CHANGELOG.rdoc'
+ self.extra_rdoc_files = FileList['*.rdoc']
+end
+
+# vim: syntax=ruby
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+
+abort "you need to write me"
@@ -0,0 +1,56 @@
+ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /darwin/
+
+# :stopdoc:
+
+require 'mkmf'
+
+LIBDIR = Config::CONFIG['libdir']
+INCLUDEDIR = Config::CONFIG['includedir']
+
+$CFLAGS << " -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline"
+
+HEADER_DIRS = [
+ # First search /opt/local for macports
+ '/opt/local/include',
+
+ # Then search /usr/local for people that installed from source
+ '/usr/local/include',
+
+ # Check the ruby install locations
+ INCLUDEDIR,
+
+ # Finally fall back to /usr
+ '/usr/include',
+]
+
+LIB_DIRS = [
+ # First search /opt/local for macports
+ '/opt/local/lib',
+
+ # Then search /usr/local for people that installed from source
+ '/usr/local/lib',
+
+ # Check the ruby install locations
+ LIBDIR,
+
+ # Finally fall back to /usr
+ '/usr/lib',
+]
+
+sig_dirs = dir_config('sigsegv', '/opt/local/include', '/opt/local/lib')
+unless ["", ""] == sig_dirs
+ HEADER_DIRS.unshift sig_dirs.first
+ LIB_DIRS.unshift sig_dirs[1]
+end
+
+unless find_header('sigsegv.h', *HEADER_DIRS)
+ abort "sigsegv is missing. please install it."
+end
+
+unless find_library('sigsegv', 'sigsegv_install_handler', *LIB_DIRS)
+ abort "sigsegv is missing. please install it."
+end
+
+create_makefile('sigsegv/sigsegv')
+
+# :startdoc:
@@ -0,0 +1,3 @@
+class NeverSayDie
+ VERSION = '1.0.0'
+end
@@ -0,0 +1,8 @@
+require "test/unit"
+require "never_say_die"
+
+class TestNeverSayDie < Test::Unit::TestCase
+ def test_sanity
+ flunk "write tests or I will kneecap you"
+ end
+end

0 comments on commit 743a094

Please sign in to comment.