# define ruby directories %define ruby_archdir %(ruby -rrbconfig -e 'print RbConfig::CONFIG["archdir"]') %define ruby_libdir %(ruby -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"]') %define ruby_sitearchdir %(ruby -rrbconfig -e 'print RbConfig::CONFIG["sitearchdir"]') %define ruby_sitelibdir %(ruby -rrbconfig -e 'print RbConfig::CONFIG["sitelibdir"]') %define ruby_vendorarchdir %(ruby -rrbconfig -e 'print RbConfig::CONFIG["vendorarchdir"]') %define ruby_vendorlibdir %(ruby -rrbconfig -e 'print RbConfig::CONFIG["vendorlibdir"]') %define ruby_gemdir %(ruby -rrbconfig -e 'print RbConfig::CONFIG["rubygemsdir"]') %define ruby_ridir %(ruby -rrbconfig -e 'print RbConfig::CONFIG["ridir"]') Name: ruby-ldap Version: 0.9.10 Release: 1 Summary: Ruby LDAP libraries Group: Development/Languages License: BSD URL: http://rubyforge.org/projects/ruby-ldap Source0: http://rubyforge.org/frs/download.php/68853/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: openldap-devel >= 2.4.23 BuildRequires: openssl-devel >= 1.0.1 BuildRequires: ruby-devel >= 2.0.0 Requires: openldap >= 2.4.23 Requires: openssl >= 1.0.1 Requires: ruby >= 2.0.0 Provides: ruby(ldap) = %{version}-%{release} %description Ruby/LDAP is an extension library for Ruby. It provides the interface to some LDAP libraries (e.g. OpenLDAP, UMich LDAP, Netscape SDK, ActiveDirectory). The common API for application development is described in RFC1823 and is supported by Ruby/LDAP. %prep %setup -q find example/ -type f | xargs %{__chmod} 0644 %build ruby extconf.rb --vendor make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{ruby_vendorarchdir}/ldap.so || : %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc TODO README ChangeLog example FAQ # for noarch packages: ruby_vendorlibdir %{ruby_vendorlibdir}/ldap # for arch-specific packages: ruby_vendorarchdir %{ruby_vendorarchdir}/ldap.so %changelog * Thu Jul 25 2013 Michael Perzl - 0.9.10-1 - first version for AIX V5.1 and higher