#
# spec file for package mp4v2
#
# Copyright (c) 2013 Marguerite Su <marguerite@opensuse.org>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.links2linux.org/
#


%define soname 2

Name:           mp4v2
Version:        2.1.3
Release:        1.1
License:        MPL-1.1
Summary:        Collection of software to create and modify mp4 files
Url:            https://github.com/enzo1982/mp4v2
Group:          System/Libraries
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  gcc-c++


%description
The MP4v2 library provides an API to create and modify mp4 files as defined by
ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's
QuickTime file format that has been used as a multimedia file format in a
variety of platforms and applications. It is a very powerful and extensible
format that can accommodate practically any type of media.

MP4v2 was originally bundled with mpeg4ip library, but has been moved into its
own maintained library due to a combination of the cessation of support of
mpeg4ip and the usefulness of this library on its own.

%package -n lib%{name}-%{soname}
Summary:        Library to create and modify mp4 files
Group:          System/Libraries

%description -n lib%{name}-%{soname}
The MP4v2 library provides an API to create and modify mp4 files as defined by
ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's
QuickTime file format that has been used as a multimedia file format in a
variety of platforms and applications. It is a very powerful and extensible
format that can accommodate practically any type of media.

MP4v2 was originally bundled with mpeg4ip library, but has been moved into its
own maintained library due to a combination of the cessation of support of
mpeg4ip and the usefulness of this library on its own.

%package -n lib%{name}-devel
Summary:        Libmp4v2 development files
Group:          Development/Libraries/C and C++
Requires:       lib%{name}-%{soname} = %{version}

%description -n lib%{name}-devel
Headers and libraries to program against %{name}

%prep
%setup -q
#FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes)
#sed -i "s/PROJECT_build=\"\`date\`\"/PROJECT_build=\"$FAKE_BUILDDATE\"/" configure

%build
autoreconf -fiv

%configure

%make_build

%install
%make_install
rm -f '%{buildroot}%{_libdir}/lib%{name}.la'

%post -n lib%{name}-%{soname} 
/sbin/ldconfig

%postun -n lib%{name}-%{soname} 
/sbin/ldconfig

%files
%defattr(-, root, root)
%{_bindir}/*
%{_mandir}/man1/*.1%{ext_man}

%files -n lib%{name}-%{soname}
%defattr(0644, root, root, 0755)
%license COPYING
%doc README 
%{_libdir}/lib%{name}.so.%{soname}*

%files -n lib%{name}-devel
%defattr(0644, root, root, 0755)
%{_libdir}/lib%{name}.so
%{_includedir}/%{name}
%{_libdir}/pkgconfig/%{name}.pc

%changelog
* Sun 30 Jul 2023 holgerbruenjes@gmx.net
- update version 2.1.3.
  taken from https://github.com/enzo1982/mp4v2
* Sun 30 Oct 2022 holgerbruenjes@gmx.net
- update version 2.1.1 
  taken from https://github.com/enzo1982/mp4v2
* Sun Jul 28 2013 i@margueirte.su
- update version 2.0.0
  * bugfixes
  * new APIs dealing with metadata
  * much better logging
  * improved performance
  * and more
* Fri Mar  2 2012 reddwarf@opensuse.org
- Remove date references from binaries to help build-compare
* Wed Mar  2 2011 reddwarf@opensuse.org
- Initial package