shithub: aacdec

ref: b2aec36134f39421dc3a434d973409d98bffb3aa
dir: /common/id3lib/id3lib.spec.in/

View raw version
# $Id: id3lib.spec.in,v 1.1 2002/01/21 08:16:20 menno Exp $

%define name    @PACKAGE@
%define	version	@VERSION@
%define	release	1
%define	prefix	/usr

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	A software library for manipulating ID3v1 and ID3v2 tags.
Source:		http://download.sourceforge.net/id3lib/%{name}-%{version}.tar.gz
URL:		http://id3lib.sourceforge.net
Group:		System Environment/Libraries
BuildRoot:	%{_tmppath}/%{name}-buildroot
Copyright:	LGPL
Prefix:         %{_prefix}
Docdir:		%{prefix}/doc
Requires:       zlib

%description
This package provides a software library for manipulating ID3v1 and ID3v2 tags.
It provides a convenient interface for software developers to include 
standards-compliant ID3v1/2 tagging capabilities in their applications.  
Features include identification of valid tags, automatic size conversions, 
(re)synchronisation of tag frames, seamless tag (de)compression, and optional
padding facilities.

%package	devel
Summary:	Headers for developing programs that will use id3lib
Group:		Development/Libraries
Requires:       %{name}

%description	devel
This package contains the headers that programmers will need to develop
applications which will use id3lib, the software library for ID3v1 and ID3v2
tag manipulation.

%package        doc
Summary:	Documentation for developing programs that will use id3lib
Group:		Documentation

%description	doc
This package contains the documentation of the id3lib API that programmers will
need to develop applications which will use id3lib, the software library for ID3v1
and ID3v2 tag manipulation.

%package        examples
Summary:	Example applications that make use of the id3lib library
Group:		Applications/File
Requires:       %{name}

%description	examples
This package contains simple example applications that make use of id3lib, a 
software library for ID3v1 and ID3v2 tag maniuplation.

%prep
%setup -q

%build
%ifarch i386 i486

ID3_ARCH=i486

%endif 

%ifarch i586

ID3_ARCH=pentium

%endif 

%ifarch i686

ID3_ARCH=pentiumpro

%endif 

%ifarch k6

ID3_ARCH=k6

%endif

%ifarch i386 i486 i586 i686 k6

RPM_OPT_FLAGS="-O3 -fomit-frame-pointer -pipe -s -mcpu=$ID3_ARCH -march=$ID3_ARCH -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -mpreferred-stack-boundary=2"

%endif

CXXFLAGS="$RPM_OPT_FLAGS -fexceptions" ./configure --prefix=%prefix

%ifnarch noarch

uname -a|grep SMP && make -j 2 || make

%endif

%install
rm -rf $RPM_BUILD_ROOT

%ifnarch noarch

make prefix=$RPM_BUILD_ROOT%{prefix} install

%else

make docs
 
# strip down the doc and examples directories so we can copy w/impunity
for i in doc/ examples/; do \
  find $i                   \
  \(  -name 'Makefile*' -or \
      -name '*.ps.gz'   -or \
      -name '*.pdf'         \
  \)  -exec rm {} \; ; done

%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%ifnarch noarch

%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO
%{prefix}/lib/*.so.*

%files devel
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO
%{prefix}/include/id3*.h
%{prefix}/include/id3
%{prefix}/lib/*.la
%{prefix}/lib/*.a
%{prefix}/lib/*.so

%files examples
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO
%{prefix}/bin/id3*

%else

%files doc
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO
%doc doc/*.* doc/@DOX_DIR_HTML@ examples

%endif

%changelog
* Wed 24 May 2000 Scott Haug <[email protected]> 3.7.9-1
- Version 3.7.9
- Modified the date format in the changelog

* Wed 10 May 2000 Scott Haug <[email protected]> 3.7.8-1
- Version 3.7.8

* Wed 10 May 2000 Scott Haug <[email protected]> 3.7.7-1
- Version 3.7.7

* Wed 03 May 2000 Scott Haug <[email protected]> 3.7.6-1
- Version 3.7.6

* Fri 28 Apr 2000 Scott Haug <[email protected]> 3.7.5-1
- Version 3.7.5

* Wed 26 Apr 2000 Scott Haug <[email protected]> 3.7.4-1
- Version 3.7.4

* Mon 24 Apr 2000 Scott Haug <[email protected]> 3.7.3-1
- Version 3.7.3
- Added explicit RPM_OPT_FLAGS def based on arch, since -fno-exceptions and
  -fno-rtti are part of the default flags in rpmrc and we need both exceptions
  and rtti (exceptions uses rtti)

* Fri 21 Apr 2000 Scott Haug <[email protected]> 3.7.2-1
- Version 3.7.2
- More conditional blocks for noarch
- More thorough cleaning of files for documentation
- Updated html directory

* Thu 20 Apr 2000 Scott Haug <[email protected]> 3.7.1-2
- Fixed date of changelog entry for 3.7.1-1
- Added conditional blocks so docs only get built for noarch target

* Wed 19 Apr 2000 Scott Haug <[email protected]> 3.7.1-1
- Version 3.7.1
- Removed zlib-devel requirement from devel
- Added doc package to distribute documentation
- Added examples package to distribute binary examples (id3tag, id3info, ...)
- Moved doc/ and examples/ source files from devel to doc package

* Mon 17 Apr 2000 Scott Haug <[email protected]> 3.7.0-1
- First (s)rpm build