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: libmp3lame
Version: 3.99.5
Release: 1
License: LGPL
Vendor: The LAME Project
Packager: Naftuli Tzvi Kay <--->
URL: http://www.mp3dev.org
Group: Applications/Multimedia
Source: lame-%{version}.tar.gz
BuildRequires: gcc => 3.0.1, /usr/bin/find, ncurses-devel, nasm

Shared libraries for LAME.

%package devel
Summary: Shared libraries for LAME (development files).
Group: Development/Libraries
Requires: %{name} = %{version}

%description devel
Shared libraries for LAME (development files).

%setup -n lame-%{version}


# 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 \
%{__make} %{?_smp_mflags} test CFLAGS="%{optflags}"


%{__ln_s} -f lame/lame.h %{buildroot}%{_includedir}/lame.h
### make install really shouldn't install these
# %{__rm} -rf %{buildroot}%{_docdir}/lame/



%{__rm} -rf %{buildroot}

%defattr (-,root,root)

%files devel
%defattr (-, root, root)


* 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:

I'm trying to only include the files I need in the final RPMs, but it seems to still complain about this.

  • because they're not being included in any %files section – Jeff Schaller Jan 12 '16 at 21:00
  • %{_libdir}/libmp3lame.so belongs in the devel package. just sayin' :) – Rich Homolka Jun 10 '16 at 0:33

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:

%defattr (-,root,root)
%exclude %{_bindir}/lame
%exclude %{_libdir}/libmp3lame.a
%exclude %{_libdir}/libmp3lame.la

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.