Merge "Add private_sharing codes for sound and vibration" into tizen
[platform/core/api/notification.git] / packaging / notification.spec
1 %bcond_with wayland
2 Name:       notification
3 Summary:    Notification library
4 Version:    0.5.37
5 Release:    1
6 Group:      Applications/Core Applications
7 License:    Apache-2.0
8 Source0:    %{name}-%{version}.tar.gz
9 BuildRequires: pkgconfig(sqlite3)
10 BuildRequires: pkgconfig(vconf)
11 BuildRequires: pkgconfig(bundle)
12 BuildRequires: pkgconfig(dbus-1)
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(aul)
15 BuildRequires: pkgconfig(capi-appfw-app-control)
16 BuildRequires: pkgconfig(capi-appfw-app-common)
17 BuildRequires: pkgconfig(capi-appfw-package-manager)
18 BuildRequires: pkgconfig(pkgmgr-info)
19 BuildRequires: pkgconfig(libtzplatform-config)
20 BuildRequires: pkgconfig(glib-2.0)
21 BuildRequires: pkgconfig(iniparser)
22 BuildRequires: pkgconfig(security-manager)
23 BuildRequires: pkgconfig(libsmack)
24 BuildRequires: pkgconfig(gmock)
25 BuildRequires: pkgconfig(uuid)
26
27 BuildRequires: cmake
28 Requires(post): /sbin/ldconfig
29 Requires(post): %{TZ_SYS_BIN}/sqlite3
30 Requires(postun): /sbin/ldconfig
31
32 %define upgrade_script_path /usr/share/upgrade/scripts
33
34 %description
35 Client/Server library for sending notifications.
36
37 %if 0%{?gcov:1}
38 %package gcov
39 Summary:  Notification API(gcov)
40 Group:    Applications/Core Applications
41
42 %description gcov
43 gcov objects of a notification library
44 %endif
45
46 %prep
47 %setup -q
48
49 %package devel
50 Summary:    Notification library (devel)
51 Group:      Development/Libraries
52 Requires:   %{name} = %{version}-%{release}
53
54 %description devel
55 Development files needed to build software that needs to system a system notification.
56
57 %build
58 %if 0%{?gcov:1}
59 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
60 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
61 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
62 export LDFLAGS+=" -lgcov"
63 %endif
64
65 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
66 %cmake . \
67         -DCMAKE_INSTALL_PREFIX=%{_prefix} \
68         -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
69 %__make %{?jobs:-j%jobs}
70
71 %if 0%{?gcov:1}
72 mkdir -p gcov-obj
73 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
74 %endif
75
76 %check
77 ctest --output-on-failure %{?_smp_mflags}
78
79 %install
80 rm -rf %{buildroot}
81 %make_install
82
83 %if 0%{?gcov:1}
84 mkdir -p %{buildroot}%{_datadir}/gcov/obj
85 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
86 %endif
87
88 mkdir -p %{buildroot}%{upgrade_script_path}
89 cp -f scripts/505.notification_upgrade.sh %{buildroot}%{upgrade_script_path}
90
91 %clean
92 rm -rf %{buildroot}
93
94 %post
95 /sbin/ldconfig
96
97 if [ ! -d %{TZ_SYS_DB} ]
98 then
99         mkdir %{TZ_SYS_DB}
100 fi
101
102 %postun -p /sbin/ldconfig
103
104 %files
105 %manifest notification.manifest
106 %defattr(-,root,root,-)
107 %{_libdir}/libnotification.so.*
108 %license LICENSE
109 %attr(755,root,root) %{_sysconfdir}/gumd/useradd.d/11_notification-add.post
110 %{_bindir}/notification_init
111 %{upgrade_script_path}/505.notification_upgrade.sh
112 #%{_bindir}/notification-test-app
113
114 %files devel
115 %defattr(-,root,root,-)
116 %{_includedir}/notification/notification.h
117 %{_includedir}/notification/notification_db.h
118 %{_includedir}/notification/notification_internal.h
119 %{_includedir}/notification/notification_error.h
120 %{_includedir}/notification/notification_type.h
121 %{_includedir}/notification/notification_list.h
122 %{_includedir}/notification/notification_ongoing.h
123 %{_includedir}/notification/notification_ongoing_flag.h
124 %{_includedir}/notification/notification_text_domain.h
125 %{_includedir}/notification/notification_status.h
126 %{_includedir}/notification/notification_status_internal.h
127 %{_includedir}/notification/notification_setting.h
128 %{_includedir}/notification/notification_setting_internal.h
129 %{_includedir}/notification/notification_ipc.h
130 %{_includedir}/notification/notification_noti.h
131 %{_includedir}/notification/notification_setting_service.h
132 %{_includedir}/notification/notification_viewer.h
133 %{_includedir}/notification/notification_shared_file.h
134 %{_includedir}/notification/notification_type_internal.h
135 %{_libdir}/pkgconfig/notification.pc
136 %{_libdir}/libnotification.so
137
138
139
140 #################################################
141 # notification-ex
142 #################################################
143 %package -n %{name}-ex
144 Summary: Library for developing the notification
145 Group: Applications/Application Utility
146 License: Apache-2.0
147
148 %description -n %{name}-ex
149 Provide APIs to develop the notification.
150
151 %package -n %{name}-ex-devel
152 Summary: Notification development library (dev)
153 Group: Development/Libraries
154 Requires: %{name}-ex
155
156 %description -n %{name}-ex-devel
157 Header & package configuration files to support development of the notification.
158
159 %post -n %{name}-ex
160 /sbin/ldconfig
161
162 %postun -n %{name}-ex -p /sbin/ldconfig
163
164 %files -n %{name}-ex
165 %manifest %{name}-ex.manifest
166 %attr(0644,root,root) %{_libdir}/libnotification-ex.so.*
167 %license LICENSE
168
169 %files -n %{name}-ex-devel
170 %{_includedir}/notification-ex/*
171 %{_libdir}/pkgconfig/notification-ex.pc
172 %attr(0644,root,root) %{_libdir}/libnotification-ex.so
173
174
175 #################################################
176 # notification-ex_unittests
177 #################################################
178 %package -n notification-ex_unittests
179 Summary:    GTest for notification-ex
180 Group:      Development/Libraries
181
182 %description -n notification-ex_unittests
183 GTest for notification-ex
184
185 %files -n notification-ex_unittests
186 %{_bindir}/notification-ex_unittests
187
188 %if 0%{?gcov:1}
189 %files gcov
190 %{_datadir}/gcov/obj/*
191 %endif