build: Add independent "mobile" package instead of extension-mobile 95/122095/3 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable accepted/tizen/common/20170331.152656 accepted/tizen/ivi/20170331.082937 accepted/tizen/mobile/20170331.083019 accepted/tizen/tv/20170331.082842 accepted/tizen/unified/20170331.083206 accepted/tizen/wearable/20170331.082951 submit/tizen/20170331.022349
authorJeeyong Um <conr2d@gmail.com>
Thu, 30 Mar 2017 07:17:34 +0000 (16:17 +0900)
committerJeeyong Um <conr2d@gmail.com>
Thu, 30 Mar 2017 08:59:16 +0000 (17:59 +0900)
Signed-Off-By: Jeeyong Um <jc9.um@samsung.com>
Change-Id: I763868fdd4757647eb4e66077dcb6884bd46a281

packaging/elementary.spec

index 7958d68..8d7ed34 100644 (file)
@@ -53,14 +53,6 @@ BuildRequires:  pkgconfig(ttrace)
 
 Recommends:     %{name}-locale = %{version}
 
-Provides:       %{name}-profile_common = %{version}-%{release}
-Provides:       %{name}-profile_tv = %{version}-%{release}
-Provides:       %{name}-profile_ivi = %{version}-%{release}
-%if "%{?profile}" == "mobile" || "%{?profile}" == "wearable"
-Provides:       %{name}-profile_mobile = %{version}-%{release}
-Provides:       %{name}-profile_wearable = %{version}-%{release}
-%endif
-
 %description
 Elementary is a widget set. It is a new-style of widget set much more canvas
 object based than anything else. Why not ETK? Why not EWL? Well they both
@@ -72,31 +64,21 @@ fine-grained library splitting means all of this is shared, just a new
 widget "personality" is on top. And that is... Elementary, my dear watson.
 Elementary.
 
-# This subpackage is a workaround to support Tizen mobile/wearable functionalities in
-# Tizen 4.0 Unified environment where all the profiles coexist in one repository.
-# With the supposed refactoring efforts, this must be removed afterwards.
-# This is simply for the backward compatibility during the refactoring efforts.
-%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
-# If it is common/tv/ivi/"unified"
-%package extension-mobile
-Summary:        EFL elementary extension for mobile/wearable profile workaround
-Requires:       %{name} = %{version}-%{release}
-Provides:       %{name}-profile_mobile = %{version}-%{release}
-Provides:       %{name}-profile_wearable = %{version}-%{release}
-%description extension-mobile
-This is a workaround for Tizen mobile/wearable that uses different set of library
-source code. This extension will overwrite the library .so files of default
-%{name} package to fit Tizen mobile/wearable.
-Note that after the supposed refactoring that is going to unify the source code
-across all Tizen profiles, this extension is no longer required once the
-src/mobile_lib directory becomes empty.
-Because this package overwrites .so files of %{name}, uninstalling this while
-keeping %{name} does not have effects of the uninstall. You will need to
-reinstall %{name} after uninstalling this in order to use the default %{name}
-after installing this.
-
-%endif
+%package mobile
+Summary:        EFL toolkit for small touchscreens for Tizen mobile/wearable
+Provides:       %{name}
 
+%description mobile
+Elementary is a widget set. It is a new-style of widget set much more canvas
+object based than anything else. Why not ETK? Why not EWL? Well they both
+tend to veer away from the core of Evas, Ecore and Edje a lot to build their
+own worlds. Also I wanted something focused on embedded devices -
+specifically small touchscreens. Unlike GTK+ and Qt, 75% of the "widget set"
+is already embodied in a common core - Ecore, Edje, Evas etc. So this
+fine-grained library splitting means all of this is shared, just a new
+widget "personality" is on top. And that is... Elementary, my dear watson.
+Elementary. This is an alternative package for Tizen mobile/wearable that uses
+different set of source code.
 
 %package examples
 Summary:   EFL elementary examples
@@ -129,75 +111,39 @@ Default theme which provides various styles for elementary.
 cp %{SOURCE1001} .
 
 %build
-
-# This subpackage is a workaround to support Tizen mobile/wearable functionalities in
-# Tizen 4.0 Unified environment where all the profiles coexist in one repository.
-# With the supposed refactoring efforts, this must be removed afterwards.
-# This is simply for the backward compatibility during the refactoring efforts.
-%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
-    cp %{_builddir}/%{buildsubdir}/src/lib/elc_ctxpopup.c %{_builddir}/%{buildsubdir}/src/lib/elc_ctxpopup.c.orig
-    cp %{_builddir}/%{buildsubdir}/src/lib/elm_widget_ctxpopup.h %{_builddir}/%{buildsubdir}/src/lib/elm_widget_ctxpopup.h.orig
-    cp %{_builddir}/%{buildsubdir}/src/lib/elm_genlist.c %{_builddir}/%{buildsubdir}/src/lib/elm_genlist.c.orig
-    cp %{_builddir}/%{buildsubdir}/src/lib/elm_widget_genlist.h %{_builddir}/%{buildsubdir}/src/lib/elm_widget_genlist.h.orig
-    cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elc_ctxpopup.c %{_builddir}/%{buildsubdir}/src/lib
-    cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_widget_ctxpopup.h %{_builddir}/%{buildsubdir}/src/lib
-    cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_genlist.c %{_builddir}/%{buildsubdir}/src/lib
-    cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_widget_genlist.h %{_builddir}/%{buildsubdir}/src/lib
-
-# Create .mobile file required for the workaround extension
-    %autogen --disable-static \
-    %if %{with wayland}
-             --enable-ecore-wayland \
-    %endif
-    %if !%{with x}
-             --disable-ecore-x \
-    %endif
-             --with-elementary-base-dir="share/.elementary" \
-    %if %dbus_unavailable
-             --disable-build-examples
-    %else
-             --enable-build-examples
-    %endif
-
-    %__make %{?_smp_mflags}
-    mkdir -p mobile_libs
-
-    /bin/sh ./libtool --mode=install /usr/bin/install -c src/lib/libelementary.la %{_builddir}/%{buildsubdir}/mobile_libs/
-    mv mobile_libs/libelementary.so.%{version} mobile_libs/libelementary.so.%{version}.mobile
-
-# Let's hope make do not build unaffected files.
-    cp %{_builddir}/%{buildsubdir}/src/lib/elc_ctxpopup.c.orig %{_builddir}/%{buildsubdir}/src/lib/elc_ctxpopup.c
-    cp %{_builddir}/%{buildsubdir}/src/lib/elm_widget_ctxpopup.h.orig %{_builddir}/%{buildsubdir}/src/lib/elm_widget_ctxpopup.h
-    cp %{_builddir}/%{buildsubdir}/src/lib/elm_genlist.c.orig %{_builddir}/%{buildsubdir}/src/lib/elm_genlist.c
-    cp %{_builddir}/%{buildsubdir}/src/lib/elm_widget_genlist.h.orig %{_builddir}/%{buildsubdir}/src/lib/elm_widget_genlist.h
-# If it is common/tv/ivi/"unified"
+cp %{_builddir}/%{buildsubdir}/src/lib/elc_ctxpopup.c %{_builddir}/%{buildsubdir}/src/lib/elc_ctxpopup.c.orig
+cp %{_builddir}/%{buildsubdir}/src/lib/elm_widget_ctxpopup.h %{_builddir}/%{buildsubdir}/src/lib/elm_widget_ctxpopup.h.orig
+cp %{_builddir}/%{buildsubdir}/src/lib/elm_genlist.c %{_builddir}/%{buildsubdir}/src/lib/elm_genlist.c.orig
+cp %{_builddir}/%{buildsubdir}/src/lib/elm_widget_genlist.h %{_builddir}/%{buildsubdir}/src/lib/elm_widget_genlist.h.orig
+cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elc_ctxpopup.c %{_builddir}/%{buildsubdir}/src/lib
+cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_widget_ctxpopup.h %{_builddir}/%{buildsubdir}/src/lib
+cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_genlist.c %{_builddir}/%{buildsubdir}/src/lib
+cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_widget_genlist.h %{_builddir}/%{buildsubdir}/src/lib
+
+%autogen --disable-static \
+%if %{with wayland}
+       --enable-ecore-wayland \
+%endif
+%if !%{with x}
+       --disable-ecore-x \
+%endif
+       --with-elementary-base-dir="share/.elementary" \
+%if %dbus_unavailable
+       --disable-build-examples
+%else
+       --enable-build-examples
 %endif
 
+%__make %{?_smp_mflags}
+mkdir -p mobile_libs
 
+/bin/sh ./libtool --mode=install /usr/bin/install -c src/lib/libelementary.la %{_builddir}/%{buildsubdir}/mobile_libs/
+mv mobile_libs/libelementary.so.%{version} mobile_libs/libelementary.so.%{version}.mobile
 
-# Patch profile dependency widgets
-%if "%{?profile}" == "mobile" || "%{?profile}" == "wearable"
-# Modifing devel packages is prohibited. Copy .c and private .h files only.
-    cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elc_ctxpopup.c %{_builddir}/%{buildsubdir}/src/lib
-    cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_widget_ctxpopup.h %{_builddir}/%{buildsubdir}/src/lib
-    cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_genlist.c %{_builddir}/%{buildsubdir}/src/lib
-    cp %{_builddir}/%{buildsubdir}/src/mobile_lib/elm_widget_genlist.h %{_builddir}/%{buildsubdir}/src/lib
-
-# With the workaround enabled, we've already done "autogen"
-    %autogen --disable-static \
-    %if %{with wayland}
-             --enable-ecore-wayland \
-    %endif
-    %if !%{with x}
-             --disable-ecore-x \
-    %endif
-             --with-elementary-base-dir="share/.elementary" \
-    %if %dbus_unavailable
-             --disable-build-examples
-    %else
-             --enable-build-examples
-    %endif
-%endif
+cp %{_builddir}/%{buildsubdir}/src/lib/elc_ctxpopup.c.orig %{_builddir}/%{buildsubdir}/src/lib/elc_ctxpopup.c
+cp %{_builddir}/%{buildsubdir}/src/lib/elm_widget_ctxpopup.h.orig %{_builddir}/%{buildsubdir}/src/lib/elm_widget_ctxpopup.h
+cp %{_builddir}/%{buildsubdir}/src/lib/elm_genlist.c.orig %{_builddir}/%{buildsubdir}/src/lib/elm_genlist.c
+cp %{_builddir}/%{buildsubdir}/src/lib/elm_widget_genlist.h.orig %{_builddir}/%{buildsubdir}/src/lib/elm_widget_genlist.h
 
 %__make %{?_smp_mflags}
 
@@ -205,9 +151,7 @@ cp %{SOURCE1001} .
 %make_install
 
 # With the workaround extension
-%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
-    install -m 0755 mobile_libs/libelementary.so.%{version}.mobile %{buildroot}%{_libdir}
-%endif
+install -m 0755 mobile_libs/libelementary.so.%{version}.mobile %{buildroot}%{_libdir}
 
 mkdir -p %{buildroot}%{_tmpfilesdir}
 install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/elementary.conf
@@ -235,23 +179,32 @@ install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/elementary.conf
 %{_datadir}/icons/elementary.png
 %{_tmpfilesdir}/elementary.conf
 
+%exclude %{_libdir}/libelementary.so.%{version}.mobile
 %exclude %{_datadir}/elementary/config/
 
-# This subpackage is a workaround to support Tizen mobile/wearable functionalities in
-# Tizen 4.0 Unified environment where all the profiles coexist in one repository.
-# With the supposed refactoring efforts, this must be removed afterwards.
-# This is simply for the backward compatibility during the refactoring efforts.
-%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
-# If it is common/tv/ivi/"unified"
-%post extension-mobile
+%post mobile
 mv %{_libdir}/libelementary.so.%{version}.mobile %{_libdir}/libelementary.so.%{version}
 /sbin/ldconfig
-%postun extension-mobile -p /sbin/ldconfig
-%files extension-mobile
+
+%preun mobile
+mv %{_libdir}/libelementary.so.%{version} %{_libdir}/libelementary.so.%{version}.mobile
+
+%postun mobile -p /sbin/ldconfig
+
+%files mobile
 %manifest %{name}.manifest
-# 4 files (elc_ctxpopup.c, elm_widget_ctxpopup.h, elm_genlist.c and elm_widget_genlist.h in mobile_lib) affects libelementary
-%{_libdir}/libelementary.so.%{version}.mobile
-%endif
+%defattr(-,root,root,-)
+%license COPYING
+%{_libdir}/edje/*
+%{_libdir}/elementary/modules/*
+%{_libdir}/*.so.*
+%{_datadir}/elementary/edje_externals/*
+%{_datadir}/icons/elementary.png
+%{_tmpfilesdir}/elementary.conf
+
+%exclude %{_libdir}/libelementary.so.%{version}
+%exclude %{_datadir}/elementary/config/
+
 
 %if ! %dbus_unavailable
 %files examples