File libebml.spec of Package libebml

%define realname libebml
%define realver  1.3.5
%define srcext   tar.xz

%define so_ver   4

# turn off the generation of debuginfo rpm  (RH9) ??
%global debug_package %{nil}

# Common info
Name:          %{realname}%{?so_ver}
Version:       %{realver}
Release:       %{?extraver:0.}1%{?dist}
License:       LGPL-2.1
Group:         System/Libraries
URL:           https://www.matroska.org/technical/specs/rfc/index.html
Summary:       C++ libary to parse EBML files

# Install-time parameters
Provides:      %{realname}

# Build-time parameters
BuildRequires: xz
BuildRequires: gcc-c++ pkgconfig
BuildRoot:     %{_tmppath}/%{name}-root
Source:        https://dl.matroska.org/downloads/libebml/%{realname}-%{realver}%{?extraver}.%{srcext}

%description
libebml is a C++ libary to parse EBML files.

The extensible binary markup language, EBML, is a binary language for storing
hierarchical, typed in data in a compact, yet easily parsed format.

%package -n %{realname}-devel
Group:         Development/Languages/C and C++
Summary:       Development files for %{name}
Requires:      %{name} = %{version}-%{release}
Provides:      %{name}-devel

%description -n %{realname}-devel
Development files for %{name}.

libebml is a C++ libary to parse EBML files.

%prep
%setup -q -n %{realname}-%{realver}%{?extraver}

%build
%configure \
 --disable-static \
 CFLAGS="%{optflags} %{?gcc_lto}" \
 CXXFLAGS="%{optflags} %{?gcc_lto}" \
 LDFLAGS="-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}"
%{__make} %{?_smp_mflags}

%install
%{__make} install DESTDIR=%{buildroot}

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc LICENSE.LGPL README.md
%{_libdir}/%{realname}.so.%{?so_ver}*

# Development stuff
%files -n %{realname}-devel
%defattr(-,root,root)
%doc LICENSE.LGPL README.md
%{_libdir}/pkgconfig/%{realname}.pc
%{_includedir}/ebml/
%{_libdir}/%{realname}.so
%exclude %{_libdir}/*.la

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by