LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File coffeescript.spec of Package coffeescript (Project devel:languages:nodejs)

# spec file for package coffeescript
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:          coffeescript
Summary:       Little language that compiles into JavaScript
License:       MIT
URL:           http://jashkenas.github.com/coffee-script
Group:         Development/Languages/Other
Version:       1.6.2
Release:       1
Source0:       coffeescript-%{version}.tar.gz
BuildRoot:     %{_tmppath}/%{name}-%{version}-root
Requires:      nodejs 
BuildRequires: nodejs-devel 
BuildArch:     noarch 

CoffeeScript is a little language that compiles into JavaScript. Underneath all
of those embarrassing braces and semicolons, JavaScript 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.

The golden rule of CoffeeScript is: "It's just JavaScript". The code compiles
one-to-one into the equivalent JS, and there is no interpretation at runtime.
You can use any existing JavaScript library seamlessly (and vice-versa).
The compiled output is readable and pretty-printed, passes through JavaScript
Lint without warnings, will work in every JavaScript implementation, and tends
to run as fast or faster than the equivalent handwritten JavaScript.

%setup -q -n %{name}

# percent-configure pulls in something that confuses node's configure
# script, so we'll do it thus:
./bin/cake build

./bin/cake --prefix %{buildroot}%{_prefix}/lib/node_modules install
mv %{buildroot}%{_prefix}/lib/node_modules/lib/coffee-script %{buildroot}%{_prefix}/lib/node_modules
rm -rf %{buildroot}%{_prefix}/lib/node_modules/lib
rm -rf %{buildroot}%{_prefix}/lib/node_modules/bin
mkdir %{buildroot}%{_prefix}/bin
ln -sf %{_prefix}/lib/node_modules/coffee-script/bin/cake %{buildroot}%{_prefix}/bin/cake
ln -sf %{_prefix}/lib/node_modules/coffee-script/bin/coffee %{buildroot}%{_prefix}/bin/coffee

%defattr(-, root, root)