]> git.pld-linux.org Git - packages/coffee-script.git/blob - coffee-script.spec
- up to 1.6.3
[packages/coffee-script.git] / coffee-script.spec
1 %define         pkg     coffee-script
2 Summary:        The CoffeeScript Compiler
3 Name:           coffee-script
4 Version:        1.6.3
5 Release:        1
6 License:        MIT
7 Group:          Development/Libraries
8 URL:            http://coffeescript.org/
9 Source0:        https://github.com/jashkenas/coffee-script/archive/%{version}.tar.gz
10 # Source0-md5:  837fb08b97deb00c471101b9c3a5a107
11 Patch0:         coffee-script-Cakefile.patch
12 Patch1:         coffee-script-fix-importing-test.patch
13 BuildRequires:  rpmbuild(macros) >= 1.634
14 BuildRequires:  sed >= 4.0
15 Requires:       nodejs >= 0.6
16 BuildArch:      noarch
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 CoffeeScript is a little language that compiles into JavaScript.
21 Underneath all of those embarrassing braces and semicolons, JavaScript
22 has always had a gorgeous object model at its heart. CoffeeScript is
23 an attempt to expose the good parts of JavaScript in a simple way.
24
25 %prep
26 %setup -q
27 %patch0 -p0
28 %patch1 -p1
29
30 %build
31 %{__sed} -i -e '1s,^#!.*node,#!/usr/bin/node,' bin/*
32 chmod a+rx bin/*
33
34 ./bin/cake build
35
36 #also build the unminifed version
37 MINIFY=false ./bin/cake build:browser
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
42 cp -a bin lib package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
43
44 install -d $RPM_BUILD_ROOT%{_bindir}
45 ln -s %{nodejs_libdir}/%{pkg}/bin/cake $RPM_BUILD_ROOT%{_bindir}/cake.coffeescript
46 ln -s %{nodejs_libdir}/%{pkg}/bin/coffee $RPM_BUILD_ROOT%{_bindir}
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %files
52 %defattr(644,root,root,755)
53 %doc README LICENSE CONTRIBUTING.md
54 %attr(755,root,root) %{_bindir}/cake.coffeescript
55 %attr(755,root,root) %{_bindir}/coffee
56 %dir %{nodejs_libdir}/%{pkg}
57 %{nodejs_libdir}/%{pkg}/lib
58 %{nodejs_libdir}/%{pkg}/package.json
59 %dir %{nodejs_libdir}/%{pkg}/bin
60 %attr(755,root,root) %{nodejs_libdir}/%{pkg}/bin/*
This page took 0.072771 seconds and 4 git commands to generate.