Corrected packaging errors, and created new sample-hmi sub-package.
authorOssama Othman <ossama.othman@intel.com>
Thu, 15 Aug 2013 21:11:42 +0000 (14:11 -0700)
committerOssama Othman <ossama.othman@intel.com>
Wed, 5 Mar 2014 21:05:24 +0000 (13:05 -0800)
Change-Id: If8dd9b6507efae80f68623f53229396aff71a0af
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
packaging/smartdevicelink.spec

index b29a769..dd21ff3 100644 (file)
@@ -10,6 +10,13 @@ Source1001:    %{name}.manifest
 BuildRequires: cmake
 BuildRequires: pkgconfig(bluez)
 BuildRequires: doxygen
+BuildRequires: fdupes
+
+# For MiniBrowser
+Requires:      webkit2-efl-test
+
+# Custom SDL-enabled HMIs should "Provide" this virtual package.
+Requires:      smartdevicelink-hmi
 
 %description
 SmartDeviceLink is a project which intends to standardize and wrap the
@@ -28,6 +35,14 @@ developer. By leveraging this common API and a brought-in device,
 automotive head units leverage the complete power of the brought-in
 device using the APIs being executed on the mobile device.
 
+%package sample-hmi
+Group:         Graphics & UI Framework/Automotive UI
+Summary:       Sample SmartDeviceLink capable HMI
+Provides:      smartdevicelink-hmi
+
+%description sample-hmi
+This package contains a an SmartDeviceLink template-based
+sample/reference HMI.
 
 %prep
 %setup -q -n %{name}-%{version}
@@ -41,23 +56,29 @@ make %{?_smp_mflags}
 %install
 # Don't run "make install".  We only care about the core SDL binary,
 # and HMI related files.
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}
 install -m 0755 SDL_Core/src/appMain/smartDeviceLinkCore %{buildroot}%{_bindir}
-install -m 0644 SDL_Core/src/appMain/log4cplus.properties %{buildroot}%{_sysconfdir}/%{n
-ame}
+install -m 0644 SDL_Core/src/appMain/log4cplus.properties %{buildroot}%{_sysconfdir}/%{name}
 install -m 0644 SDL_Core/src/appMain/audio.8bit.wav %{buildroot}%{_datadir}/%{name}
 cp -R SDL_Core/src/components/HMI %{buildroot}%{_datadir}/%{name}
 
-%clean
+%fdupes -s %{buildroot}%{_datadir}/%{name}
 
-#%post -p /sbin/ldconfig
+# Create the 'hmi_link' file with the location of the sample HMI.
+echo %{_datadir}/%{name}/HMI/index.html > %{buildroot}%{_sysconfdir}/%{name}/hmi_link
 
-#%postun -p /sbin/ldconfig
+%clean
 
 %files
 %manifest %{name}.manifest
 %license LICENSE
 %{_bindir}/smartDeviceLinkCore
-%{_sysconfdir}/smartdevicelink/log4cplus.properties
-%{_datadir}/%{name}/*
+%config %{_sysconfdir}/%{name}/log4cplus.properties
+%{_datadir}/%{name}/audio.8bit.wav
+
+%files sample-hmi
+%config %{_sysconfdir}/%{name}/hmi_link
+%{_datadir}/%{name}/HMI/*
 
 #%%files doc