-Name: app-core
-Summary: Application basic
-Version: 1.2
-Release: 41
-Group: Application Framework
-License: Apache License, Version 2.0
-Source0: app-core-%{version}.tar.gz
-Source101: packaging/core-efl.target
+%bcond_with x
+%bcond_with wayland
+
+Name: app-core
+Summary: Application basic
+Version: 1.2
+Release: 0
+Group: Application Framework/Libraries
+License: Apache-2.0
+Source0: app-core-%{version}.tar.gz
+%if %{with x}
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(eina)
+%else
+%if %{with wayland}
+BuildRequires: pkgconfig(ecore-wayland)
+%endif
+%endif
+Source1001: app-core.manifest
+BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(sensor)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(rua)
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(x11)
-BuildRequires: pkgconfig(sysman)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(ecore)
-BuildRequires: pkgconfig(ecore-x)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: cmake
-BuildRequires: sysman-devel
-
%description
SLP common application basic
-
%package efl
Summary: App basic EFL
Group: Development/Libraries
%description efl
Application basic EFL
+
%package efl-devel
Summary: App basic EFL (devel)
Group: Development/Libraries
%description efl-devel
Application basic EFL (devel)
+
%package common
Summary: App basics common
Group: Development/Libraries
%description common
Application basics common
+
%package common-devel
Summary: App basics common (devel)
Group: Development/Libraries
Requires: pkgconfig(vconf)
Requires: pkgconfig(elementary)
Requires: pkgconfig(aul)
+%if %{with x}
+Requires: pkgconfig(x11)
+%endif
%description common-devel
Application basics common (devel)
+
%package template
Summary: App basics template
Group: Development/Libraries
%prep
%setup -q
+cp %{SOURCE1001} .
+
%build
-%cmake . -DENABLE_GTK=OFF
+%cmake . \
+%if %{with wayland}
+-Dwith_wayland=TRUE\
+%endif
+%if %{with x}
+-Dwith_x11=TRUE\
+%endif
+-DENABLE_GTK=OFF
+
+make %{?_smp_mflags}
-make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
%make_install
-install -d %{buildroot}%{_prefix}/lib/systemd/user/core-efl.target.wants
-install -m0644 %{SOURCE101} %{buildroot}%{_prefix}/lib/systemd/user/
-%post efl -p /sbin/ldconfig
-
-%postun efl -p /sbin/ldconfig
-
-%post common -p /sbin/ldconfig
-
-%postun common -p /sbin/ldconfig
+%post -n app-core-efl -p /sbin/ldconfig
+%postun -n app-core-efl -p /sbin/ldconfig
+%post -n app-core-common -p /sbin/ldconfig
+%postun -n app-core-common -p /sbin/ldconfig
%files efl
-%manifest app-core.manifest
-%defattr(-,root,root,-)
+%manifest %{name}.manifest
%{_libdir}/libappcore-efl.so.*
+%license LICENSE
%files efl-devel
-%defattr(-,root,root,-)
+%manifest %{name}.manifest
%{_includedir}/appcore/appcore-efl.h
%{_libdir}/libappcore-efl.so
%{_libdir}/pkgconfig/appcore-efl.pc
%files common
-%manifest app-core.manifest
-%defattr(-,root,root,-)
+%manifest %{name}.manifest
%{_libdir}/libappcore-common.so.*
-%{_prefix}/lib/systemd/user/core-efl.target
-%{_prefix}/lib/systemd/user/core-efl.target.wants/
+%license LICENSE
%files common-devel
-%defattr(-,root,root,-)
+%manifest %{name}.manifest
%{_libdir}/libappcore-common.so
%{_libdir}/pkgconfig/appcore-common.pc
%{_includedir}/appcore/appcore-common.h
%{_includedir}/SLP_Appcore_PG.h
-