Remove hardcoded paths
[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 Source1005:     org.tizen.aul.syspopup.conf.in
16
17 BuildRequires:  cmake
18 BuildRequires:  pkgconfig(sqlite3)
19 BuildRequires:  pkgconfig(bundle)
20 BuildRequires:  pkgconfig(dlog)
21 BuildRequires:  pkgconfig(glib-2.0)
22 BuildRequires:  pkgconfig(gio-2.0)
23 %if %{with wayland}
24 BuildRequires:  pkgconfig(ecore-wayland)
25 BuildRequires:  pkgconfig(capi-ui-efl-util)
26 %else
27 %if %{with x}
28 BuildRequires:  pkgconfig(utilX)
29 BuildRequires:  pkgconfig(x11)
30 BuildRequires:  pkgconfig(ecore-x)
31 %endif
32 %endif
33 BuildRequires:  pkgconfig(evas)
34 BuildRequires:  pkgconfig(elementary)
35 BuildRequires:  pkgconfig(libtzplatform-config)
36 BuildRequires:  pkgconfig(capi-appfw-application)
37 BuildRequires:  pkgconfig(capi-system-system-settings)
38
39 %description
40 syspopup package for popup
41
42 %package devel
43 Summary:    Syspopup development package
44 Group:      System/Libraries
45 Requires:   %{name} = %{version}-%{release}
46
47 %description devel
48 syspopup development package popup
49
50 %package caller
51 Summary:          Syspopup-caller package
52 Group:            System/Libraries
53 Requires:         %{name} = %{version}-%{release}
54 Requires(post):   /sbin/ldconfig
55 Requires(postun): /sbin/ldconfig
56
57 %description caller
58 syspopup-caller package for popup
59
60 %package caller-devel
61 Summary:    Syspopup-caller development package
62 Group:      System/Development
63 Requires:   %{name} = %{version}-%{release}
64
65 %description caller-devel
66 syspopup-caller development package for popup
67
68 %prep
69 %setup -q
70 sed -i %{SOURCE1001} -e "s|TZ_SYS_DB|%TZ_SYS_DB|g"
71 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} .
72
73 %build
74 %cmake . \
75 %if %{with wayland}
76 -Dwith_wayland=TRUE \
77 %else
78 %if %{with x}
79 -Dwith_x11=TRUE \
80 %endif
81 %endif
82 -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
83 -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
84 -DEXTRA_CFLAGS=-fPIC
85
86 make %{?jobs:-j%jobs}
87
88 %install
89 %make_install
90 mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license
91 install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}
92 install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-devel
93 install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-caller
94 install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-caller-devel
95
96 mkdir -p %{buildroot}%{TZ_SYS_DB}
97 sqlite3 %{buildroot}%{TZ_SYS_DB}/.syspopup.db < %{buildroot}%{TZ_SYS_RO_SHARE}/syspopup/syspopup_db.sql
98 rm -rf %{buildroot}%{TZ_SYS_RO_SHARE}/syspopup/syspopup_db.sql
99
100 touch %{buildroot}%{_datadir}/popup_noti_term
101
102 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
103 install -m 0644 %SOURCE1005 %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.tizen.aul.syspopup.conf
104
105 %post -p /sbin/ldconfig
106
107 %postun -p /sbin/ldconfig
108
109 %post caller -p /sbin/ldconfig
110
111 %postun caller -p /sbin/ldconfig
112
113 %files
114 %manifest %{name}.manifest
115 %defattr(-,root,root,-)
116 %{_datadir}/icons/default/small/org.tizen.syspopup-app.png
117 %{_bindir}/sp_test
118 %{_bindir}/syspopup-app
119 %{_libdir}/libsyspopup.so.0.1.0
120 %TZ_SYS_RO_PACKAGES/org.tizen.syspopup-app.xml
121 %{_datadir}/popup_noti_term
122
123 %attr(644,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.syspopup.db
124 %attr(644,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.syspopup.db-journal
125
126 %TZ_SYS_RO_SHARE/license/%{name}
127
128 %files devel
129 %manifest %{name}-devel.manifest
130 %defattr(-,root,root,-)
131 %{_includedir}/SLP_SYSPOPUP_PG.h
132 %{_includedir}/syspopup.h
133 %{_libdir}/libsyspopup.so
134 %{_libdir}/pkgconfig/syspopup.pc
135 %TZ_SYS_RO_SHARE/license/%{name}-devel
136
137 %files caller
138 %manifest %{name}-caller.manifest
139 %defattr(-,root,root,-)
140 %{_libdir}/libsyspopup_caller.so.0.1.0
141 %TZ_SYS_RO_SHARE/license/%{name}-caller
142 %{_sysconfdir}/dbus-1/system.d/org.tizen.aul.syspopup.conf
143
144 %files caller-devel
145 %manifest %{name}-caller-devel.manifest
146 %defattr(-,root,root,-)
147 %{_libdir}/libsyspopup_caller.so
148 %{_includedir}/syspopup_caller.h
149 %{_libdir}/pkgconfig/syspopup-caller.pc
150 %TZ_SYS_RO_SHARE/license/%{name}-caller-devel
151
152
153 %changelog
154 * Tue Aug 13 2013 - Hyungdeuk Kim <hd3.kim@samsung.com>
155 - Add key handler for esc of keyboard
156
157 * Fri Jun 21 2013 - Hyungdeuk Kim <hd3.kim@samsung.com>
158 - Change end key term info of wifi-qs
159
160 * Fri Apr 12 2013 - Hyungdeuk Kim <hd3.kim@samsung.com>
161 - Remove drm syspopup requested by hakjoo.ko
162
163 * Tue Apr 2 2013 - Hyugdeuk Kim <hd3.kim@samsung.com>
164 - Add syspopup_reset_timeout api