[Flac-dev] Problems with FLAC make

Christian Schaller Uraeus at linuxrising.org
Sat Jun 30 15:03:05 PDT 2001


Hi,
I have been making an RPM of FLAC to bundle with GStreamer. In order to
get it working I had to make some rather hackish solutions in the SPEC
file. The flac Makefile does to build into the correct directories while
creating an RPM for some reason. I have attached the SPEC file I ended
up with if it is of interest. Of course it didn't help me much cause it
turned up we had a bug in the flac-plugin code for GStreamer too <G>

Christian
-------------- next part --------------
%define name flac
%define version 0.10
%define release 1
%define prefix /usr
%define sysconfdir /etc

Summary: FLAC lossless audio codec plugins
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}-src.tar.gz
License: LGPL
Group: Libraries/Multimedia
BuildRoot: /var/tmp/%{name}-buildroot
URL: http://flac.sourceforge.net/
Packager: Christian Schaller <Uraeus at linuxrising.org>
Distribution: BlueSky

%description
FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is similar to MP3, but lossless. The FLAC project consists of:
* the stream format
* libFLAC, which implements reference encoders and decoders
* flac, a command-line wrapper around libFLAC to encode and decode .flac files
* input plugins for various music players (Winamp, XMMS, and more in the works)

%package -n flac-xmms
Summary: flac-xmms plugin
Group: Libraries/Multimedia
Requires: %{name} = %{version}

%description -n flac-xmms
flac plugin for XMMS

%files -n flac-xmms
%defattr(-, root, root)
%{prefix}/lib/xmms/Input/libxmms-flac*

%prep
rm -rf $RPM_BUILD_ROOT

%setup  
./configure --prefix=%{prefix} --sysconfdir=%{sysconfdir}

%build
make CCFLAGS='-c %{optflags} -D_REENTRANT -DNeedFunctionPrototypes=1' all

%install
make install 

mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/xmms/Input
mkdir -p $RPM_BUILD_ROOT%{prefix}/include/FLAC
mv %{prefix}/bin/metaflac  $RPM_BUILD_ROOT%{prefix}/bin/metaflac
mv %{prefix}/bin/flac $RPM_BUILD_ROOT%{prefix}/bin/flac
mv %{prefix}/lib/libFLAC*  $RPM_BUILD_ROOT%{prefix}/lib/
mv %{prefix}/lib/xmms/Input/libxmms-flac* $RPM_BUILD_ROOT%{prefix}/lib/xmms/Input/
mv $RPM_BUILD_DIR/%{name}-%{version}/include/FLAC/* $RPM_BUILD_ROOT%{prefix}/include/FLAC

%files
%defattr(-,root,root)
%{prefix}/bin/metaflac
%{prefix}/bin/flac
%{prefix}/lib/libFLAC*
%{prefix}/include/FLAC/*
%changelog
* Fri Jun 29 2001 Christian Schaller <Uraeus at linuxrising.org>
- First SPEC created

%clean
rm -rf $RPM_BUILD_ROOT


More information about the Flac-dev mailing list