Blame alac.spec

Bernhard M. Wiedemann d161be
#
Bernhard M. Wiedemann d161be
# spec file for package alac
Bernhard M. Wiedemann d161be
#
6cdabd
# Copyright (c) 2024 SUSE LLC
Bernhard M. Wiedemann d161be
#
Bernhard M. Wiedemann d161be
# All modifications and additions to the file contributed by third parties
Bernhard M. Wiedemann d161be
# remain the property of their copyright owners, unless otherwise agreed
Bernhard M. Wiedemann d161be
# upon. The license for this file, and modifications and additions to the
Bernhard M. Wiedemann d161be
# file, is the same license as for the pristine package itself (unless the
Bernhard M. Wiedemann d161be
# license for the pristine package is not an Open Source License, in which
Bernhard M. Wiedemann d161be
# case the license is the MIT License). An "Open Source License" is a
Bernhard M. Wiedemann d161be
# license that conforms to the Open Source Definition (Version 1.9)
Bernhard M. Wiedemann d161be
# published by the Open Source Initiative.
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann fa6d38
# Please submit bugfixes or comments via https://bugs.opensuse.org/
Bernhard M. Wiedemann d161be
#
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%define sover   0
Bernhard M. Wiedemann d161be
Name:           alac
Bernhard M. Wiedemann d161be
Version:        0.0+git.20160511
Bernhard M. Wiedemann d161be
Release:        0
Bernhard M. Wiedemann d161be
Summary:        Apple Lossless Audio Codec
Bernhard M. Wiedemann d161be
License:        Apache-2.0
6cdabd
URL:            https://macosforge.github.io/alac/
Bernhard M. Wiedemann d161be
Source:         %{name}-%{version}.tar.xz
Bernhard M. Wiedemann d161be
Patch1:         libalac-makefile.patch
Bernhard M. Wiedemann d161be
Patch2:         alac-endian.patch
Bernhard M. Wiedemann d161be
BuildRequires:  gcc-c++
Bernhard M. Wiedemann d161be
BuildRequires:  pkgconfig
Bernhard M. Wiedemann d161be
BuildRequires:  xz
Bernhard M. Wiedemann d161be
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%description
Bernhard M. Wiedemann d161be
The Apple Lossless Audio Codec (ALAC) is an audio codec developed by Apple and
Bernhard M. Wiedemann d161be
supported on iPhone, iPad, most iPods, Mac and iTunes.  ALAC is a data
Bernhard M. Wiedemann d161be
compression method which reduces the size of audio files with no loss of
Bernhard M. Wiedemann d161be
information.  A decoded ALAC stream is bit-for-bit identical to the original
Bernhard M. Wiedemann d161be
uncompressed audio file.
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
This package contains a command-line utility to convert the ALAC format.
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%package -n lib%{name}%{sover}
Bernhard M. Wiedemann d161be
Summary:        Apple Lossless Audio Codec
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%description -n lib%{name}%{sover}
Bernhard M. Wiedemann d161be
The Apple Lossless Audio Codec (ALAC) is an audio codec developed by Apple and
Bernhard M. Wiedemann d161be
supported on iPhone, iPad, most iPods, Mac and iTunes.  ALAC is a data
Bernhard M. Wiedemann d161be
compression method which reduces the size of audio files with no loss of
Bernhard M. Wiedemann d161be
information.  A decoded ALAC stream is bit-for-bit identical to the original
Bernhard M. Wiedemann d161be
uncompressed audio file.
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%package devel
Bernhard M. Wiedemann d161be
Summary:        Apple Lossless Audio Codec
Bernhard M. Wiedemann d161be
Requires:       lib%{name}%{sover} = %{version}
Bernhard M. Wiedemann d161be
Provides:       lib%{name}-devel = %{version}
Bernhard M. Wiedemann d161be
Obsoletes:      lib%{name}-devel < %{version}
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%description devel
Bernhard M. Wiedemann d161be
The Apple Lossless Audio Codec (ALAC) is an audio codec developed by Apple and
Bernhard M. Wiedemann d161be
supported on iPhone, iPad, most iPods, Mac and iTunes.  ALAC is a data
Bernhard M. Wiedemann d161be
compression method which reduces the size of audio files with no loss of
Bernhard M. Wiedemann d161be
information.  A decoded ALAC stream is bit-for-bit identical to the original
Bernhard M. Wiedemann d161be
uncompressed audio file.
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%prep
6cdabd
%autosetup -p0
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%build
Bernhard M. Wiedemann d161be
for d in codec convert-utility; do
Bernhard M. Wiedemann d161be
    make -C "$d" \
Bernhard M. Wiedemann d161be
        OPTFLAGS="%{optflags} -fvisibility-inlines-hidden -fno-strict-aliasing -D_GNU_SOURCE" \
Bernhard M. Wiedemann d161be
        CC="g++"
Bernhard M. Wiedemann d161be
done
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%install
Bernhard M. Wiedemann d161be
install -D -p -m 0755 convert-utility/alacconvert \
Bernhard M. Wiedemann d161be
  %{buildroot}%{_bindir}/alacconvert
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
install -d %{buildroot}%{_includedir}
Bernhard M. Wiedemann d161be
cp -a codec/*.h %{buildroot}%{_includedir}/
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
install -d %{buildroot}%{_libdir}
Bernhard M. Wiedemann d161be
cp -a codec/libalac.so* %{buildroot}%{_libdir}/
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%post   -n lib%{name}%{sover} -p /sbin/ldconfig
Bernhard M. Wiedemann d161be
%postun -n lib%{name}%{sover} -p /sbin/ldconfig
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%files
Bernhard M. Wiedemann d161be
%defattr(-,root,root)
Bernhard M. Wiedemann d161be
%doc codec/APPLE_LICENSE.txt LICENSE
Bernhard M. Wiedemann d161be
%{_bindir}/alacconvert
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%files -n lib%{name}%{sover}
Bernhard M. Wiedemann d161be
%defattr(-,root,root)
Bernhard M. Wiedemann d161be
%doc codec/APPLE_LICENSE.txt LICENSE
Bernhard M. Wiedemann d161be
%{_libdir}/libalac.so.%{sover}*
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%files devel
Bernhard M. Wiedemann d161be
%defattr(-,root,root)
Bernhard M. Wiedemann d161be
%doc codec/APPLE_LICENSE.txt LICENSE
Bernhard M. Wiedemann d161be
%{_includedir}/*.h
Bernhard M. Wiedemann d161be
%{_libdir}/libalac.so
Bernhard M. Wiedemann d161be
Bernhard M. Wiedemann d161be
%changelog