diff --git a/genders.changes b/genders.changes index 38019df..e07f5b1 100644 --- a/genders.changes +++ b/genders.changes @@ -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 diff --git a/genders.spec b/genders.spec index e796e53..9b935ab 100644 --- a/genders.spec +++ b/genders.spec @@ -16,18 +16,17 @@ # -%define pname genders # Check file META in sources: update so_version to (API_CURRENT - API_AGE) %define c_api 0 %define cpp_api 2 -Name: %{pname} +Name: genders Version: 1.22 Release: 0 Summary: Static cluster configuration database License: GPL-2.0 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 Patch2: Remove-PERL_DESTDIR-use-DESTDIR-instead.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 configuration of a cluster by modifying only one file. -%package -n %{pname}-perl-compat +%package perl-compat Summary: Perl compatibility Library 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. -%package -n %{pname}-devel +%package devel Summary: Headers and development files 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 -%package -n python-%{pname} +%package -n python-%{name} Summary: Python bindings for genders Group: Development/Languages/Python -Requires: %{pname} = %{version} +Requires: %{name} = %{version} Requires: python -%description -n python-%{pname} -Necessary files for using genders with python +%description -n python-%{name} +Necessary files for using genders with Python. -%package -n perl-%{pname} +%package -n perl-%{name} Summary: Perl bindings for genders Group: Development/Languages/Perl -Requires: %{pname} = %{version} +Requires: %{name} = %{version} Requires: perl-base = %{perl_version} -%description -n perl-%{pname} -Necessary files for using genders with perl +%description -n perl-%{name} +Necessary files for using genders with Perl. -%package -n lib%{pname}%{c_api} -Summary: Libraries for genders for C +%package -n lib%{name}%{c_api} +Summary: C library API for genders 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 -with genders. This is the C api. +with genders. This is the C API. -%package -n lib%{pname}plusplus%{cpp_api} -Summary: Libraries for genders for C++ +%package -n lib%{name}plusplus%{cpp_api} +Summary: C++ library API for genders 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 -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_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"') %endif %prep -%setup -q -n %{pname}-%{version} +%setup -q %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -147,10 +146,10 @@ make all #%%{?_smp_mflags} # is a bug in perl-ExtUtils-MakeMaker 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 "$RPM_BUILD_ROOT" -name .packlist -exec sed -i '/BUILDROOT/d' {} + +find "%{buildroot}" -name .packlist -exec sed -i "s#%{buildroot}##" {} + +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 @@ -175,17 +174,13 @@ cat > %{buildroot}%{_sysconfdir}/genders <> %{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 - -%post -n lib%{pname}%{c_api} -p /sbin/ldconfig - -%postun -n lib%{pname}%{c_api} -p /sbin/ldconfig +%postun -n lib%{name}%{c_api} -p /sbin/ldconfig %files %defattr(-,root,root) @@ -196,13 +191,13 @@ LD_PRELOAD=%{buildroot}%{_libdir}/libgenders.so.0 %{buildroot}%{_bindir}/nodeatt %{_bindir}/* %config(noreplace) %{_sysconfdir}/genders -%files -n %{pname}-perl-compat +%files perl-compat %defattr(-,root,root) %dir %{_prefix}/lib/genders %{_prefix}/lib/genders/* %{_mandir}/man3/gendlib* -%files -n %{pname}-devel +%files devel %defattr(-,root,root) %{_includedir}/* %{_libdir}/libgenders.so @@ -212,23 +207,23 @@ LD_PRELOAD=%{buildroot}%{_libdir}/libgenders.so.0 %{buildroot}%{_bindir}/nodeatt %{_mandir}/man3/genders* %{_mandir}/man3/libgenders* -%files -n python-%{pname} %if %{?_with_python_extensions:1}%{!?_with_python_extensions:0} +%files -n python-%{name} %{_libdir}/python* %endif -%files -n perl-%{pname} %if %{?_with_perl_extensions:1}%{!?_with_perl_extensions:0} +%files -n perl-%{name} %{_mandir}/man3/Libgenders* %{_mandir}/man3/Genders* %{_perldir}/* %endif -%files -n lib%{pname}%{c_api} +%files -n lib%{name}%{c_api} %{_libdir}/libgenders.so.* -%files -n lib%{pname}plusplus%{cpp_api} %if %{?_with_cplusplus_extensions:1}%{!?_with_cplusplus_extensions:0} +%files -n lib%{name}plusplus%{cpp_api} %{_libdir}/libgendersplusplus.so.* %endif