Skip to content

Commit eb24062

Browse files
authored
Merge pull request #3 from timogoebel/rpmspecs
add spec files to build rpms
2 parents 649041e + 09ec7ca commit eb24062

3 files changed

+243
-0
lines changed
+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
%global gem_name passgen
2+
3+
Name: rubygem-%{gem_name}
4+
Version: 1.0.2
5+
Release: 1%{?dist}
6+
Summary: A password generation gem for Ruby and Rails applications
7+
Group: Development/Languages
8+
License: MIT
9+
URL: http://github.com/cryptice/passgen
10+
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
11+
Requires: ruby(release)
12+
Requires: ruby
13+
Requires: ruby(rubygems) >= 1.2
14+
BuildRequires: ruby(release)
15+
BuildRequires: ruby
16+
BuildRequires: rubygems-devel >= 1.2
17+
BuildArch: noarch
18+
Provides: rubygem(%{gem_name}) = %{version}
19+
20+
%description
21+
A password generation gem for Ruby and Rails applications.
22+
23+
24+
%package doc
25+
Summary: Documentation for %{name}
26+
Group: Documentation
27+
Requires: %{name} = %{version}-%{release}
28+
BuildArch: noarch
29+
30+
%description doc
31+
Documentation for %{name}.
32+
33+
%prep
34+
gem unpack %{SOURCE0}
35+
36+
%setup -q -D -T -n %{gem_name}-%{version}
37+
38+
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
39+
40+
%build
41+
# Create the gem as gem install only works on a gem file
42+
gem build %{gem_name}.gemspec
43+
44+
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
45+
# by default, so that we can move it into the buildroot in %%install
46+
%gem_install
47+
48+
%install
49+
mkdir -p %{buildroot}%{gem_dir}
50+
cp -a .%{gem_dir}/* \
51+
%{buildroot}%{gem_dir}/
52+
53+
%files
54+
%dir %{gem_instdir}
55+
%{gem_instdir}/Manifest
56+
%{gem_instdir}/init.rb
57+
%{gem_libdir}
58+
%exclude %{gem_instdir}/passgen.gemspec
59+
%exclude %{gem_cache}
60+
%{gem_spec}
61+
62+
%files doc
63+
%doc %{gem_docdir}
64+
%doc %{gem_instdir}/CHANGELOG
65+
%doc %{gem_instdir}/README.rdoc
66+
%{gem_instdir}/Rakefile
67+
%{gem_instdir}/spec
68+
69+
%changelog
+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
%global gem_name radcli
2+
3+
Name: rubygem-%{gem_name}
4+
Version: 0.1.0
5+
Release: 1%{?dist}
6+
Summary: A Ruby interface for the adcli library
7+
Group: Development/Languages
8+
License: Artistic-2.0
9+
URL: http://github.com/martencassel/radcli
10+
Source0: %{gem_name}-%{version}.gem
11+
Requires: ruby(release)
12+
Requires: ruby
13+
Requires: ruby(rubygems)
14+
BuildRequires: ruby(release)
15+
BuildRequires: ruby-devel
16+
BuildRequires: rubygems-devel
17+
BuildRequires: krb5-devel
18+
BuildRequires: openldap-devel
19+
BuildRequires: cyrus-sasl-devel
20+
Provides: rubygem(%{gem_name}) = %{version}
21+
22+
%description
23+
The radcli library provides a Ruby interface for performing actions on
24+
a Active Directory domain using the realmd/adcli tool library.
25+
26+
27+
%package doc
28+
Summary: Documentation for %{name}
29+
Group: Documentation
30+
Requires: %{name} = %{version}-%{release}
31+
BuildArch: noarch
32+
33+
%description doc
34+
Documentation for %{name}.
35+
36+
%prep
37+
gem unpack %{SOURCE0}
38+
39+
%setup -q -D -T -n %{gem_name}-%{version}
40+
41+
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
42+
43+
%build
44+
# Create the gem as gem install only works on a gem file
45+
gem build %{gem_name}.gemspec
46+
47+
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
48+
# by default, so that we can move it into the buildroot in %%install
49+
%gem_install
50+
51+
%install
52+
mkdir -p %{buildroot}%{gem_dir}
53+
cp -a .%{gem_dir}/* \
54+
%{buildroot}%{gem_dir}/
55+
56+
mkdir -p %{buildroot}%{gem_extdir_mri}/lib
57+
#cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
58+
cp -a %{buildroot}%{gem_instdir}/lib/radcli.so %{buildroot}%{gem_extdir_mri}/lib/
59+
60+
# rake-compiler isn't needed on the system itself
61+
sed -i '/rake-compiler/ s/runtime/development/' %{buildroot}/%{gem_spec}
62+
63+
# Prevent dangling symlink in -debuginfo (rhbz#878863).
64+
rm -rf %{buildroot}%{gem_instdir}/ext/
65+
66+
%files
67+
%dir %{gem_instdir}
68+
%{gem_extdir_mri}
69+
%{gem_instdir}/CHANGES
70+
%license %{gem_instdir}/LICENSE
71+
%{gem_instdir}/MANIFEST
72+
%{gem_instdir}/build_adcli.sh
73+
%exclude %{gem_instdir}/radcli.gemspec
74+
%{gem_instdir}/scripts
75+
%{gem_instdir}/lib
76+
%exclude %{gem_cache}
77+
%{gem_spec}
78+
79+
%files doc
80+
%doc %{gem_docdir}
81+
%doc %{gem_instdir}/README.md
82+
%{gem_instdir}/Rakefile
83+
%{gem_instdir}/test
84+
85+
%changelog
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
%global gem_name smart_proxy_realm_ad_plugin
2+
%global plugin_name realm_ad_plugin
3+
4+
%global foreman_proxy_dir %{_datarootdir}/foreman-proxy
5+
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
6+
%global foreman_proxy_settingsd_dir %{_sysconfdir}/foreman-proxy/settings.d
7+
8+
Name: rubygem-%{gem_name}
9+
Version: 0.1
10+
Release: 1%{?foremandist}%{?dist}
11+
Summary: A realm ad provider plugin for Foreman's smart proxy
12+
Group: Applications/Internet
13+
License: GPL-3.0
14+
URL: https://github.com/martencassel/smart_proxy_realm_ad_plugin
15+
Source0: %{gem_name}-%{version}.gem
16+
Requires: foreman-proxy >= 1.15
17+
Requires: ruby(release)
18+
Requires: ruby
19+
Requires: ruby(rubygems)
20+
Requires: rubygem(passgen)
21+
Requires: rubygem(rkerberos)
22+
Requires: rubygem(radcli)
23+
BuildRequires: ruby(release)
24+
BuildRequires: ruby
25+
BuildRequires: rubygems-devel
26+
BuildArch: noarch
27+
Provides: rubygem(%{gem_name}) = %{version}
28+
Provides: foreman-proxy-plugin-%{plugin_name}
29+
30+
%description
31+
A realm ad provider plugin for Foreman's smart proxy.
32+
33+
34+
%package doc
35+
Summary: Documentation for %{name}
36+
Group: Documentation
37+
Requires: %{name} = %{version}-%{release}
38+
BuildArch: noarch
39+
40+
%description doc
41+
Documentation for %{name}.
42+
43+
%prep
44+
gem unpack %{SOURCE0}
45+
46+
%setup -q -D -T -n %{gem_name}-%{version}
47+
48+
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
49+
50+
%build
51+
# Create the gem as gem install only works on a gem file
52+
gem build %{gem_name}.gemspec
53+
54+
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
55+
# by default, so that we can move it into the buildroot in %%install
56+
%gem_install
57+
58+
%install
59+
mkdir -p %{buildroot}%{gem_dir}
60+
cp -a .%{gem_dir}/* \
61+
%{buildroot}%{gem_dir}/
62+
63+
# bundler file
64+
mkdir -p %{buildroot}%{foreman_proxy_bundlerd_dir}
65+
mv %{buildroot}%{gem_instdir}/bundler.d/%{plugin_name}.rb \
66+
%{buildroot}%{foreman_proxy_bundlerd_dir}
67+
68+
# sample config
69+
mkdir -p %{buildroot}%{foreman_proxy_settingsd_dir}
70+
mv %{buildroot}%{gem_instdir}/config/realm_ad.yml.example \
71+
%{buildroot}%{foreman_proxy_settingsd_dir}/realm_ad.yml
72+
73+
%files
74+
%dir %{gem_instdir}
75+
%config(noreplace) %attr(0640, root, foreman-proxy) %{foreman_proxy_settingsd_dir}/realm_ad.yml
76+
%license %{gem_instdir}/LICENSE
77+
%{gem_instdir}/bundler.d
78+
%{gem_instdir}/config
79+
%{gem_libdir}
80+
%{foreman_proxy_bundlerd_dir}/%{plugin_name}.rb
81+
%exclude %{gem_cache}
82+
%{gem_spec}
83+
84+
%files doc
85+
%doc %{gem_docdir}
86+
%doc %{gem_instdir}/README.md
87+
%{gem_instdir}/test
88+
89+
%changelog

0 commit comments

Comments
 (0)