]>
Commit | Line | Data |
---|---|---|
78e38005 JR |
1 | %define pkgname polyglot |
2 | Summary: Allows custom language loaders for specified file extensions to be hooked into require | |
3 | Name: ruby-%{pkgname} | |
e0ff3799 JR |
4 | Version: 0.3.5 |
5 | Release: 1 | |
78e38005 JR |
6 | License: MIT/Ruby License |
7 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem | |
e0ff3799 | 8 | # Source0-md5: 5fff8b0cfb2b36d885b90d271802a7c5 |
78e38005 JR |
9 | Group: Development/Languages |
10 | URL: http://rubyforge.org/projects/.../ | |
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 | Allows custom language loaders for specified file | |
23 | extensions to be hooked into require. | |
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 | |
e0ff3799 | 50 | %setup -q -n %{pkgname}-%{version} |
78e38005 JR |
51 | |
52 | %build | |
e0ff3799 JR |
53 | # write .gemspec |
54 | %__gem_helper spec | |
55 | ||
78e38005 JR |
56 | rdoc --ri --op ri lib |
57 | rdoc --op rdoc lib | |
58 | rm -r ri/Kernel | |
59 | rm ri/created.rid | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}} | |
64 | ||
65 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} | |
66 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} | |
67 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
68 | ||
e0ff3799 JR |
69 | # install gemspec |
70 | install -d $RPM_BUILD_ROOT%{ruby_specdir} | |
71 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} | |
72 | ||
78e38005 JR |
73 | %clean |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %files | |
77 | %defattr(644,root,root,755) | |
78 | %doc History.txt README.txt | |
79 | %{ruby_rubylibdir}/%{pkgname}.rb | |
80 | %{ruby_rubylibdir}/%{pkgname} | |
e0ff3799 | 81 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |
78e38005 JR |
82 | |
83 | %files rdoc | |
84 | %defattr(644,root,root,755) | |
85 | %{ruby_rdocdir}/%{name}-%{version} | |
86 | ||
87 | %files ri | |
88 | %defattr(644,root,root,755) | |
89 | %{ruby_ridir}/Polyglot |