]>
Commit | Line | Data |
---|---|---|
13fc0b0d JR |
1 | %define pkgname coderay |
2 | Summary: Ruby library for syntax highlighting | |
3 | Name: ruby-%{pkgname} | |
4 | Version: 0.9.1 | |
5 | Release: 1 | |
6 | License: LGPL | |
7 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem | |
8 | # Source0-md5: d6049cfb54b0702d7a40e59b37f74933 | |
9 | Group: Development/Languages | |
10 | URL: http://coderay.rubychan.de/ | |
11 | BuildRequires: rpmbuild(macros) >= 1.484 | |
12 | BuildRequires: ruby >= 1:1.8.6 | |
13 | BuildRequires: ruby-modules | |
14 | %{?ruby_mod_ver_requires_eq} | |
15 | #BuildArch: noarch | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | # nothing to be placed there. we're not noarch only because of ruby packaging | |
19 | %define _enable_debug_packages 0 | |
20 | ||
21 | %description | |
22 | CodeRay is a Ruby library for syntax highlighting. | |
23 | I try to make CodeRay easy to use and intuitive, | |
24 | but at the same time fully featured, complete, fast and | |
25 | efficient. Usage is simple: CodeRay.scan(code, :ruby).div | |
26 | ||
27 | %package rdoc | |
28 | Summary: HTML documentation for %{pkgname} | |
29 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
30 | Group: Documentation | |
31 | Requires: ruby >= 1:1.8.7-4 | |
32 | ||
33 | %description rdoc | |
34 | HTML documentation for %{pkgname}. | |
35 | ||
36 | %description rdoc -l pl.UTF-8 | |
37 | Dokumentacja w formacie HTML dla %{pkgname}. | |
38 | ||
39 | %package ri | |
40 | Summary: ri documentation for %{pkgname} | |
41 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname} | |
42 | Group: Documentation | |
43 | Requires: ruby | |
44 | ||
45 | %description ri | |
46 | ri documentation for %{pkgname}. | |
47 | ||
48 | %description ri -l pl.UTF-8 | |
49 | Dokumentacji w formacie ri dla %{pkgname}. | |
50 | ||
51 | %prep | |
52 | %setup -q -c | |
53 | %{__tar} xf %{SOURCE0} -O data.tar.gz | %{__tar} xz | |
54 | find -newer FOLDERS -o -print | xargs touch --reference %{SOURCE0} | |
55 | ||
56 | %{__sed} -i -e 's|/usr/bin/env ruby|%{__ruby}|' bin/coderay* | |
57 | ||
58 | %build | |
59 | rdoc --ri --op ri lib | |
60 | rdoc --op rdoc lib | |
61 | rm -r ri/{GZip,String,Term} | |
62 | rm ri/created.rid | |
63 | ||
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | install -d $RPM_BUILD_ROOT{%{_bindir},%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}} | |
67 | ||
68 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
69 | cp -a lib/coderay* $RPM_BUILD_ROOT%{ruby_rubylibdir} | |
70 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} | |
71 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %files | |
77 | %defattr(644,root,root,755) | |
78 | %doc FOLDERS lib/README | |
79 | %attr(755,root,root) %{_bindir}/coderay | |
80 | %attr(755,root,root) %{_bindir}/coderay_stylesheet | |
81 | %{ruby_rubylibdir}/%{pkgname}.rb | |
82 | %{ruby_rubylibdir}/%{pkgname} | |
83 | ||
84 | %files rdoc | |
85 | %defattr(644,root,root,755) | |
86 | %{ruby_rdocdir}/%{name}-%{version} | |
87 | ||
88 | %files ri | |
89 | %defattr(644,root,root,755) | |
90 | %{ruby_ridir}/CodeRay |