File libgbinder-radio.spec of Package libgbinder-radio

%define packagename libgbinder-radio
Name: libgbinder-radio1

Version: 1.4.9
Release: 0
Summary: Binder client library for Android radio interfaces
License: BSD
URL: https://github.com/mer-hybris/libgbinder-radio
Source: %{packagename}-%{version}.tar.bz2

%define libgbinder_version 1.1.14
%define libglibutil_version 1.0.49

BuildRequires: pkgconfig
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libglibutil) >= %{libglibutil_version}
BuildRequires: pkgconfig(libgbinder) >= %{libgbinder_version}

# license macro requires rpm >= 4.11
BuildRequires: pkgconfig(rpm)
%define license_support %(pkg-config --exists 'rpm >= 4.11'; echo $?)

Requires: libglibutil >= %{libglibutil_version}
Requires: libgbinder >= %{libgbinder_version}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Provides: %{packagename}

%description
Binder client library for Android radio interfaces

%package -n %{packagename}-devel
Summary: Development library for %{name}
Requires: %{name} = %{version}

%description -n %{packagename}-devel
This package contains the development library for %{name}.

%prep
%setup -q -n %{packagename}-%{version}

%build
make %{_smp_mflags} LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig

%install
rm -rf %{buildroot}
make LIBDIR=%{_libdir} DESTDIR=%{buildroot} install-dev

%check
make -C unit test

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_libdir}/%{packagename}.so.*
%if %{license_support} == 0
%license LICENSE
%endif

%files -n %{packagename}-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/*.pc
%{_libdir}/%{packagename}.so
%dir %{_includedir}/gbinder-radio
%{_includedir}/gbinder-radio/*.h
openSUSE Build Service is sponsored by