[packages/coffee-script] - up to 1.6.3
arekm
arekm at pld-linux.org
Fri Sep 27 11:18:45 CEST 2013
commit a58228a22c8b6fcf9600a16c069513c4bcb94e98
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Sep 27 11:18:43 2013 +0200
- up to 1.6.3
coffee-script-Cakefile.patch | 35 +++++
coffee-script-fix-importing-test.patch | 264 +++++++++++++++++++++++++++++++++
coffee-script.spec | 24 ++-
3 files changed, 316 insertions(+), 7 deletions(-)
---
diff --git a/coffee-script.spec b/coffee-script.spec
index dacb917..d1963dd 100644
--- a/coffee-script.spec
+++ b/coffee-script.spec
@@ -1,13 +1,15 @@
%define pkg coffee-script
Summary: The CoffeeScript Compiler
Name: coffee-script
-Version: 1.6.2
+Version: 1.6.3
Release: 1
License: MIT
Group: Development/Libraries
-URL: http://jashkenas.github.com/coffee-script/
-Source0: http://registry.npmjs.org/coffee-script/-/%{pkg}-%{version}.tgz
-# Source0-md5: 3fd785ef72ecb6b69cfa425a2d13e4fd
+URL: http://coffeescript.org/
+Source0: https://github.com/jashkenas/coffee-script/archive/%{version}.tar.gz
+# Source0-md5: 837fb08b97deb00c471101b9c3a5a107
+Patch0: coffee-script-Cakefile.patch
+Patch1: coffee-script-fix-importing-test.patch
BuildRequires: rpmbuild(macros) >= 1.634
BuildRequires: sed >= 4.0
Requires: nodejs >= 0.6
@@ -21,16 +23,23 @@ has always had a gorgeous object model at its heart. CoffeeScript is
an attempt to expose the good parts of JavaScript in a simple way.
%prep
-%setup -qc
-mv package/* .
+%setup -q
+%patch0 -p0
+%patch1 -p1
+%build
%{__sed} -i -e '1s,^#!.*node,#!/usr/bin/node,' bin/*
chmod a+rx bin/*
+./bin/cake build
+
+#also build the unminifed version
+MINIFY=false ./bin/cake build:browser
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
-cp -a bin lib $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
+cp -a bin lib package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
install -d $RPM_BUILD_ROOT%{_bindir}
ln -s %{nodejs_libdir}/%{pkg}/bin/cake $RPM_BUILD_ROOT%{_bindir}/cake.coffeescript
@@ -46,5 +55,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/coffee
%dir %{nodejs_libdir}/%{pkg}
%{nodejs_libdir}/%{pkg}/lib
+%{nodejs_libdir}/%{pkg}/package.json
%dir %{nodejs_libdir}/%{pkg}/bin
%attr(755,root,root) %{nodejs_libdir}/%{pkg}/bin/*
diff --git a/coffee-script-Cakefile.patch b/coffee-script-Cakefile.patch
new file mode 100644
index 0000000..e5bda55
--- /dev/null
+++ b/coffee-script-Cakefile.patch
@@ -0,0 +1,35 @@
+--- Cakefile~ 2012-10-23 13:45:31.000000000 -0700
++++ Cakefile 2013-01-15 03:52:34.445701376 -0700
+@@ -45,22 +45,24 @@
+ console.log color + message + reset + ' ' + (explanation or '')
+
+ option '-p', '--prefix [DIR]', 'set the installation prefix for `cake install`'
++option '-d', '--destdir [DIR]', 'set the installation destination for `cake install`'
+
+ task 'install', 'install CoffeeScript into /usr/local (or --prefix)', (options) ->
++ destdir = options.destdir or ''
+ base = options.prefix or '/usr/local'
+- lib = "#{base}/lib/coffee-script"
++ lib = "#{base}/lib/coffee-script"
+ bin = "#{base}/bin"
+- node = "~/.node_libraries/coffee-script"
++ node = "#{base}/lib/node_modules/coffee-script"
+ console.log "Installing CoffeeScript to #{lib}"
+ console.log "Linking to #{node}"
+ console.log "Linking 'coffee' to #{bin}/coffee"
+ exec([
+- "mkdir -p #{lib} #{bin}"
+- "cp -rf bin lib LICENSE README package.json src #{lib}"
+- "ln -sfn #{lib}/bin/coffee #{bin}/coffee"
+- "ln -sfn #{lib}/bin/cake #{bin}/cake"
+- "mkdir -p ~/.node_libraries"
+- "ln -sfn #{lib}/lib/coffee-script #{node}"
++ "mkdir -p #{destdir}/#{lib} #{destdir}/#{bin}"
++ "cp -prf bin extras lib package.json src #{destdir}/#{lib}"
++ "ln -sfn #{lib}/bin/coffee #{destdir}/#{bin}/coffee"
++ "ln -sfn #{lib}/bin/cake #{destdir}/#{bin}/cake"
++ "mkdir -p #{destdir}/#{node}"
++ "ln -sfn #{lib}/lib/coffee-script #{destdir}/#{node}"
+ ].join(' && '), (err, stdout, stderr) ->
+ if err then console.log stderr.trim() else log 'done', green
+ )
diff --git a/coffee-script-fix-importing-test.patch b/coffee-script-fix-importing-test.patch
new file mode 100644
index 0000000..41852eb
--- /dev/null
+++ b/coffee-script-fix-importing-test.patch
@@ -0,0 +1,264 @@
+From 2e408648aad42901d96df01fe8475a18054e32c2 Mon Sep 17 00:00:00 2001
+From: Jeremy Ashkenas <jashkenas at gmail.com>
+Date: Sun, 2 Jun 2013 10:57:18 +0400
+Subject: [PATCH] renaming import test files to avoid risking the disfavor of
+ .gitignore
+
+---
+ test/importing.coffee | 6 +++---
+ test/importing/.import.coffee | 2 ++
+ test/importing/.import.coffee.md | 3 +++
+ test/importing/.import2 | 2 ++
+ test/importing/.test.coffee | 2 --
+ test/importing/.test.coffee.md | 3 ---
+ test/importing/.test2 | 2 --
+ test/importing/import.coffee | 2 ++
+ test/importing/import.coffee.md | 3 +++
+ test/importing/import.extension.coffee | 2 ++
+ test/importing/import.extension.coffee.md | 3 +++
+ test/importing/import.extension.js | 2 ++
+ test/importing/import.js | 2 ++
+ test/importing/import.litcoffee | 3 +++
+ test/importing/import.unknownextension | 2 ++
+ test/importing/import2 | 2 ++
+ test/importing/test.coffee.md | 3 ---
+ test/importing/test.extension.coffee | 2 --
+ test/importing/test.extension.coffee.md | 3 ---
+ test/importing/test.extension.js | 2 --
+ test/importing/test.js | 2 --
+ test/importing/test.unknownextension | 2 --
+ test/importing/test2 | 2 --
+ 23 files changed, 31 insertions(+), 26 deletions(-)
+ create mode 100644 test/importing/.import.coffee
+ create mode 100644 test/importing/.import.coffee.md
+ create mode 100644 test/importing/.import2
+ delete mode 100644 test/importing/.test.coffee
+ delete mode 100644 test/importing/.test.coffee.md
+ delete mode 100644 test/importing/.test2
+ create mode 100644 test/importing/import.coffee
+ create mode 100644 test/importing/import.coffee.md
+ create mode 100644 test/importing/import.extension.coffee
+ create mode 100644 test/importing/import.extension.coffee.md
+ create mode 100644 test/importing/import.extension.js
+ create mode 100644 test/importing/import.js
+ create mode 100644 test/importing/import.litcoffee
+ create mode 100644 test/importing/import.unknownextension
+ create mode 100644 test/importing/import2
+ delete mode 100644 test/importing/test.coffee.md
+ delete mode 100644 test/importing/test.extension.coffee
+ delete mode 100644 test/importing/test.extension.coffee.md
+ delete mode 100644 test/importing/test.extension.js
+ delete mode 100644 test/importing/test.js
+ delete mode 100644 test/importing/test.unknownextension
+ delete mode 100644 test/importing/test2
+
+diff --git a/test/importing.coffee b/test/importing.coffee
+index 91d56d4..96fff02 100644
+--- a/test/importing.coffee
++++ b/test/importing.coffee
+@@ -19,16 +19,16 @@ unless window? or testingBrowser?
+
+ test "javascript modules can be imported", ->
+ magicVal = 1
+- for module in 'test.js test2 .test2 test.extension.js test.unknownextension .coffee .coffee.md'.split ' '
++ for module in 'import.js import2 .import2 import.extension.js import.unknownextension .coffee .coffee.md'.split ' '
+ ok require("./importing/#{module}").value?() is magicVal, module
+
+ test "coffeescript modules can be imported", ->
+ magicVal = 2
+- for module in '.test.coffee test.coffee test.extension.coffee'.split ' '
++ for module in '.import.coffee import.coffee import.extension.coffee'.split ' '
+ ok require("./importing/#{module}").value?() is magicVal, module
+
+ test "literate coffeescript modules can be imported", ->
+ magicVal = 3
+ # Leading space intentional to check for index.coffee.md
+- for module in ' .test.coffee.md test.coffee.md test.litcoffee test.extension.coffee.md'.split ' '
++ for module in ' .import.coffee.md import.coffee.md import.litcoffee import.extension.coffee.md'.split ' '
+ ok require("./importing/#{module}").value?() is magicVal, module
+diff --git a/test/importing/.import.coffee b/test/importing/.import.coffee
+new file mode 100644
+index 0000000..ff8ad83
+--- /dev/null
++++ b/test/importing/.import.coffee
+@@ -0,0 +1,2 @@
++# Required by ../importing.coffee
++module.exports = {value: -> 2}
+diff --git a/test/importing/.import.coffee.md b/test/importing/.import.coffee.md
+new file mode 100644
+index 0000000..99459eb
+--- /dev/null
++++ b/test/importing/.import.coffee.md
+@@ -0,0 +1,3 @@
++Required by ../importing.coffee
++
++ module.exports = {value: -> 3}
+diff --git a/test/importing/.import2 b/test/importing/.import2
+new file mode 100644
+index 0000000..34f70d6
+--- /dev/null
++++ b/test/importing/.import2
+@@ -0,0 +1,2 @@
++// Required by ../importing.coffee
++module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/.test.coffee b/test/importing/.test.coffee
+deleted file mode 100644
+index ff8ad83..0000000
+--- a/test/importing/.test.coffee
++++ /dev/null
+@@ -1,2 +0,0 @@
+-# Required by ../importing.coffee
+-module.exports = {value: -> 2}
+diff --git a/test/importing/.test.coffee.md b/test/importing/.test.coffee.md
+deleted file mode 100644
+index 99459eb..0000000
+--- a/test/importing/.test.coffee.md
++++ /dev/null
+@@ -1,3 +0,0 @@
+-Required by ../importing.coffee
+-
+- module.exports = {value: -> 3}
+diff --git a/test/importing/.test2 b/test/importing/.test2
+deleted file mode 100644
+index 34f70d6..0000000
+--- a/test/importing/.test2
++++ /dev/null
+@@ -1,2 +0,0 @@
+-// Required by ../importing.coffee
+-module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/import.coffee b/test/importing/import.coffee
+new file mode 100644
+index 0000000..ff8ad83
+--- /dev/null
++++ b/test/importing/import.coffee
+@@ -0,0 +1,2 @@
++# Required by ../importing.coffee
++module.exports = {value: -> 2}
+diff --git a/test/importing/import.coffee.md b/test/importing/import.coffee.md
+new file mode 100644
+index 0000000..99459eb
+--- /dev/null
++++ b/test/importing/import.coffee.md
+@@ -0,0 +1,3 @@
++Required by ../importing.coffee
++
++ module.exports = {value: -> 3}
+diff --git a/test/importing/import.extension.coffee b/test/importing/import.extension.coffee
+new file mode 100644
+index 0000000..ff8ad83
+--- /dev/null
++++ b/test/importing/import.extension.coffee
+@@ -0,0 +1,2 @@
++# Required by ../importing.coffee
++module.exports = {value: -> 2}
+diff --git a/test/importing/import.extension.coffee.md b/test/importing/import.extension.coffee.md
+new file mode 100644
+index 0000000..99459eb
+--- /dev/null
++++ b/test/importing/import.extension.coffee.md
+@@ -0,0 +1,3 @@
++Required by ../importing.coffee
++
++ module.exports = {value: -> 3}
+diff --git a/test/importing/import.extension.js b/test/importing/import.extension.js
+new file mode 100644
+index 0000000..34f70d6
+--- /dev/null
++++ b/test/importing/import.extension.js
+@@ -0,0 +1,2 @@
++// Required by ../importing.coffee
++module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/import.js b/test/importing/import.js
+new file mode 100644
+index 0000000..34f70d6
+--- /dev/null
++++ b/test/importing/import.js
+@@ -0,0 +1,2 @@
++// Required by ../importing.coffee
++module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/import.litcoffee b/test/importing/import.litcoffee
+new file mode 100644
+index 0000000..99459eb
+--- /dev/null
++++ b/test/importing/import.litcoffee
+@@ -0,0 +1,3 @@
++Required by ../importing.coffee
++
++ module.exports = {value: -> 3}
+diff --git a/test/importing/import.unknownextension b/test/importing/import.unknownextension
+new file mode 100644
+index 0000000..34f70d6
+--- /dev/null
++++ b/test/importing/import.unknownextension
+@@ -0,0 +1,2 @@
++// Required by ../importing.coffee
++module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/import2 b/test/importing/import2
+new file mode 100644
+index 0000000..34f70d6
+--- /dev/null
++++ b/test/importing/import2
+@@ -0,0 +1,2 @@
++// Required by ../importing.coffee
++module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/test.coffee.md b/test/importing/test.coffee.md
+deleted file mode 100644
+index 99459eb..0000000
+--- a/test/importing/test.coffee.md
++++ /dev/null
+@@ -1,3 +0,0 @@
+-Required by ../importing.coffee
+-
+- module.exports = {value: -> 3}
+diff --git a/test/importing/test.extension.coffee b/test/importing/test.extension.coffee
+deleted file mode 100644
+index ff8ad83..0000000
+--- a/test/importing/test.extension.coffee
++++ /dev/null
+@@ -1,2 +0,0 @@
+-# Required by ../importing.coffee
+-module.exports = {value: -> 2}
+diff --git a/test/importing/test.extension.coffee.md b/test/importing/test.extension.coffee.md
+deleted file mode 100644
+index 99459eb..0000000
+--- a/test/importing/test.extension.coffee.md
++++ /dev/null
+@@ -1,3 +0,0 @@
+-Required by ../importing.coffee
+-
+- module.exports = {value: -> 3}
+diff --git a/test/importing/test.extension.js b/test/importing/test.extension.js
+deleted file mode 100644
+index 34f70d6..0000000
+--- a/test/importing/test.extension.js
++++ /dev/null
+@@ -1,2 +0,0 @@
+-// Required by ../importing.coffee
+-module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/test.js b/test/importing/test.js
+deleted file mode 100644
+index 34f70d6..0000000
+--- a/test/importing/test.js
++++ /dev/null
+@@ -1,2 +0,0 @@
+-// Required by ../importing.coffee
+-module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/test.unknownextension b/test/importing/test.unknownextension
+deleted file mode 100644
+index 34f70d6..0000000
+--- a/test/importing/test.unknownextension
++++ /dev/null
+@@ -1,2 +0,0 @@
+-// Required by ../importing.coffee
+-module.exports = {value: function(){return 1;}};
+diff --git a/test/importing/test2 b/test/importing/test2
+deleted file mode 100644
+index 34f70d6..0000000
+--- a/test/importing/test2
++++ /dev/null
+@@ -1,2 +0,0 @@
+-// Required by ../importing.coffee
+-module.exports = {value: function(){return 1;}};
+--
+1.8.2.1
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/coffee-script.git/commitdiff/a58228a22c8b6fcf9600a16c069513c4bcb94e98
More information about the pld-cvs-commit
mailing list