]>
Commit | Line | Data |
---|---|---|
2f070126 | 1 | # TODO |
2 | # - rake doc | |
3 | # (in /home/users/z/rpm/BUILD/ruby-discount-1.2.7) hanna --charset utf8 --fmt html --inline-source --line-numbers --main RDiscount --op doc --title 'RDiscount API Documentation' lib/rdiscount.rb lib/markdown.rb sh: hanna: not found | |
4 | # rake aborted! | |
5 | # | |
6 | %define pkgname rdiscount | |
7 | Summary: Discount Markdown Processor for Ruby | |
8 | Name: ruby-rdiscount | |
9 | Version: 1.2.7 | |
10 | Release: 0.1 | |
11 | License: BSD-style | |
12 | #Source0: http://rubyforge.org/frs/download.php/18699/%{pkgname}-%{version}.tgz | |
13 | Source0: http://github.com/rtomayko/rdiscount/tarball/v1.2.7/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: 85edbb9768bfa7e36455dbf8749dccae | |
15 | Patch0: %{name}-ruby1.9.patch | |
16 | Group: Development/Languages | |
17 | URL: http://github.com/rtomayko/rdiscount | |
18 | BuildRequires: rpmbuild(macros) >= 1.484 | |
a83c7ea4 | 19 | BuildRequires: ruby >= 1:1.9 |
2f070126 | 20 | BuildRequires: ruby-modules |
21 | BuildRequires: setup.rb | |
22 | %{?ruby_mod_ver_requires_eq} | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | Discount Markdown Processor for Ruby. | |
27 | ||
28 | %package -n rdiscount | |
29 | Summary: Markdown processor | |
30 | Group: Applications/Publishing | |
31 | Requires: %{name} = %{version}-%{release} | |
32 | ||
33 | %description -nrdiscount | |
34 | Markdown processor. | |
35 | ||
36 | %package rdoc | |
37 | Summary: HTML documentation for %{pkgname} | |
38 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
39 | Group: Documentation | |
40 | Requires: ruby >= 1:1.8.7-4 | |
41 | ||
42 | %description rdoc | |
43 | HTML documentation for %{pkgname}. | |
44 | ||
45 | %description rdoc -l pl.UTF-8 | |
46 | Dokumentacja w formacie HTML dla %{pkgname}. | |
47 | ||
48 | %package ri | |
49 | Summary: ri documentation for %{pkgname} | |
50 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname} | |
51 | Group: Documentation | |
52 | Requires: ruby | |
53 | ||
54 | %description ri | |
55 | ri documentation for %{pkgname}. | |
56 | ||
57 | %description ri -l pl.UTF-8 | |
58 | Dokumentacji w formacie ri dla %{pkgname}. | |
59 | ||
60 | %prep | |
61 | %setup -q -c | |
62 | mv rtomayko-rdiscount-*/* . | |
63 | rm -rf rtomayko-rdiscount-* | |
64 | ||
65 | %patch0 -p1 | |
66 | ||
67 | %build | |
68 | ||
69 | cp %{_datadir}/setup.rb . | |
70 | ||
71 | ruby setup.rb config \ | |
72 | --rbdir=%{ruby_rubylibdir} \ | |
73 | --sodir=%{ruby_archdir} | |
74 | ||
75 | ruby setup.rb setup | |
76 | ||
77 | rdoc --ri --op ri lib | |
78 | rdoc --op rdoc lib | |
79 | rm ri/created.rid | |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}} | |
84 | ||
85 | #cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} | |
86 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} | |
87 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
88 | ||
89 | ruby setup.rb install \ | |
90 | --prefix=$RPM_BUILD_ROOT | |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc COPYING README.markdown | |
98 | %{ruby_rubylibdir}/%{pkgname}.rb | |
99 | %{ruby_rubylibdir}/markdown.rb | |
100 | %attr(755,root,root) %{ruby_archdir}/%{pkgname}.so | |
101 | ||
102 | %files -n rdiscount | |
103 | %defattr(644,root,root,755) | |
104 | %attr(755,root,root) %{_bindir}/rdiscount | |
105 | ||
106 | %files rdoc | |
107 | %defattr(644,root,root,755) | |
108 | %{ruby_rdocdir}/%{name}-%{version} | |
109 | ||
110 | %files ri | |
111 | %defattr(644,root,root,755) | |
112 | %{ruby_ridir}/RDiscount |