]> git.pld-linux.org Git - SPECS.git/blob - ruby-unicode-display_width.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ruby-unicode-display_width.spec
1 #
2 # Conditional build:
3 %bcond_without  doc                     # don't build ri/rdoc
4
5 %define pkgname unicode-display_width
6 Summary:        Determines the monospace display width of a string in Ruby
7 Name:           ruby-%{pkgname}
8 Version:        1.4.0
9 Release:        3
10 License:        MIT
11 Source0:        https://rubygems.org/downloads/%{pkgname}-%{version}.gem
12 # Source0-md5:  d1ac23905e70014658ea4ccefd2f16b1
13 Group:          Development/Languages
14 URL:            https://github.com/janlelis/unicode-display_width
15 BuildRequires:  rpm-rubyprov
16 BuildRequires:  rpmbuild(macros) >= 1.665
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 Determines the monospace display width of a string in Ruby.
22 Implementation based on EastAsianWidth.txt and other data, 100% in
23 Ruby. Other than wcwidth(), which fulfills a similar purpose, it does
24 not rely on the OS vendor to provide an up-to-date method for
25 measuring string width.
26
27 %package rdoc
28 Summary:        HTML documentation for Ruby %{pkgname} module
29 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla modułu języka Ruby %{pkgname}
30 Group:          Documentation
31 Requires:       ruby >= 1:1.8.7-4
32
33 %description rdoc
34 HTML documentation for Ruby %{pkgname} module.
35
36 %description rdoc -l pl.UTF-8
37 Dokumentacja w formacie HTML dla modułu języka Ruby %{pkgname}.
38
39 %package ri
40 Summary:        ri documentation for Ruby %{pkgname} module
41 Summary(pl.UTF-8):      Dokumentacja w formacie ri dla modułu języka Ruby %{pkgname}
42 Group:          Documentation
43 Requires:       ruby
44
45 %description ri
46 ri documentation for Ruby %{pkgname} module.
47
48 %description ri -l pl.UTF-8
49 Dokumentacja w formacie ri dla modułu języka Ruby %{pkgname}.
50
51 %prep
52 %setup -q -n %{pkgname}-%{version}
53
54 %build
55 # write .gemspec
56 %__gem_helper spec
57
58 # make gemspec self-contained
59 ruby -r rubygems -e 'spec = eval(File.read("%{pkgname}.gemspec"))
60         File.open("%{pkgname}-%{version}.gemspec", "w") do |file|
61         file.puts spec.to_ruby_for_cache
62 end'
63
64 #'
65
66 rdoc --ri --op ri lib
67 rdoc --op rdoc lib
68 # rm -r ri/NOT_THIS_MODULE_RELATED_DIRS
69 rm ri/created.rid
70 rm ri/cache.ri
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}}
75 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
76 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
77
78 %if %{with doc}
79 install -d $RPM_BUILD_ROOT{%{ruby_rdocdir}/%{name}-%{version},%{ruby_ridir}}
80 cp -a rdoc/* $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
81 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
82 %endif
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
88 %defattr(644,root,root,755)
89 %doc CHANGELOG.md README.md
90 %dir %{ruby_vendorlibdir}/unicode
91 %{ruby_vendorlibdir}/unicode/display_width.rb
92 %{ruby_vendorlibdir}/unicode/display_width
93 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
94
95 %if %{with doc}
96 %files rdoc
97 %defattr(644,root,root,755)
98 %{ruby_rdocdir}/%{name}-%{version}
99
100 %files ri
101 %defattr(644,root,root,755)
102 %{ruby_ridir}/Unicode
103 %endif
This page took 0.670562 seconds and 3 git commands to generate.