%define _disable_source_fetch 0 %define version_tagged 1 %define basever 1.1.19 %if %{version_tagged} == 0 %define git_refspec %define git_refspec_short %(echo %{git_refspec} | cut -c -7) %endif Name: libgbinder %if %{version_tagged} == 0 # Use untagged RPM version format Version: %{basever}.0git.yyyymmdd.%{git_refspec_short} %else # Use regular RPM version format Version: %{basever} %endif Release: 1%{?dist} Summary: Binder client library License: BSD URL: https://github.com/mer-hybris/libgbinder %if %{version_tagged} == 0 # Use untagged archive url Source: %{url}/tarball/%{git_refspec}#/%{name}-%{git_refspec}.tar.gz %else # Use regular tagged archive url Source: %{url}/archive/refs/tags/%{version}.tar.gz %endif %define libglibutil_version 1.0.52 BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libglibutil) >= %{libglibutil_version} BuildRequires: pkgconfig BuildRequires: make BuildRequires: gcc BuildRequires: bison flex BuildRequires: pkgconfig(rpm) Requires: libglibutil >= %{libglibutil_version} Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig %description C interfaces for Android binder %package devel Summary: Development library for %{name} Requires: %{name} = %{version} %description devel This package contains the development library for %{name}. %prep %if %{version_tagged} == 0 %setup -qn mer-hybris-%{name}-%{git_refspec_short} %else %setup -q %endif %build %{set_build_flags} %{make_build} LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig %{make_build} -C test/binder-bridge KEEP_SYMBOLS=1 release %{make_build} -C test/binder-list KEEP_SYMBOLS=1 release %{make_build} -C test/binder-ping KEEP_SYMBOLS=1 release %install %{set_build_flags} rm -rf %{buildroot} %{make_build} LIBDIR=%{_libdir} DESTDIR=%{buildroot} install-dev %{make_build} -C test/binder-bridge DESTDIR=%{buildroot} install %{make_build} -C test/binder-list DESTDIR=%{buildroot} install %{make_build} -C test/binder-ping DESTDIR=%{buildroot} install %check %{set_build_flags} # Disable unit tests as it's still broken %{make_build} -C unit test || : %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %{_libdir}/%{name}.so.* %license LICENSE %files devel %defattr(-,root,root,-) %{_libdir}/pkgconfig/*.pc %{_libdir}/%{name}.so %{_includedir}/gbinder/*.h # Tools %package tools Summary: Binder tools Requires: %{name} >= %{version} %description tools Binder command line utilities %files tools %defattr(-,root,root,-) %{_bindir}/binder-bridge %{_bindir}/binder-list %{_bindir}/binder-ping %changelog * Tue Feb 22 2022 Mo 森 - 1.1.19-1 - Added reader and writer for aidl parcelables * Wed Jan 19 2022 Mo 森 - 1.1.18-1 - Make sure stale object pointers don't hang around - Properly shut down remote object inside the proxy - Read ref_count from GObject atomically - Don't release remote proxy handle too early (sometimes never) - Disassociate auto-created proxies to stop them from piling up * Tue Dec 28 2021 Mo 森 - 1.1.15-1 - Added readers and writers for int8 and int16 * Sun Nov 28 2021 Mo 森 - 1.1.14-2 - Support for FMQ (Fast Message Queues) - Support for Android 11 (API level 30) - Made GBinderReader API slightly more NULL tolerant - Added gbinder_client_rpc_header() - Added gbinder_reader_get_data() - Added gbinder_writer_get_data() - Added gbinder_servicemanager_device() - Added gbinder_local_reply_append_fd()