Accepting request 571579 from home:jengelh:branches:network:cluster
- There is already a macro for name, do not reinvent it. - Replace old $RPM_* shell vars. - %if blocks must surround %files because empty packages are not allowed. OBS-URL: https://build.opensuse.org/request/show/571579 OBS-URL: https://build.opensuse.org/package/show/network:cluster/genders?expand=0&rev=7
This commit is contained in:
parent
92ad122396
commit
ebd75f117d
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 1 00:19:45 UTC 2018 - jengelh@inai.de
|
||||||
|
|
||||||
|
- There is already a macro for name, do not reinvent it.
|
||||||
|
- Replace old $RPM_* shell vars.
|
||||||
|
- %if blocks must surround %files because empty packages are
|
||||||
|
not allowed.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 31 13:42:28 UTC 2018 - cgoll@suse.com
|
Wed Jan 31 13:42:28 UTC 2018 - cgoll@suse.com
|
||||||
|
|
||||||
|
79
genders.spec
79
genders.spec
@ -16,18 +16,17 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define pname genders
|
|
||||||
# Check file META in sources: update so_version to (API_CURRENT - API_AGE)
|
# Check file META in sources: update so_version to (API_CURRENT - API_AGE)
|
||||||
%define c_api 0
|
%define c_api 0
|
||||||
%define cpp_api 2
|
%define cpp_api 2
|
||||||
|
|
||||||
Name: %{pname}
|
Name: genders
|
||||||
Version: 1.22
|
Version: 1.22
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Static cluster configuration database
|
Summary: Static cluster configuration database
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Group: System/Management
|
Group: System/Management
|
||||||
Source: https://github.com/chaos/genders/releases/download/genders-1-22-1/%{pname}-%{version}.tar.gz
|
Source: https://github.com/chaos/genders/releases/download/genders-1-22-1/%{name}-%{version}.tar.gz
|
||||||
Patch1: Fix-Python-package-installation-use-root.patch
|
Patch1: Fix-Python-package-installation-use-root.patch
|
||||||
Patch2: Remove-PERL_DESTDIR-use-DESTDIR-instead.patch
|
Patch2: Remove-PERL_DESTDIR-use-DESTDIR-instead.patch
|
||||||
Patch3: Remove-all-remains-of-EXTENSION_DESTDIR.patch
|
Patch3: Remove-all-remains-of-EXTENSION_DESTDIR.patch
|
||||||
@ -53,54 +52,54 @@ sense the variations of cluster nodes. By abstracting this information
|
|||||||
into a plain text file, it becomes possible to change the
|
into a plain text file, it becomes possible to change the
|
||||||
configuration of a cluster by modifying only one file.
|
configuration of a cluster by modifying only one file.
|
||||||
|
|
||||||
%package -n %{pname}-perl-compat
|
%package perl-compat
|
||||||
Summary: Perl compatibility Library
|
Summary: Perl compatibility Library
|
||||||
Group: Development/Languages/Perl
|
Group: Development/Languages/Perl
|
||||||
|
|
||||||
%description -n %{pname}-perl-compat
|
%description -n %{name}-perl-compat
|
||||||
Perl genders API for the most part used exclusively by LLNL. It is compatible with earlier releases of genders.
|
Perl genders API for the most part used exclusively by LLNL. It is compatible with earlier releases of genders.
|
||||||
|
|
||||||
%package -n %{pname}-devel
|
%package devel
|
||||||
Summary: Headers and development files
|
Summary: Headers and development files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{pname} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
%description -n %{pname}-devel
|
%description devel
|
||||||
genders headers and libraries files needed for development
|
genders headers and libraries files needed for development
|
||||||
|
|
||||||
%package -n python-%{pname}
|
%package -n python-%{name}
|
||||||
Summary: Python bindings for genders
|
Summary: Python bindings for genders
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Requires: %{pname} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: python
|
Requires: python
|
||||||
|
|
||||||
%description -n python-%{pname}
|
%description -n python-%{name}
|
||||||
Necessary files for using genders with python
|
Necessary files for using genders with Python.
|
||||||
|
|
||||||
%package -n perl-%{pname}
|
%package -n perl-%{name}
|
||||||
Summary: Perl bindings for genders
|
Summary: Perl bindings for genders
|
||||||
Group: Development/Languages/Perl
|
Group: Development/Languages/Perl
|
||||||
Requires: %{pname} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: perl-base = %{perl_version}
|
Requires: perl-base = %{perl_version}
|
||||||
|
|
||||||
%description -n perl-%{pname}
|
%description -n perl-%{name}
|
||||||
Necessary files for using genders with perl
|
Necessary files for using genders with Perl.
|
||||||
|
|
||||||
%package -n lib%{pname}%{c_api}
|
%package -n lib%{name}%{c_api}
|
||||||
Summary: Libraries for genders for C
|
Summary: C library API for genders
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
|
||||||
%description -n lib%{pname}%{c_api}
|
%description -n lib%{name}%{c_api}
|
||||||
This package contains the library needed to run programs dynamically linked
|
This package contains the library needed to run programs dynamically linked
|
||||||
with genders. This is the C api.
|
with genders. This is the C API.
|
||||||
|
|
||||||
%package -n lib%{pname}plusplus%{cpp_api}
|
%package -n lib%{name}plusplus%{cpp_api}
|
||||||
Summary: Libraries for genders for C++
|
Summary: C++ library API for genders
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
|
||||||
%description -n lib%{pname}plusplus%{cpp_api}
|
%description -n lib%{name}plusplus%{cpp_api}
|
||||||
This package contains the library needed to run programs dynamically linked
|
This package contains the library needed to run programs dynamically linked
|
||||||
with genders. This is the C++ api.
|
with genders. This is the C++ API.
|
||||||
|
|
||||||
%{!?_with_perl_extensions: %{!?_without_perl_extensions: %global _with_perl_extensions --with-perl-extensions}}
|
%{!?_with_perl_extensions: %{!?_without_perl_extensions: %global _with_perl_extensions --with-perl-extensions}}
|
||||||
%{!?_with_python_extensions: %{!?_without_python_extensions: %global _with_python_extensions --with-python-extensions}}
|
%{!?_with_python_extensions: %{!?_without_python_extensions: %global _with_python_extensions --with-python-extensions}}
|
||||||
@ -116,7 +115,7 @@ with genders. This is the C++ api.
|
|||||||
%define _perldir %(perl -e 'use Config; $T=$Config{installvendorarch}; $P=$Config{vendorprefix}; $T=~/$P\\/(.*)/; print "%{_prefix}/$1\\n"')
|
%define _perldir %(perl -e 'use Config; $T=$Config{installvendorarch}; $P=$Config{vendorprefix}; $T=~/$P\\/(.*)/; print "%{_prefix}/$1\\n"')
|
||||||
%endif
|
%endif
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{pname}-%{version}
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
@ -147,10 +146,10 @@ make all #%%{?_smp_mflags}
|
|||||||
# is a bug in perl-ExtUtils-MakeMaker
|
# is a bug in perl-ExtUtils-MakeMaker
|
||||||
export NO_BRP_CHECK_RPATH=true
|
export NO_BRP_CHECK_RPATH=true
|
||||||
|
|
||||||
make install DESTDIR=%{buildroot} #%%{?_smp_mflags}
|
%make_install
|
||||||
|
|
||||||
find "$RPM_BUILD_ROOT" -name .packlist -exec sed -i "s#$RPM_BUILD_ROOT##" {} +
|
find "%{buildroot}" -name .packlist -exec sed -i "s#%{buildroot}##" {} +
|
||||||
find "$RPM_BUILD_ROOT" -name .packlist -exec sed -i '/BUILDROOT/d' {} +
|
find "%{buildroot}" -name .packlist -exec sed -i '/BUILDROOT/d' {} +
|
||||||
|
|
||||||
for file in %{buildroot}%{_prefix}/lib/genders/*.pl; do grep '#!/usr/bin/perl' $file || sed -i '1s,^,#!/usr/bin/perl\n,' $file ;done
|
for file in %{buildroot}%{_prefix}/lib/genders/*.pl; do grep '#!/usr/bin/perl' $file || sed -i '1s,^,#!/usr/bin/perl\n,' $file ;done
|
||||||
|
|
||||||
@ -175,17 +174,13 @@ cat > %{buildroot}%{_sysconfdir}/genders <<EOF
|
|||||||
EOF
|
EOF
|
||||||
LD_PRELOAD=%{buildroot}%{_libdir}/libgenders.so.0 %{buildroot}%{_bindir}/nodeattr -f genders.sample --compress >> %{buildroot}%{_sysconfdir}/genders
|
LD_PRELOAD=%{buildroot}%{_libdir}/libgenders.so.0 %{buildroot}%{_bindir}/nodeattr -f genders.sample --compress >> %{buildroot}%{_sysconfdir}/genders
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -n lib%{name}plusplus%{cpp_api} -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -n lib%{name}plusplus%{cpp_api} -p /sbin/ldconfig
|
||||||
|
|
||||||
%post -n lib%{pname}plusplus%{cpp_api} -p /sbin/ldconfig
|
%post -n lib%{name}%{c_api} -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n lib%{pname}plusplus%{cpp_api} -p /sbin/ldconfig
|
%postun -n lib%{name}%{c_api} -p /sbin/ldconfig
|
||||||
|
|
||||||
%post -n lib%{pname}%{c_api} -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -n lib%{pname}%{c_api} -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -196,13 +191,13 @@ LD_PRELOAD=%{buildroot}%{_libdir}/libgenders.so.0 %{buildroot}%{_bindir}/nodeatt
|
|||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%config(noreplace) %{_sysconfdir}/genders
|
%config(noreplace) %{_sysconfdir}/genders
|
||||||
|
|
||||||
%files -n %{pname}-perl-compat
|
%files perl-compat
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %{_prefix}/lib/genders
|
%dir %{_prefix}/lib/genders
|
||||||
%{_prefix}/lib/genders/*
|
%{_prefix}/lib/genders/*
|
||||||
%{_mandir}/man3/gendlib*
|
%{_mandir}/man3/gendlib*
|
||||||
|
|
||||||
%files -n %{pname}-devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
%{_libdir}/libgenders.so
|
%{_libdir}/libgenders.so
|
||||||
@ -212,23 +207,23 @@ LD_PRELOAD=%{buildroot}%{_libdir}/libgenders.so.0 %{buildroot}%{_bindir}/nodeatt
|
|||||||
%{_mandir}/man3/genders*
|
%{_mandir}/man3/genders*
|
||||||
%{_mandir}/man3/libgenders*
|
%{_mandir}/man3/libgenders*
|
||||||
|
|
||||||
%files -n python-%{pname}
|
|
||||||
%if %{?_with_python_extensions:1}%{!?_with_python_extensions:0}
|
%if %{?_with_python_extensions:1}%{!?_with_python_extensions:0}
|
||||||
|
%files -n python-%{name}
|
||||||
%{_libdir}/python*
|
%{_libdir}/python*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n perl-%{pname}
|
|
||||||
%if %{?_with_perl_extensions:1}%{!?_with_perl_extensions:0}
|
%if %{?_with_perl_extensions:1}%{!?_with_perl_extensions:0}
|
||||||
|
%files -n perl-%{name}
|
||||||
%{_mandir}/man3/Libgenders*
|
%{_mandir}/man3/Libgenders*
|
||||||
%{_mandir}/man3/Genders*
|
%{_mandir}/man3/Genders*
|
||||||
%{_perldir}/*
|
%{_perldir}/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n lib%{pname}%{c_api}
|
%files -n lib%{name}%{c_api}
|
||||||
%{_libdir}/libgenders.so.*
|
%{_libdir}/libgenders.so.*
|
||||||
|
|
||||||
%files -n lib%{pname}plusplus%{cpp_api}
|
|
||||||
%if %{?_with_cplusplus_extensions:1}%{!?_with_cplusplus_extensions:0}
|
%if %{?_with_cplusplus_extensions:1}%{!?_with_cplusplus_extensions:0}
|
||||||
|
%files -n lib%{name}plusplus%{cpp_api}
|
||||||
%{_libdir}/libgendersplusplus.so.*
|
%{_libdir}/libgendersplusplus.so.*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user