]>
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 |
0336db61 | 20 | BuildRequires: ruby-devel |
2f070126 | 21 | BuildRequires: ruby-modules |
22 | BuildRequires: setup.rb | |
23 | %{?ruby_mod_ver_requires_eq} | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | Discount Markdown Processor for Ruby. | |
28 | ||
29 | %package -n rdiscount | |
30 | Summary: Markdown processor | |
31 | Group: Applications/Publishing | |
32 | Requires: %{name} = %{version}-%{release} | |
33 | ||
34 | %description -nrdiscount | |
35 | Markdown processor. | |
36 | ||
37 | %package rdoc | |
38 | Summary: HTML documentation for %{pkgname} | |
39 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
40 | Group: Documentation | |
41 | Requires: ruby >= 1:1.8.7-4 | |
42 | ||
43 | %description rdoc | |
44 | HTML documentation for %{pkgname}. | |
45 | ||
46 | %description rdoc -l pl.UTF-8 | |
47 | Dokumentacja w formacie HTML dla %{pkgname}. | |
48 | ||
49 | %package ri | |
50 | Summary: ri documentation for %{pkgname} | |
51 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname} | |
52 | Group: Documentation | |
53 | Requires: ruby | |
54 | ||
55 | %description ri | |
56 | ri documentation for %{pkgname}. | |
57 | ||
58 | %description ri -l pl.UTF-8 | |
59 | Dokumentacji w formacie ri dla %{pkgname}. | |
60 | ||
61 | %prep | |
62 | %setup -q -c | |
63 | mv rtomayko-rdiscount-*/* . | |
64 | rm -rf rtomayko-rdiscount-* | |
65 | ||
66 | %patch0 -p1 | |
67 | ||
68 | %build | |
69 | ||
70 | cp %{_datadir}/setup.rb . | |
71 | ||
72 | ruby setup.rb config \ | |
73 | --rbdir=%{ruby_rubylibdir} \ | |
74 | --sodir=%{ruby_archdir} | |
75 | ||
76 | ruby setup.rb setup | |
77 | ||
78 | rdoc --ri --op ri lib | |
79 | rdoc --op rdoc lib | |
80 | rm ri/created.rid | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}} | |
85 | ||
86 | #cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} | |
87 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} | |
88 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
89 | ||
90 | ruby setup.rb install \ | |
91 | --prefix=$RPM_BUILD_ROOT | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %files | |
97 | %defattr(644,root,root,755) | |
98 | %doc COPYING README.markdown | |
99 | %{ruby_rubylibdir}/%{pkgname}.rb | |
100 | %{ruby_rubylibdir}/markdown.rb | |
101 | %attr(755,root,root) %{ruby_archdir}/%{pkgname}.so | |
102 | ||
103 | %files -n rdiscount | |
104 | %defattr(644,root,root,755) | |
105 | %attr(755,root,root) %{_bindir}/rdiscount | |
106 | ||
107 | %files rdoc | |
108 | %defattr(644,root,root,755) | |
109 | %{ruby_rdocdir}/%{name}-%{version} | |
110 | ||
111 | %files ri | |
112 | %defattr(644,root,root,755) | |
113 | %{ruby_ridir}/RDiscount |