SampleSpecs/rubymodule — различия между версиями

Материал из ALT Linux Wiki
Перейти к: навигация, поиск
 
Строка 1: Строка 1:
 
<source lang="Spec">
 
<source lang="Spec">
%define pkgname <pkgname>
+
%define       pkgname gemmodule
 +
Name:          gem-%pkgname
 +
Version:      0.0.0
 +
Release:      alt1
 +
Summary:      <summary>
 +
Group:        Development/Ruby
 +
License:      <LICENSE>
 +
Url:          https://site.org/
 +
Vcs:          https://github.com/user/gemmodule.git
 +
Source:        %name-%version.tar
 +
 
 +
BuildRequires(pre): rpm-build-ruby
 +
BuildRequires: gem(another_gem_name)
 +
 
 +
%description
 +
%summary
  
Name: ruby-%pkgname
 
Version: 0.1
 
Release: alt1
 
  
Summary: FILL ME
+
%package      -n %pkgname
Group: Development/Ruby
+
Summary:       %summary
License: MIT/Ruby
+
Group:         <required group>
Url: http://rubyforge.org/projects/%pkgname
+
BuildArch:     noarch
  
Packager: Ruby Maintainers Team <ruby@packages.altlinux.org>
+
%description  -n %pkgname
BuildArch: noarch
+
%summary
  
Source: %pkgname-%version.tar
 
  
BuildRequires(pre): rpm-build-ruby
+
%package      doc
BuildRequires: ruby-tool-setup
+
Summary:       Documentation for %gemname gem
# For arch-specific package
+
Group:         Development/Documentation
#BuildRequires: libruby-devel
+
BuildArch:     noarch
  
%description
+
%description   doc
FILL ME.
+
Documentation for %gemname gem.
  
%package doc
 
Summary: Documentation files for %name
 
Group: Documentation
 
  
BuildArch: noarch
+
%package      devel
 +
Summary:      Development files for %gemname gem
 +
Group:        Development/Documentation
 +
BuildArch:     noarch
  
%description doc
+
%description   devel
Documentation files for %{name}.
+
Development files for %gemname gem.
  
 
%prep
 
%prep
%setup -n %pkgname-%version
+
%setup
%update_setup_rb
 
  
 
%build
 
%build
%ruby_config
 
 
%ruby_build
 
%ruby_build
  
 
%install
 
%install
 
%ruby_install
 
%ruby_install
%rdoc lib/
 
# Remove unnecessary files
 
rm -f %buildroot%ruby_ri_sitedir/{Object/cdesc-Object.ri,cache.ri,created.rid}
 
  
 
%check
 
%check
%ruby_test_unit -Ilib:test test
+
%ruby_test
  
 
%files
 
%files
%doc README*
+
%ruby_gemspec
%ruby_sitelibdir/*
+
%ruby_gemlibdir
 +
%ruby_gemextdir
 +
 
 +
%files        -n %pkgname
 +
%_bindir/*
 +
 
 +
%files        devel
 +
%ruby_includedir/*
  
%files doc
+
%files         doc
%ruby_ri_sitedir/*
+
%ruby_gemdocdir
  
 
%changelog
 
%changelog
Строка 61: Строка 74:
 
- initial build for ALT Linux Sisyphus</source>
 
- initial build for ALT Linux Sisyphus</source>
  
PS: За основу взят [http://git.altlinux.org/people/raorn/public/?p=ruby-spec-templates.git;a=blob;f=ruby-module.erb;h=863a737fadb0bb4712a29f83824de0087bd34e78;hb=a68e57371f900e7601633ac0d2419e9e18d26fc6 ruby-module.erb]
+
PS: За основу взят [https://packages.altlinux.org/en/sisyphus/specfiles/alexandria]
  
 
{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}
 
{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}
 
[[Категория:SampleSpecs]]
 
[[Категория:SampleSpecs]]
 
[[Категория:Ruby]]
 
[[Категория:Ruby]]

Текущая версия на 17:18, 4 марта 2020

%define        pkgname gemmodule
Name:          gem-%pkgname
Version:       0.0.0
Release:       alt1
Summary:       <summary>
Group:         Development/Ruby
License:       <LICENSE>
Url:           https://site.org/
Vcs:           https://github.com/user/gemmodule.git
Source:        %name-%version.tar

BuildRequires(pre): rpm-build-ruby
BuildRequires: gem(another_gem_name)

%description
%summary


%package       -n %pkgname
Summary:       %summary
Group:         <required group>
BuildArch:     noarch

%description   -n %pkgname
%summary


%package       doc
Summary:       Documentation for %gemname gem
Group:         Development/Documentation
BuildArch:     noarch

%description   doc
Documentation for %gemname gem.


%package       devel
Summary:       Development files for %gemname gem
Group:         Development/Documentation
BuildArch:     noarch

%description   devel
Development files for %gemname gem.

%prep
%setup

%build
%ruby_build

%install
%ruby_install

%check
%ruby_test

%files
%ruby_gemspec
%ruby_gemlibdir
%ruby_gemextdir

%files         -n %pkgname
%_bindir/*

%files         devel
%ruby_includedir/*

%files         doc
%ruby_gemdocdir

%changelog
* Sun Sep 32 3001 Sample Packager <sample@altlinux.org> 0.1-alt1
- initial build for ALT Linux Sisyphus

PS: За основу взят [1]