David Brown 84cf368
%if 0%{?rhel} <= 5
David Brown 84cf368
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
David Brown 84cf368
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
David Brown 84cf368
%endif
David Brown 84cf368
David Brown 84cf368
Name:    genders
David Brown 84cf368
Group: Development/Tools
David Brown a8ddb06
Version: 1.22
1263e52
Release: 16%{?dist}
David Brown 84cf368
Summary: Static cluster configuration database
David Brown 84cf368
License: GPLv2
David Brown 84cf368
URL: http://%{name}.sf.net
David Brown 84cf368
Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}-1/%{name}-%{version}.tar.gz
08c622e
Patch0: %{name}-1.18-shebang.patch
David Brown 99fcaef
Patch1: %{name}-1.22-javadoc.patch
David Brown b84f4d6
BuildRequires: bison, flex, autoconf
David Brown 84cf368
David Brown 84cf368
%description
David Brown 84cf368
Genders is a static cluster configuration database used for cluster
David Brown 84cf368
configuration management.  It is used by a variety of tools and
David Brown 84cf368
scripts for management of large clusters.  The genders database is
David Brown 84cf368
typically replicated on every node of the cluster. It describes the
David Brown 84cf368
layout and configuration of the cluster so that tools and scripts can
David Brown 84cf368
sense the variations of cluster nodes. By abstracting this information
David Brown 84cf368
into a plain text file, it becomes possible to change the
David Brown 84cf368
configuration of a cluster by modifying only one file.
David Brown 84cf368
David Brown 84cf368
%package compat
David Brown 84cf368
Summary: Compatibility library 
David Brown 84cf368
Group: Development/Tools
6135080
BuildRequires: perl-devel
6135080
BuildRequires: perl-generators
David Brown 84cf368
BuildRequires: perl(ExtUtils::MakeMaker)
David Brown 84cf368
%if 0%{?rhel} >= 6 || 0%{?fedora} > 0
David Brown 84cf368
BuildArch: noarch
David Brown 84cf368
%endif
David Brown 84cf368
%description compat
David Brown 84cf368
Genders API that is compatible with earlier releases of genders.
David Brown 84cf368
David Brown 84cf368
%package perl
David Brown 84cf368
Summary: Perl libraries
David Brown 84cf368
Group: Development/Tools
David Brown 1c1c645
BuildRequires: perl(ExtUtils::MakeMaker), perl(Config)
David Brown 84cf368
%description perl
David Brown 84cf368
Genders API bindings for perl.
David Brown 84cf368
David Brown 5c04f60
%package javadoc
David Brown 5c04f60
Summary: Java Documentation
David Brown 5c04f60
Group: Development/Tools
David Brown 5c04f60
BuildRequires: java-devel
David Brown 5c04f60
%description javadoc
David Brown 5c04f60
Genders API Documentation for java.
David Brown 5c04f60
David Brown 5f80177
%package java-devel
David Brown 5f80177
Summary: Java Development libraries
David Brown 5f80177
Group: Development/Tools
David Brown 5f80177
Requires: %{name}-java%{?_isa} = %{version}-%{release}
David Brown 5f80177
%description java-devel
David Brown 5f80177
Genders API bindings for java.
David Brown 5f80177
David Brown de7d490
%package java
David Brown de7d490
Summary: Java libraries
David Brown de7d490
Group: Development/Tools
David Brown de7d490
BuildRequires: java-devel
David Brown de7d490
%description java
David Brown de7d490
Genders API bindings for java.
David Brown de7d490
fd9922f
%package -n python2-genders
fd9922f
%{?python_provide:%python_provide python2-genders}
fd9922f
# Remove before F30
fe0befd
Provides: %{name}-python = %{version}-%{release}
fd9922f
Provides: %{name}-python%{?_isa} = %{version}-%{release}
fd9922f
Obsoletes: %{name}-python < %{version}-%{release}
David Brown 84cf368
Summary: Python libraries
David Brown 84cf368
Group: Development/Tools
David Brown 84cf368
BuildRequires: python, python-devel
fd9922f
%description -n python2-genders
David Brown 84cf368
Genders API bindings for python.
David Brown 84cf368
David Brown 84cf368
%{?filter_setup:
David Brown 84cf368
%filter_provides_in %{python_sitearch}/.*\.so$
David Brown 84cf368
%filter_provides_in %{perl_vendorarch}/.*\.so$
David Brown 84cf368
%filter_setup
David Brown 84cf368
}
David Brown 84cf368
David Brown 84cf368
%package -n libgenders
David Brown 84cf368
Summary: Genders libraries
David Brown 84cf368
Group: Development/Libraries
David Brown 84cf368
%description -n libgenders
David Brown 84cf368
Genders API for C.
David Brown 84cf368
David Brown 84cf368
%package -n libgenders-devel
David Brown 84cf368
Summary: Genders development libraries
David Brown 84cf368
Group: Development/Libraries
David Brown 84cf368
Requires: libgenders%{?_isa} = %{version}-%{release}
David Brown 84cf368
%description -n libgenders-devel
David Brown 84cf368
Genders development headers and libraries for C.
David Brown 84cf368
David Brown 84cf368
%package -n libgendersplusplus
David Brown 84cf368
Summary: Genders libraries for C++
David Brown 84cf368
Group: Development/Libraries
David Brown 84cf368
Requires: libgenders%{?_isa} = %{version}-%{release}
David Brown 84cf368
%description -n libgendersplusplus
David Brown 84cf368
Genders API for C++.
David Brown 84cf368
David Brown 84cf368
%package -n libgendersplusplus-devel
David Brown 84cf368
Summary: Genders development libraries
David Brown 84cf368
Group: Development/Libraries
David Brown 84cf368
Requires: libgenders-devel%{?_isa} = %{version}-%{release}
David Brown 84cf368
Requires: libgendersplusplus%{?_isa} = %{version}-%{release}
David Brown 84cf368
%description -n libgendersplusplus-devel
David Brown 84cf368
Genders development headers and libraries for C++.
David Brown 84cf368
David Brown 84cf368
%prep
David Brown 84cf368
%setup  -q -n %{name}-%{version}
David Brown 84cf368
%patch0 -p1
David Brown c625c99
%patch1 -p1
David Brown 84cf368
David Brown 84cf368
%if 0%{?rhel} <= 6
David Brown 84cf368
cat << \EOF > %{name}-python-prov
David Brown 84cf368
#!/bin/sh
David Brown 84cf368
%{__python_provides} $* |\
David Brown 84cf368
sed -e '/.*Lib%{name}.so.*/d'
David Brown 84cf368
EOF
David Brown 84cf368
David Brown 84cf368
%global __python_provides %{_builddir}/%{name}-%{version}/%{name}-python-prov
David Brown 84cf368
chmod +x %{__python_provides}
David Brown 84cf368
David Brown 84cf368
cat << \EOF > %{name}-perl-prov
David Brown 84cf368
#!/bin/sh
David Brown 84cf368
%{__perl_provides} $* |\
David Brown 84cf368
sed -e '/.*Lib%{name}.so.*/d'
David Brown 84cf368
EOF
David Brown 84cf368
David Brown 84cf368
%global __perl_provides %{_builddir}/%{name}-%{version}/%{name}-perl-prov
David Brown 84cf368
chmod +x %{__perl_provides}
David Brown 84cf368
%endif
David Brown 84cf368
David Brown 84cf368
%build
David Brown 5c04f60
export CPPFLAGS='-I/usr/lib/jvm/java/include -I/usr/lib/jvm/java/include/linux -I../../../src/libgenders'
David Brown 84cf368
%configure \
David Brown 84cf368
    --with-perl-extensions \
David Brown 84cf368
    --with-perl-vendor-arch \
David Brown 84cf368
    --with-python-extensions \
David Brown 84cf368
    --with-cplusplus-extensions \
David Brown 84cf368
    --with-extension-destdir="%{buildroot}"
David Brown 84cf368
%{__make}
David Brown 84cf368
David Brown 84cf368
%install
David Brown 84cf368
rm -rf %{buildroot}
David Brown 84cf368
DESTDIR=%{buildroot} make install
David Brown 84cf368
rm -f %{buildroot}/%{_libdir}/*.la
David Brown 84cf368
rm -f %{buildroot}/%{_libdir}/*.a
David Brown 84cf368
chmod +w %{buildroot}/%{perl_vendorarch}/auto/Lib%{name}/Lib%{name}.so
David Brown 84cf368
%if 0%{?rhel} > 0
David Brown 84cf368
chmod g-w %{buildroot}/%{python_sitearch}/lib%{name}.so
David Brown 84cf368
%endif
David Brown 84cf368
rm -f %{buildroot}/%{perl_vendorarch}/auto/Lib%{name}/Lib%{name}.bs
David Brown 84cf368
rm -f %{buildroot}/%{perl_vendorarch}/auto/Lib%{name}/.packlist
David Brown 84cf368
mkdir -p %{buildroot}/%{_libexecdir}
David Brown 84cf368
chmod 0755 %{buildroot}/%{python_sitearch}/lib%{name}.so
David Brown 84cf368
David Brown 5c04f60
mkdir -p %{buildroot}/%{_jnidir}
David Brown 46ab994
%if 0%{?rhel} == 5
David Brown 46ab994
%define _datarootdir %{_prefix}/share
David Brown 46ab994
%endif
David Brown 5c04f60
mv %{buildroot}/%{_datarootdir}/java/Genders.jar %{buildroot}/%{_jnidir}/
David Brown 5c04f60
David Brown 84cf368
%postun -n libgenders -p /sbin/ldconfig
David Brown 84cf368
%postun -n libgendersplusplus -p /sbin/ldconfig
David Brown 5f80177
%postun -n genders-java -p /sbin/ldconfig
David Brown 84cf368
%post -n libgenders -p /sbin/ldconfig
David Brown 84cf368
%post -n libgendersplusplus -p /sbin/ldconfig
David Brown 5f80177
%post -n genders-java -p /sbin/ldconfig
David Brown 84cf368
David Brown 84cf368
%if 0%{?rhel} <= 6
David Brown 84cf368
%clean
David Brown 84cf368
rm -rf %{buildroot}
David Brown 84cf368
%endif
David Brown 84cf368
David Brown 84cf368
%files
David Brown 84cf368
%defattr(-,root,root,-)
David Brown 84cf368
%doc README NEWS ChangeLog DISCLAIMER DISCLAIMER.UC COPYING TUTORIAL genders.sample
David Brown 84cf368
%{_mandir}/man1/*
David Brown 84cf368
%{_mandir}/man3/genders.3*
David Brown 84cf368
%{_bindir}/*
David Brown 84cf368
David Brown 84cf368
%files -n libgenders
David Brown 84cf368
%defattr(-,root,root,-)
David Brown 84cf368
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 84cf368
%{_libdir}/libgenders.so.0*
David Brown 224154c
%{_mandir}/man3/libgenders.3*
David Brown 84cf368
David Brown 84cf368
%files -n libgenders-devel
David Brown 84cf368
%defattr(-,root,root,-)
David Brown 84cf368
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 84cf368
%{_mandir}/man3/genders_*
David Brown 84cf368
%{_includedir}/genders.h
David Brown 84cf368
%{_libdir}/libgenders.so
David Brown 84cf368
David Brown 84cf368
%files -n libgendersplusplus
David Brown 84cf368
%defattr(-,root,root,-)
David Brown 84cf368
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 5c04f60
%{_libdir}/libgendersplusplus.so.2*
David Brown 84cf368
David Brown 84cf368
%files -n libgendersplusplus-devel
David Brown 84cf368
%defattr(-,root,root,-)
David Brown 84cf368
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 84cf368
%{_libdir}/libgendersplusplus.so
David Brown 84cf368
%{_includedir}/gendersplusplus*
David Brown 84cf368
David Brown 84cf368
%files perl
David Brown 84cf368
%defattr(-,root,root,-)
David Brown 84cf368
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 84cf368
%{_mandir}/man3/Libgenders*
David Brown 84cf368
%{_mandir}/man3/Genders*
David Brown 84cf368
%{perl_vendorarch}/*
David Brown 84cf368
David Brown 5f80177
%files java-devel
David Brown 5f80177
%defattr(-,root,root,-)
David Brown 5f80177
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 5f80177
%{_libdir}/libGendersjni.so
David Brown 5f80177
David Brown de7d490
%files java
David Brown de7d490
%defattr(-,root,root,-)
David Brown de7d490
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 5f80177
%{_libdir}/libGendersjni.so.*
David Brown 5c04f60
%{_jnidir}/Genders.jar
David Brown 5c04f60
David Brown 5c04f60
%files javadoc
David Brown 5c04f60
%defattr(-,root,root,-)
David Brown 5c04f60
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 5c04f60
%{_docdir}/%{name}-%{version}-javadoc
David Brown de7d490
fd9922f
%files -n python2-genders
David Brown 84cf368
%defattr(-,root,root,-)
David Brown 84cf368
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 84cf368
%{python_sitearch}/%{name}.py*
David Brown 84cf368
%{python_sitearch}/lib%{name}.so
David Brown 868125b
%if 0%{?rhel}%{?fedora} > 5
David Brown 84cf368
%{python_sitearch}/lib%{name}-*egg-info
David Brown 868125b
%endif
David Brown 84cf368
David Brown 84cf368
%files compat
David Brown 84cf368
%defattr(-,root,root,-)
David Brown 84cf368
%doc DISCLAIMER DISCLAIMER.UC COPYING 
David Brown 84cf368
%{_mandir}/man3/gendlib*
David Brown 84cf368
%{_usr}/lib/genders/*
David Brown 84cf368
David Brown 84cf368
%changelog
1263e52
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.22-16
1263e52
- Escape macros in %%changelog
1263e52
969faa1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-15
969faa1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
969faa1
fe0befd
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.22-14
fe0befd
- Add Provides for the old name without %%_isa
fe0befd
fd9922f
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.22-13
fd9922f
- Python 2 binary package renamed to python2-genders
fd9922f
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
fd9922f
e6f12e0
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-12
e6f12e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
e6f12e0
fb853b8
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-11
fb853b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
fb853b8
Igor Gnatenko 2d15c50
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.22-10
Igor Gnatenko 2d15c50
- Rebuild due to bug in RPM (RHBZ #1468476)
Igor Gnatenko 2d15c50
8c28440
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.22-9
8c28440
- Perl 5.26 rebuild
8c28440
248d111
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-8
248d111
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
248d111
27f1b37
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.22-7
27f1b37
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
27f1b37
75facca
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.22-6
75facca
- Perl 5.24 rebuild
75facca
aed3732
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-5
aed3732
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
aed3732
602be5c
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.22-4
602be5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
602be5c
82e267f
* Fri Jun 05 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.22-3
82e267f
- Perl 5.22 rebuild
82e267f
David Brown 24c7e7e
* Tue May 19 2015 David Brown <david.brown@pnnl.gov> - 1.22-2
David Brown 224154c
- Bugfix make libgenders man page part of libgenders (#1220093)
David Brown 224154c
David Brown a8ddb06
* Sat May 2 2015 David Brown <david.brown@pnnl.gov> - 1.22-1
David Brown a8ddb06
- new upstream build
David Brown c625c99
- fix bugzilla #1217007
David Brown a8ddb06
f091565
* Tue Aug 26 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-3
f091565
- Perl 5.20 rebuild
f091565
bf89593
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.21-2
bf89593
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
bf89593
David Brown 5c04f60
* Mon Jul 07 2014 David Brown <david.brown@pnnl.gov> - 1.21-1
David Brown 5c04f60
- New updated version
David Brown 5c04f60
- Wow, they have java bindings now
David Brown 5c04f60
d166bb1
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.20-7
d166bb1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d166bb1
a678627
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.20-6
a678627
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a678627
e0bd460
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 1.20-5
e0bd460
- Perl 5.18 rebuild
e0bd460
David Brown 46bc222
* Tue Mar 26 2013 David Brown <david.brown@pnnl.gov> - 1.20-4
David Brown 46bc222
* added autoconf to build depends just to be safe
David Brown 46bc222
David Brown b341e4e
* Mon Mar 25 2013 David Brown <david.brown@pnnl.gov> - 1.20-3
David Brown b341e4e
- autoreconf so aarch64 will work on f19
David Brown 46bc222
- add perl(Config) for build depends
David Brown b341e4e
19ccf03
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.20-2
19ccf03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
19ccf03
5640372
* Thu Aug 16 2012 David Brown <david.brown@pnnl.gov> - 1.20-1
5640372
- New Upstream Version
5640372
4b01502
* Fri Aug 10 2012 David Brown <david.brown@pnnl.gov> - 1.18-9
4b01502
- got a better patch from upstream
4b01502
e2bcbe2
* Fri Aug 10 2012 David Brown <david.brown@pnnl.gov> - 1.18-8
e2bcbe2
- Patched an import bug not finding SystemError class
e2bcbe2
63772aa
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.18-7
63772aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
63772aa
David Brown 868125b
* Sat Jul 14 2012 David Brown <david.brown@pnnl.gov> - 1.18-6
David Brown 868125b
- python egginfo files don't exist on el5
David Brown 868125b
David Brown 5f80177
* Fri Jul 06 2012 David Brown <david.brown@pnnl.gov> - 1.18-5
David Brown 84cf368
- change mode on python shared objects
David Brown 84cf368
David Brown 5f80177
* Thu Jul 05 2012 David Brown <david.brown@pnnl.gov> - 1.18-4
David Brown 84cf368
- move compat stuff back to hard coded lib directory
David Brown 84cf368
- remove parallel build doesn't work with yacc deps
David Brown 84cf368
David Brown 84cf368
* Thu Apr 12 2012 David Brown <david.brown@pnnl.gov> - 1.18-3
David Brown 84cf368
- Add some Groups for EPEL 5/6 repos
David Brown 84cf368
- Fix up Changelogs to add spaces
David Brown 84cf368
David Brown 84cf368
* Wed Apr 11 2012 David Brown <david.brown@pnnl.gov> - 1.18-2
David Brown 84cf368
- Followed advice from bugzilla
David Brown 84cf368
- Used proper BuildRoot tag
David Brown 84cf368
- Removed superfluous '.' from end of descriptions
David Brown 84cf368
- Fixed Requires by adding release and _isa
1263e52
- Changed out RPM_BUILD_ROOT for %%{buildroot}
David Brown 84cf368
- Added four argument defattr lines in files sections
David Brown 84cf368
David Brown 84cf368
* Mon Apr 9 2012 David Brown <david.brown@pnnl.gov> - 1.18-1
David Brown 84cf368
- initial packaging
David Brown 84cf368