]> git.pld-linux.org Git - packages/ruby-coderay.git/blob - ruby-coderay.spec
33c42169c7309bdb0575c86a37d72e89af1b949a
[packages/ruby-coderay.git] / ruby-coderay.spec
1 %define pkgname coderay
2 Summary:        Fast syntax highlighter engine for many programming languages
3 Name:           ruby-%{pkgname}
4 Version:        1.0.9
5 Release:        1
6 License:        MIT
7 Source0:        http://rubygems.org/downloads/%{pkgname}-%{version}.gem
8 # Source0-md5:  2e2619f9dc74f6443c80118c429752e1
9 Group:          Development/Languages
10 URL:            http://coderay.rubychan.de/
11 BuildRequires:  rpm-rubyprov
12 BuildRequires:  rpmbuild(macros) >= 1.656
13 BuildRequires:  sed >= 4.0
14 %if %(locale -a | grep -q '^en_US$'; echo $?)
15 BuildRequires:  glibc-localedb-all
16 %endif
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 Coderay is a Ruby library for syntax highlighting. CodeRay is build to
22 be easy to use and intuitive, but at the same time fully featured,
23 complete, fast and efficient.
24
25 %package rdoc
26 Summary:        HTML documentation for %{pkgname}
27 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla %{pkgname}
28 Group:          Documentation
29 Requires:       ruby >= 1:1.8.7-4
30
31 %description rdoc
32 HTML documentation for %{pkgname}.
33
34 %description rdoc -l pl.UTF-8
35 Dokumentacja w formacie HTML dla %{pkgname}.
36
37 %package ri
38 Summary:        ri documentation for %{pkgname}
39 Summary(pl.UTF-8):      Dokumentacja w formacie ri dla %{pkgname}
40 Group:          Documentation
41 Requires:       ruby
42
43 %description ri
44 ri documentation for %{pkgname}.
45
46 %description ri -l pl.UTF-8
47 Dokumentacji w formacie ri dla %{pkgname}.
48
49 %prep
50 %setup -q -n %{pkgname}-%{version}
51 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
52
53 %build
54 %__gem_helper spec
55
56 # UTF8 locale needed for doc generation
57 export LC_ALL=en_US.UTF-8
58 rdoc --ri --op ri lib
59 rdoc --op rdoc lib
60 rm -fr ri/{GZip,String}
61 rm ri/created.rid
62 rm ri/cache.ri
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_bindir},%{ruby_vendorlibdir},%{ruby_specdir},%{ruby_ridir},%{ruby_rdocdir}}
67
68 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
69 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
70 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
71 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
72 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
78 %defattr(644,root,root,755)
79 %doc README_INDEX.rdoc
80 %attr(755,root,root) %{_bindir}/coderay
81 %{ruby_vendorlibdir}/coderay.rb
82 %{ruby_vendorlibdir}/coderay
83 %{ruby_specdir}/coderay-%{version}.gemspec
84
85 %files rdoc
86 %defattr(644,root,root,755)
87 %{ruby_rdocdir}/%{name}-%{version}
88
89 %files ri
90 %defattr(644,root,root,755)
91 %{ruby_ridir}/CodeRay
This page took 0.061842 seconds and 2 git commands to generate.