--- /dev/null
+Name: layer-management
+License: Apache-2.0
+Group: Graphics & UI Framework/Libraries
+Summary: Automotive Layer Management Infrastructure
+Version: 1.2.0
+Release: 1
+Source: %{name}-%{version}.tar.gz
+BuildRequires: cmake
+BuildRequires: pkgconfig(dbus-1)
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+Automotive Layer Management Infrastructure
+
+%package libs
+Summary: Automotive Layer Management Libraries
+Group: Graphics & UI Framework/Libraries
+
+%description libs
+Libraries used by clients to connect to the GENIVI automotive layer manager
+
+%package devel
+Summary: Automotive Layer Management Development Package
+Group: Graphics & UI Framework/Development
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Files needed for developing against the Automotive Layer Management Infrastructure
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+mkdir build
+cd build
+
+%cmake \
+ -DILM_VERSION=%{version} \
+ -DWITH_EGL_EXAMPLE=OFF \
+ -DWITH_CLIENTEXAMPLES=OFF \
+ -DWITH_X11_GLES=OFF \
+ -DWITH_WAYLAND_DRM=OFF \
+ -DWITH_SERVICE_BIN=OFF \
+ -DWITH_CONTROL_BIN=OFF \
+ -DWITH_GENERIC_COMMUNICATOR=OFF \
+ ..
+make %{?jobs:-j %jobs}
+
+%install
+rm -rf "$RPM_BUILD_ROOT"
+cd build
+%make_install
+
+# At this time we are not installing the layer manager service
+# with the expectation that the libraries will connect to the
+# layer manager plugin running in weston
+rm -fR $RPM_BUILD_ROOT/etc/dbus-1/
+
+mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/
+mv $RPM_BUILD_ROOT/usr/local/lib/pkgconfig/ilm.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%files libs
+%defattr(-,root,root,-)
+%{_libdir}/layermanager/ipcmodules/*
+%{_libdir}/*.so
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/pkgconfig/ilm.pc
+%{_includedir}/ilm/*.h
+%{_includedir}/layermanager/*.h