Remove syspopup app
[platform/core/base/syspopup.git] / packaging / syspopup.spec
1 %bcond_with x
2 %bcond_with wayland
3
4 Name:           syspopup
5 Summary:        Syspopup package
6 Version:        0.0.100
7 Release:        0
8 Group:          System/Libraries
9 License:        Apache-2.0
10 Source0:        syspopup-%{version}.tar.gz
11 Source1001:     %{name}.manifest
12 Source1002:     %{name}-devel.manifest
13 Source1003:     %{name}-caller.manifest
14 Source1004:     %{name}-caller-devel.manifest
15
16 BuildRequires:  cmake
17 BuildRequires:  pkgconfig(sqlite3)
18 BuildRequires:  pkgconfig(bundle)
19 BuildRequires:  pkgconfig(dlog)
20 BuildRequires:  pkgconfig(glib-2.0)
21 BuildRequires:  pkgconfig(gio-2.0)
22 %if %{with wayland}
23 BuildRequires:  pkgconfig(ecore-wayland)
24 BuildRequires:  pkgconfig(capi-ui-efl-util)
25 %else
26 %if %{with x}
27 BuildRequires:  pkgconfig(utilX)
28 BuildRequires:  pkgconfig(x11)
29 BuildRequires:  pkgconfig(ecore-x)
30 %endif
31 %endif
32 BuildRequires:  pkgconfig(evas)
33 BuildRequires:  pkgconfig(elementary)
34 BuildRequires:  pkgconfig(libtzplatform-config)
35 BuildRequires:  pkgconfig(libsystemd-daemon)
36 BuildRequires:  pkgconfig(aul)
37
38 %define upgrade_script_path /usr/share/upgrade/scripts
39 %define upgrade_data_path /usr/share/upgrade/data
40
41 %if "%{?profile}" == "wearable"
42 %define profile_wearable 1
43 %else
44 %define profile_wearable 0
45 %endif
46
47 %description
48 syspopup package for popup
49
50 %package devel
51 Summary:    Syspopup development package
52 Group:      System/Libraries
53 Requires:   %{name} = %{version}-%{release}
54
55 %description devel
56 syspopup development package popup
57
58 %package caller
59 Summary:          Syspopup-caller package
60 Group:            System/Libraries
61 Requires:         %{name} = %{version}-%{release}
62 Requires(post):   /sbin/ldconfig
63 Requires(postun): /sbin/ldconfig
64
65 %description caller
66 syspopup-caller package for popup
67
68 %package caller-devel
69 Summary:    Syspopup-caller development package
70 Group:      System/Development
71 Requires:   %{name} = %{version}-%{release}
72
73 %description caller-devel
74 syspopup-caller development package for popup
75
76 %prep
77 %setup -q
78 sed -i %{SOURCE1001} -e "s|TZ_SYS_DB|%TZ_SYS_DB|g"
79 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} .
80
81 %build
82 %if %{?profile_wearable}
83 PROFILE_WEARABLE=ON
84 %endif
85
86 %cmake \
87 %if %{with wayland}
88         -Dwith_wayland=TRUE \
89 %else
90 %if %{with x}
91         -Dwith_x11=TRUE \
92 %endif
93 %endif
94         -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
95         -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
96         -DEXTRA_CFLAGS=-fPIC \
97         -DPROFILE_WEARABLE:BOOL=${PROFILE_WEARABLE} \
98         .
99
100 make %{?jobs:-j%jobs}
101
102 %install
103 %make_install
104 mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license
105 install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}
106 install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-devel
107 install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-caller
108 install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-caller-devel
109
110 mkdir -p %{buildroot}%{TZ_SYS_DB}
111 sqlite3 %{buildroot}%{TZ_SYS_DB}/.syspopup.db < %{buildroot}%{TZ_SYS_RO_SHARE}/syspopup/syspopup_db.sql
112 rm -rf %{buildroot}%{TZ_SYS_RO_SHARE}/syspopup/syspopup_db.sql
113 rm -rf %{buildroot}%{TZ_SYS_DB}/.syspopup.db-journal
114
115 touch %{buildroot}%{_datadir}/popup_noti_term
116
117 mkdir -p %{buildroot}%{upgrade_script_path}
118 mkdir -p %{buildroot}%{upgrade_data_path}
119 cp -f scripts/102.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
120 cp -f %{buildroot}%{TZ_SYS_DB}/.syspopup.db %{buildroot}%{upgrade_data_path}
121
122 %post -p /sbin/ldconfig
123
124 %postun -p /sbin/ldconfig
125
126 %post caller -p /sbin/ldconfig
127
128 %postun caller -p /sbin/ldconfig
129
130 %files
131 %manifest %{name}.manifest
132 %defattr(-,root,root,-)
133 %{_bindir}/sp_test
134 %{_libdir}/libsyspopup.so.0.1.0
135 %{_datadir}/popup_noti_term
136 %attr(644,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.syspopup.db
137 %TZ_SYS_RO_SHARE/license/%{name}
138 %{upgrade_script_path}/102.syspopup_upgrade.sh
139 %{upgrade_data_path}/.syspopup.db
140
141 %files devel
142 %manifest %{name}-devel.manifest
143 %defattr(-,root,root,-)
144 %{_includedir}/SLP_SYSPOPUP_PG.h
145 %{_includedir}/syspopup.h
146 %{_libdir}/libsyspopup.so
147 %{_libdir}/pkgconfig/syspopup.pc
148 %TZ_SYS_RO_SHARE/license/%{name}-devel
149
150 %files caller
151 %manifest %{name}-caller.manifest
152 %defattr(-,root,root,-)
153 %{_libdir}/libsyspopup_caller.so.0.1.0
154 %TZ_SYS_RO_SHARE/license/%{name}-caller
155
156 %files caller-devel
157 %manifest %{name}-caller-devel.manifest
158 %defattr(-,root,root,-)
159 %{_libdir}/libsyspopup_caller.so
160 %{_includedir}/syspopup_caller.h
161 %{_libdir}/pkgconfig/syspopup-caller.pc
162 %TZ_SYS_RO_SHARE/license/%{name}-caller-devel