]>
Commit | Line | Data |
---|---|---|
3b7151f8 ER |
1 | # |
2 | # Conditional build: | |
fd01af91 | 3 | %bcond_with tests # build without tests |
3b7151f8 ER |
4 | |
5 | %define pkgname stud | |
6 | Summary: stud - common code techniques | |
7 | Name: ruby-%{pkgname} | |
fd01af91 | 8 | Version: 0.0.22 |
3b7151f8 | 9 | Release: 1 |
fd01af91 | 10 | License: Apache v2.0 |
3b7151f8 ER |
11 | Group: Development/Languages |
12 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem | |
fd01af91 | 13 | # Source0-md5: 1176e3529f9b0f136bd3a84dc290ba8d |
3b7151f8 ER |
14 | URL: https://github.com/jordansissel/ruby-stud |
15 | BuildRequires: rpm-rubyprov | |
16 | BuildRequires: rpmbuild(macros) >= 1.656 | |
17 | %if %{with tests} | |
18 | BuildRequires: ruby-insist | |
19 | BuildRequires: ruby-rspec | |
20 | %endif | |
21 | BuildArch: noarch | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | Small reusable bits of code I'm tired of writing over and over. A | |
fd01af91 | 26 | library form of my software-patterns github repo. |
3b7151f8 ER |
27 | |
28 | %prep | |
29 | %setup -q -n %{pkgname}-%{version} | |
30 | ||
31 | %build | |
32 | # write .gemspec | |
33 | %__gem_helper spec | |
34 | ||
35 | %install | |
36 | rm -rf $RPM_BUILD_ROOT | |
37 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}} | |
38 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
39 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} | |
40 | ||
41 | %clean | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | ||
44 | %files | |
45 | %defattr(644,root,root,755) | |
fd01af91 | 46 | %doc README.md LICENSE |
3b7151f8 ER |
47 | %{ruby_vendorlibdir}/%{pkgname} |
48 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |