%define name hal-api-common %define devel_name hal-api-common-devel ### main package ######### Name: %{name} Summary: %{name} interface Version: 0.0.1 Release: 1 Group: Development/Libraries License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest Source2: libhal-api.conf Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig BuildRequires: cmake BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gmock) %description %{name} interface ### devel package ######### %package -n %{devel_name} Summary: %{name} interface Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description -n %{devel_name} %{name} Interface for product vendor developer ### build and install ######### %prep %setup -q cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_LIBDIR_PREFIX=%{_libdir} %build cp %{SOURCE1} . make %{?jobs:-j%jobs} %check (cd haltests && LD_LIBRARY_PATH=../ ctest -V) %install rm -rf %{buildroot} %make_install mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/ mkdir -p %{buildroot}/hal install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/ld.so.conf.d/ %clean rm -rf %{buildroot} %post /sbin/ldconfig %postun /sbin/ldconfig ### contain files to package ######### %files -n %{name} %license LICENSE %manifest %{name}.manifest %defattr(-,root,root,-) %{_libdir}/hal/*.so* %{_sysconfdir}/ld.so.conf.d/libhal-api.conf /hal/ %files -n %{devel_name} %defattr(-,root,root,-) %{_includedir}/hal/*.h %{_libdir}/pkgconfig/*.pc