]>
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 | |
a8e89bcb ER |
8 | Name: ruby-%{pkgname} |
9 | Version: 2.1.8 | |
2f38e19b | 10 | Release: 1 |
a8e89bcb ER |
11 | License: BSD |
12 | Source0: https://github.com/davidfstr/rdiscount/archive/%{version}/%{pkgname}-%{version}.tar.gz | |
13 | # Source0-md5: 7c8076339ffcbc0be7a76ebd19750fb7 | |
2f070126 | 14 | Group: Development/Languages |
a8e89bcb | 15 | URL: https://github.com/davidfstr/rdiscount |
d87af65b ER |
16 | BuildRequires: rpm-rubyprov |
17 | BuildRequires: rpmbuild(macros) >= 1.665 | |
a83c7ea4 | 18 | BuildRequires: ruby >= 1:1.9 |
0336db61 | 19 | BuildRequires: ruby-devel |
2f070126 | 20 | BuildRequires: ruby-modules |
21 | BuildRequires: setup.rb | |
2f070126 | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | Discount Markdown Processor for Ruby. | |
26 | ||
27 | %package -n rdiscount | |
28 | Summary: Markdown processor | |
29 | Group: Applications/Publishing | |
30 | Requires: %{name} = %{version}-%{release} | |
31 | ||
2f38e19b | 32 | %description -n rdiscount |
2f070126 | 33 | Markdown processor. |
34 | ||
35 | %package rdoc | |
36 | Summary: HTML documentation for %{pkgname} | |
37 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
38 | Group: Documentation | |
39 | Requires: ruby >= 1:1.8.7-4 | |
2f38e19b ER |
40 | %if "%{_rpmversion}" >= "5" |
41 | BuildArch: noarch | |
42 | %endif | |
2f070126 | 43 | |
44 | %description rdoc | |
45 | HTML documentation for %{pkgname}. | |
46 | ||
47 | %description rdoc -l pl.UTF-8 | |
48 | Dokumentacja w formacie HTML dla %{pkgname}. | |
49 | ||
50 | %package ri | |
51 | Summary: ri documentation for %{pkgname} | |
52 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname} | |
53 | Group: Documentation | |
54 | Requires: ruby | |
2f38e19b ER |
55 | %if "%{_rpmversion}" >= "5" |
56 | BuildArch: noarch | |
57 | %endif | |
2f070126 | 58 | |
59 | %description ri | |
60 | ri documentation for %{pkgname}. | |
61 | ||
62 | %description ri -l pl.UTF-8 | |
63 | Dokumentacji w formacie ri dla %{pkgname}. | |
64 | ||
65 | %prep | |
a8e89bcb | 66 | %setup -qn %{pkgname}-%{version} |
2f070126 | 67 | |
68 | %build | |
a8e89bcb ER |
69 | # make gemspec self-contained |
70 | ruby -r rubygems -e 'spec = eval(File.read("%{pkgname}.gemspec")) | |
71 | File.open("%{pkgname}-%{version}.gemspec", "w") do |file| | |
72 | file.puts spec.to_ruby_for_cache | |
73 | end' | |
74 | ||
2f070126 | 75 | cp %{_datadir}/setup.rb . |
76 | ||
2f38e19b ER |
77 | %{__ruby} setup.rb config \ |
78 | --rbdir=%{ruby_vendorlibdir} \ | |
a8e89bcb | 79 | --mandir=%{_mandir}/man1 \ |
2f38e19b | 80 | --sodir=%{ruby_vendorarchdir} |
2f070126 | 81 | |
2f38e19b | 82 | %{__ruby} setup.rb setup |
2f070126 | 83 | |
84 | rdoc --ri --op ri lib | |
85 | rdoc --op rdoc lib | |
2f38e19b | 86 | rm -r ri/Object |
2f070126 | 87 | rm ri/created.rid |
2f38e19b | 88 | rm ri/cache.ri |
2f070126 | 89 | |
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
a8e89bcb | 92 | install -d $RPM_BUILD_ROOT{%{ruby_specdir},%{ruby_ridir},%{ruby_rdocdir}} |
2f38e19b | 93 | %{__ruby} setup.rb install \ |
2f070126 | 94 | --prefix=$RPM_BUILD_ROOT |
a8e89bcb ER |
95 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
96 | ||
97 | # just does require rdiscount | |
98 | %{__rm} $RPM_BUILD_ROOT%{ruby_vendorlibdir}/markdown.rb | |
99 | ||
100 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} | |
101 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
102 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man*/*.ronn* | |
103 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man*/markdown.7* | |
2f070126 | 104 | |
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %files | |
109 | %defattr(644,root,root,755) | |
110 | %doc COPYING README.markdown | |
2f38e19b ER |
111 | %{ruby_vendorlibdir}/rdiscount.rb |
112 | %attr(755,root,root) %{ruby_vendorarchdir}/rdiscount.so | |
a8e89bcb | 113 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |
2f070126 | 114 | |
115 | %files -n rdiscount | |
116 | %defattr(644,root,root,755) | |
117 | %attr(755,root,root) %{_bindir}/rdiscount | |
a8e89bcb | 118 | %{_mandir}/man1/rdiscount.1* |
2f070126 | 119 | |
120 | %files rdoc | |
121 | %defattr(644,root,root,755) | |
122 | %{ruby_rdocdir}/%{name}-%{version} | |
123 | ||
124 | %files ri | |
125 | %defattr(644,root,root,755) | |
126 | %{ruby_ridir}/RDiscount |