]>
Commit | Line | Data |
---|---|---|
ba66646d ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
5 | %define pkgname compass | |
6 | Summary: A Sass-based CSS Meta-Framework | |
7 | Name: ruby-%{pkgname} | |
8 | Version: 0.12.5 | |
9 | Release: 1 | |
10 | License: MIT | |
11 | Group: Development/Languages | |
12 | Source0: http://gemcutter.org/downloads/compass-%{version}.gem | |
13 | # Source0-md5: 8cd8ccbeebbba9ca592396e38498fb3e | |
14 | URL: http://compass-style.org/ | |
15 | BuildRequires: rpm-rubyprov | |
16 | BuildRequires: rpmbuild(macros) >= 1.656 | |
17 | BuildRequires: sed >= 4.0 | |
18 | %if %{with tests} | |
19 | # For Testing | |
20 | BuildRequires: rubygem(chunky_png) | |
21 | #BuildRequires: rubygem(cucumber) | |
22 | BuildRequires: rubygem(diff-lcs) | |
23 | BuildRequires: rubygem(minitest) | |
24 | BuildRequires: rubygem(mocha) | |
25 | BuildRequires: rubygem(sass) | |
26 | %endif | |
cba06477 | 27 | Requires: ruby-sass |
ba66646d ER |
28 | Requires: rubygem(chunky_png) |
29 | Requires: rubygem(fssm) >= 0.2.7 | |
30 | Requires: rubygem(haml) >= 3.1 | |
31 | BuildArch: noarch | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | A Sass-based CSS Meta-Framework that allows you to mix and match any | |
36 | of the following CSS frameworks: Compass Core, Blueprint, 960, Susy, | |
37 | YUI, and others. | |
38 | ||
39 | %prep | |
40 | %setup -q -n %{pkgname}-%{version} | |
41 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* | |
42 | ||
43 | %build | |
44 | %if %{with tests} | |
45 | # Original test | |
46 | #find -type f -name *_test.rb | xargs testrb -Ilib:test | |
47 | # Only run the tests that run | |
48 | testrb -Ilib:test \ | |
49 | ./test/integrations/sprites_test.rb \ | |
50 | ./test/units/actions_test.rb \ | |
51 | ./test/units/command_line_test.rb \ | |
52 | ./test/units/compass_module_test.rb \ | |
53 | ./test/units/configuration_test.rb \ | |
54 | ./test/units/sprites/engine_test.rb \ | |
55 | ./test/units/sprites/image_row_test.rb \ | |
56 | ./test/units/sprites/importer_test.rb \ | |
57 | ./test/units/sprites/layout_test.rb \ | |
58 | ./test/units/sprites/sprite_command_test.rb \ | |
59 | ./test/units/sprites/sprite_map_test.rb \ | |
60 | ||
61 | # These tests fail for various reasons | |
62 | #./test/units/sprites/image_test.rb \ | |
63 | #./test/units/sprites/row_fitter_test.rb \ | |
64 | #./test/units/compiler_test.rb \ | |
65 | #./test/units/compass_png_test.rb \ | |
66 | #./test/units/sass_extensions_test.rb \ | |
67 | #./test/integrations/compass_test.rb | |
68 | #./test/units/regressions_test.rb \ | |
69 | ||
70 | # rpmlint will complain about these files | |
71 | rm -rf test/fixtures/stylesheets/*/sass/.sass-cache | |
72 | rm -rf .sass-cache | |
73 | %endif | |
74 | ||
75 | %install | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}} | |
78 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
79 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
80 | ||
81 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
82 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
83 | ||
84 | %clean | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
89 | %attr(755,root,root) %{_bindir}/compass | |
90 | %doc LICENSE.markdown README.markdown VERSION.yml | |
91 | %{ruby_vendorlibdir}/compass.rb | |
92 | %{ruby_vendorlibdir}/compass | |
93 | %{_examplesdir}/%{name}-%{version} |