[remctl/el5: 2/2] Add PHP, Python, and Ruby bindings

Ken Dreyer ktdreyer at fedoraproject.org
Tue Sep 4 12:12:19 UTC 2012


commit 83dcb19a1dbd2753e30fffaa13f1fa98f1d3aaf8
Author: Ken Dreyer <ktdreyer at ktdreyer.com>
Date:   Mon Sep 3 19:36:28 2012 -0600

    Add PHP, Python, and Ruby bindings
    
    Also, drop Perl vendor patch and set REMCTL_PERL_FLAGS instead.

 remctl-2.11-vendor.patch |    8 ---
 remctl.spec              |  108 +++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 101 insertions(+), 15 deletions(-)
---
diff --git a/remctl.spec b/remctl.spec
index e39acf4..24e47e7 100644
--- a/remctl.spec
+++ b/remctl.spec
@@ -1,16 +1,38 @@
 Name: remctl
 Version: 3.2
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: Client/server for Kerberos-authenticated command execution
 
 Group: Applications/Internet
 License: MIT
 URL: http://www.eyrie.org/~eagle/software/remctl
 Source0: http://archives.eyrie.org/software/kerberos/remctl-%{version}.tar.gz
-Patch0: remctl-2.11-vendor.patch
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
-BuildRequires: krb5-devel perl perl(ExtUtils::MakeMaker)
+BuildRequires: krb5-devel
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: php-devel
+BuildRequires: python2-devel
+%if 0%{?rhel} && 0%{?rhel} <= 6
+BuildRequires: ruby
+BuildRequires: ruby(abi) = 1.8
+%endif
+BuildRequires: ruby-devel
+
+# RHEL 5 compatibility for Python
+%if 0%{?el5}
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+
+# RHEL 5/6 compatibility for Ruby
+%if 0%{?el5}
+%{!?ruby_vendorarchdir: %global ruby_vendorarchdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
+%endif
+%if 0%{?el6}
+%{!?ruby_vendorarchdir: %global ruby_vendorarchdir %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"] ')}
+%endif
+
 
 %description
 
@@ -42,20 +64,71 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 %description perl
 remctl implements a client/server protocol for running single commands 
 on a remote host using Kerberos v5 authentication. If you want to use
-remctl's perl bindings, you need to install this package.
+remctl's Perl bindings, you need to install this package.
+
+%package php
+Summary: PHP interface to remctl
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: php(zend-abi) = %{php_zend_api}
+Requires: php(api) = %{php_core_api}
+
+%description php
+remctl implements a client/server protocol for running single commands
+on a remote host using Kerberos v5 authentication. If you want to use
+remctl's PHP bindings, you need to install this package.
+
+%package python
+Summary: Python interface to remctl
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: python
+
+%description python
+remctl implements a client/server protocol for running single commands
+on a remote host using Kerberos v5 authentication. If you want to use
+remctl's Python bindings, you need to install this package.
+
+%package ruby
+Summary: Ruby interface to remctl
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+%if 0%{?rhel} && 0%{?rhel} <= 6
+Requires: ruby(abi) = 1.8
+%else
+Requires: ruby(abi) = 1.9.1
+%endif
+Provides: ruby(remctl) = %{version}-%{release}
+
+%description ruby
+remctl implements a client/server protocol for running single commands
+on a remote host using Kerberos v5 authentication. If you want to use
+remctl's Ruby bindings, you need to install this package.
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
-%configure --enable-perl --disable-static
+export REMCTL_PERL_FLAGS="INSTALLDIRS=vendor"
+%configure \
+	--enable-perl \
+	--enable-php \
+	--enable-python \
+	--enable-ruby \
+	--disable-static
 make
+# Parallel builds are currently broken but hopefully fixed upstream.
+# (Commit 5127bef5f3e771e3f142dc84ae88879eddc40a41)
+# That should land in remctl > 3.2.
+#make %%{?_smp_mflags}
 
 
 %install
 rm -rf %{buildroot}
-make install DESTDIR=%{buildroot} INSTALL="install -p"
+make install \
+	DESTDIR=%{buildroot} \
+	INSTALL="install -p" \
+	RUBYARCHDIR="%{buildroot}%{ruby_vendorarchdir}"
 
 chmod 0755 %{buildroot}%{perl_vendorarch}/auto/Net/Remctl/Remctl.so
 chmod 0644 %{buildroot}%{perl_vendorarch}/Net/Remctl.pm
@@ -98,7 +171,28 @@ rm -rf %{buildroot}
 %{perl_vendorarch}/auto/Net
 %{_mandir}/man3/Net::Remctl*
 
+%files php
+%defattr(-,root,root,-)
+%{php_extdir}/remctl.so
+
+%files python
+%defattr(-,root,root,-)
+%{python_sitearch}/_remctl.so
+%{python_sitearch}/remctl.py
+%{python_sitearch}/remctl.pyc
+%{python_sitearch}/remctl.pyo
+%{!?el5: %{python_sitearch}/pyremctl-%{version}-*.egg-info}
+
+%files ruby
+%defattr(-,root,root,-)
+%{ruby_vendorarchdir}/remctl.so
+
+
 %changelog
+* Mon Sep 03 2012 Ken Dreyer <ktdreyer at ktdreyer.com> - 3.2-4
+- Add PHP, Python, and Ruby bindings
+- Drop separate Perl "vendor" patch in favor of using REMCTL_PERL_FLAGS
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list