From: Youngjae Shin Date: Fri, 21 Apr 2017 06:28:33 +0000 (+0900) Subject: revise packaging X-Git-Tag: accepted/tizen/unified/20170429.024033~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F126363%2F1;p=platform%2Fcore%2Fpim%2Fcontacts-service.git revise packaging Change-Id: I3c6a1eca80138a6fe19afa5685d2e02e3bfc6576 --- diff --git a/packaging/contacts-service.spec b/packaging/contacts-service.spec index 952ab53..f371c63 100644 --- a/packaging/contacts-service.spec +++ b/packaging/contacts-service.spec @@ -30,47 +30,32 @@ BuildRequires: pkgconfig(capi-system-info) BuildRequires: pkgconfig(icu-uc) BuildRequires: pkgconfig(phonenumber-utils) BuildRequires: pkgconfig(libsystemd) - Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig -Provides: %{name}2-profile_common = %{version}-%{release} -Provides: %{name}2-profile_wearable = %{version}-%{release} -Provides: %{name}2-profile_tv = %{version}-%{release} -Provides: %{name}2-profile_ivi = %{version}-%{release} %define upgrade_script_path /usr/share/upgrade/scripts %description Contacts Service Library -%package -n %{name}2-profile_mobile -Summary: Contacts-service extension for mobile profile -Requires: %{name}2 = %{version}-%{release} -%description -n %{name}2-profile_mobile -Service file of Tizen mobile profile is different from other profiles. -This package supplies the service file for Tizen mobile profile. - -%package -n contacts-service2 +%package -n lib%{name} Summary: New Contacts service library +Requires: %{name} = %{version}-%{release} +%description -n lib%{name} +New Contact Serivce Client Library -%description -n contacts-service2 -New Contact Serivce 2 Client Library - - -%package -n contacts-service2-devel -Summary: New Contacts Service(devel) +%package devel +Summary: Contacts Service(devel) Group: Social & Content/Development -Requires: %{name}2 = %{version}-%{release} - -%description -n contacts-service2-devel +Requires: lib%{name} = %{version}-%{release} +%description devel New Contacts Service Library (devel) files -%package -n contacts-service2-test -Summary: New Contacts Service(test) +%package test +Summary: Contacts Service(test) Group: Social & Content/Testing -Requires: %{name}2 = %{version}-%{release} - -%description -n contacts-service2-test +Requires: lib%{name} = %{version}-%{release} +%description test New Contacts Service Test Program @@ -81,10 +66,6 @@ cp %{SOURCE1001} ./%{name}.manifest cp %{SOURCE1001} ./%{name}-test.manifest %build -export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE" -export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE" -export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE" - MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake . -DCMAKE_VERBOSE_MAKEFILE=OFF -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DBIN_INSTALL_DIR:PATH=%{_bindir} \ -DTZ_SYS_ETC=%TZ_SYS_ETC -DENABLE_LOG_FEATURE:BOOL=ON @@ -107,26 +88,43 @@ mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants install -m 0644 %SOURCE2 %{buildroot}%{_unitdir_user}/contacts-service.socket ln -s ../contacts-service.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/contacts-service.socket -%post -n contacts-service2 -p /sbin/ldconfig -%post -n contacts-service2-test +%post +_PROFILE=`grep "TZ_BUILD_PROFILE" "/etc/tizen-build.conf" | awk -F '=' '{print $2}'` +if [ "$_PROFILE" != "mobile" ] +then + rm %{_unitdir_user}/contacts-service.service.mobile +else + mv %{_unitdir_user}/contacts-service.service.mobile %{_unitdir_user}/contacts-service.service +fi + +%post test chsmack -e "User" /usr/bin/contacts-service-test -%postun -n contacts-service2 -p /sbin/ldconfig +%post -n lib%{name} -p /sbin/ldconfig + -%files -n contacts-service2 +%postun -n lib%{name} -p /sbin/ldconfig + + +%files %manifest %{name}.manifest %defattr(-,root,root,-) -%{_libdir}/libcontacts-service2.so.* %{_bindir}/contacts-service-ipcd* %{_unitdir_user}/contacts-service.service +%{_unitdir_user}/contacts-service.service.mobile %{_unitdir_user}/default.target.wants/contacts-service.service %{_unitdir_user}/sockets.target.wants/contacts-service.socket %{_unitdir_user}/contacts-service.socket -%license LICENSE.APLv2 %{upgrade_script_path}/500.%{name}.sh +%license LICENSE.APLv2 +%files -n lib%{name} +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/libcontacts-service2.so.* +%license LICENSE.APLv2 -%files -n contacts-service2-devel +%files devel %defattr(-,root,root,-) %{_libdir}/libcontacts-service2.so %{_libdir}/pkgconfig/contacts-service2.pc @@ -134,14 +132,8 @@ chsmack -e "User" /usr/bin/contacts-service-test %{_includedir}/contacts-svc/contacts_*.h %license LICENSE.APLv2 - -%files -n contacts-service2-test +%files test %manifest %{name}-test.manifest %defattr(-,root,root,-) %{_bindir}/contacts-service-test -%license LICENSE.APLv2 - -%post -n %{name}2-profile_mobile -mv %{_unitdir_user}/contacts-service.service.mobile %{_unitdir_user}/contacts-service.service -%files -n %{name}2-profile_mobile -%{_unitdir_user}/contacts-service.service.mobile +%license LICENSE.APLv2 \ No newline at end of file