I'm attempting to package libmp3lame and libmp3lame-devel much the same way that Debian packages it: they have libmp3lame as a package providing the libmp3lame.so shared library, libmp3lame-dev providing header files and documentation, and lame depending on libmp3lame providing the actual binary.Here is my spec file, libmp3lame.spec:Summary: Shared libraries for LAME.Name: libmp3lameVersion: 3.99.5Release: 1License: LGPLVendor: The LAME ProjectPackager: Naftuli Tzvi Kay <--->URL: http://www.mp3dev.orgGroup: Applications/MultimediaSource: lame-%{version}.tar.gzBuildRequires: gcc => 3.0.1, /usr/bin/find, ncurses-devel, nasm%descriptionShared libraries for LAME.%package develSummary: Shared libraries for LAME (development files).Group: Development/LibrariesRequires: %{name} = %{version}%description develShared libraries for LAME (development files).%prep%setup -n lame-%{version}%build# Vorbis makes the build fail for now. . .rm -f config.cache# configuration swiped from debian%configure \    --enable-nasm \    --disable-rpath \    --enable-dynamic-frontends \    --enable-expopt=full \    --enable-nasm \    --with-fileio=lame%{__make} %{?_smp_mflags} test CFLAGS=%{optflags}%install%makeinstall%{__ln_s} -f lame/lame.h %{buildroot}%{_includedir}/lame.h### make install really shouldn't install these# %{__rm} -rf %{buildroot}%{_docdir}/lame/%post/sbin/ldconfig%postun/sbin/ldconfig%clean%{__rm} -rf %{buildroot}%files%defattr (-,root,root)%{_libdir}/libmp3lame.so.*%{_libdir}/libmp3lame.so%files devel%defattr (-, root, root)%doc API HACKING STYLEGUIDE%{_includedir}/*%changelog* Mon Jan 11 2016 Naftuli Tzvi Kay <---> - 3.99.5-1- Repackaged for reasons.I'm seeing the following build errors:RPM build errors:    Installed (but unpackaged) file(s) found:   /usr/bin/lame   /usr/lib64/libmp3lame.a   /usr/lib64/libmp3lame.la   /usr/share/doc/lame/html/about.html   /usr/share/doc/lame/html/abr.html   /usr/share/doc/lame/html/cbr.html   /usr/share/doc/lame/html/contact.html   /usr/share/doc/lame/html/contributors.html   /usr/share/doc/lame/html/detailed.html   /usr/share/doc/lame/html/history.html   /usr/share/doc/lame/html/index.html   /usr/share/doc/lame/html/introduction.html   /usr/share/doc/lame/html/links.html   /usr/share/doc/lame/html/list.html   /usr/share/doc/lame/html/ms_stereo.html   /usr/share/doc/lame/html/usage.html   /usr/share/doc/lame/html/vbr.html   /usr/share/man/man1/lame.1.gzI'm trying to only include the files I need in the final RPMs, but it seems to still complain about this. 
Packaging only a certain subset of built files
rpm;rpmbuild
Built files that get created with make install during the %makeinstall phase need to be explicitly included or excluded.I was able to work around this by running manual rm commands after %makeinstall, but there appears to be another workaround in the %files section using %exclude clauses:%files%defattr (-,root,root)%{_libdir}/libmp3lame.so.*%{_libdir}/libmp3lame.so%exclude %{_bindir}/lame%exclude %{_libdir}/libmp3lame.a%exclude %{_libdir}/libmp3lame.la