@@ -56,12 +56,14 @@ CLEANFILES += $(noinst_SCRIPTS)
do_rhel_subst = sed -e 's,VERSION,$(VERSION),g' \
-e 's,DNAME,ndctl-devel,g' \
- -e 's,LNAME,ndctl-libs,g'
+ -e '/^%defattr.*/d' \
+ -e 's,LNAME,ndctl-libs,g'
do_sles_subst = sed -e 's,VERSION,$(VERSION),g' \
-e 's,DNAME,libndctl-devel,g' \
-e 's,%license,%doc,g' \
- -e 's,LNAME,libndctl$(LIBNDCTL_CURRENT),g'
+ -e 's,\(^License:.*GPL\)v2,\1-2.0,g' \
+ -e "s,LNAME,libndctl$$(($(LIBNDCTL_CURRENT) - $(LIBNDCTL_AGE))),g"
rhel/ndctl.spec: ndctl.spec.in Makefile.am
$(AM_V_GEN)$(MKDIR_P) rhel; $(do_rhel_subst) < $< > $@
@@ -65,16 +65,19 @@ make check
%postun -n LNAME -p /sbin/ldconfig
%files
+%defattr(-,root,root)
%license licenses/GPLv2 licenses/BSD-MIT licenses/CC0
%{_bindir}/ndctl
%{_mandir}/man1/*
%files -n LNAME
+%defattr(-,root,root)
%doc README.md
%license COPYING licenses/BSD-MIT licenses/CC0
%{_libdir}/libndctl.so.*
%files -n DNAME
+%defattr(-,root,root)
%license COPYING
%{_includedir}/ndctl/
%{_libdir}/libndctl.so
Per recent build.opensuse.org results: 1/ The SLE_12 target still mandates use of %defattr 2/ The SUSE-rpmlint system now enforces license names from https://license.opensuse.org 3/ The libndctl version suffix needs to account for LIBNDCTL_AGE, not just LIBNDCTL_CURRENT. Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- Makefile.am | 6 ++++-- ndctl.spec.in | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-)