0295744ab8455d2f499ae697b6ae37bdf31da2d8
[platform/core/api/notification.git] / packaging / notification.spec
1 %bcond_with wayland
2 Name:       notification
3 Summary:    Notification library
4 Version:    0.2.41
5 Release:    1
6 Group:      TBD
7 License:    Apache-2.0
8 Source0:    %{name}-%{version}.tar.gz
9 BuildRequires: pkgconfig(sqlite3)
10 BuildRequires: pkgconfig(db-util)
11 BuildRequires: pkgconfig(vconf)
12 BuildRequires: pkgconfig(bundle)
13 BuildRequires: pkgconfig(dbus-1)
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(aul)
16 BuildRequires: pkgconfig(appsvc)
17 BuildRequires: pkgconfig(dbus-glib-1)
18 BuildRequires: pkgconfig(appcore-common)
19 BuildRequires: pkgconfig(capi-appfw-application)
20 BuildRequires: pkgconfig(capi-appfw-app-manager)
21 BuildRequires: pkgconfig(capi-appfw-package-manager)
22 BuildRequires: pkgconfig(pkgmgr-info)
23 BuildRequires: pkgconfig(libtzplatform-config)
24 BuildRequires: pkgconfig(gio-2.0)
25 BuildRequires: pkgconfig(glib-2.0)
26
27 BuildRequires: cmake
28 Requires(post): /sbin/ldconfig
29 Requires(post): %{TZ_SYS_BIN}/sqlite3
30 Requires(postun): /sbin/ldconfig
31
32 %description
33 Client/Server library for sending notifications.
34
35 %prep
36 %setup -q
37
38 %package devel
39 Summary:    Notification library (devel)
40 Group:      Development/Libraries
41 Requires:   %{name} = %{version}-%{release}
42
43 %description devel
44 Development files needed to build software that needs to system a system notification.
45
46 %build
47 %if 0%{?tizen_build_binary_release_type_eng}
48 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
49 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
50 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
51 %endif
52 %if 0%{?sec_build_binary_debug_enable}
53 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
54 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
55 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
56 %endif
57 export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
58 LDFLAGS="$LDFLAGS"
59 %if %{with wayland}
60 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DHAVE_WAYLAND=On
61 %else
62 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DHAVE_X11=On
63 %endif
64 make %{?jobs:-j%jobs}
65
66 %install
67 rm -rf %{buildroot}
68 %make_install
69
70 mkdir -p %{buildroot}%{TZ_SYS_SHARE}/license
71 cp -f LICENSE %{buildroot}%{TZ_SYS_SHARE}/license/%{name}
72
73 %clean
74 rm -rf %{buildroot}
75
76 %post
77 /sbin/ldconfig
78
79 if [ ! -d %{TZ_SYS_DB} ]
80 then
81         mkdir %{TZ_SYS_DB}
82 fi
83
84 %postun -p /sbin/ldconfig
85
86 %files
87 %manifest notification.manifest
88 %defattr(-,root,root,-)
89 %{_libdir}/libnotification.so*
90 %{TZ_SYS_SHARE}/license/%{name}
91 %attr(755,root,root) %{_sysconfdir}/gumd/useradd.d/11_notification-add.post
92 %{_bindir}/notification_init
93 #%{_bindir}/notification-test-app
94
95 %files devel
96 %defattr(-,root,root,-)
97 %{_includedir}/notification/notification.h
98 %{_includedir}/notification/notification_db.h
99 %{_includedir}/notification/notification_internal.h
100 %{_includedir}/notification/notification_error.h
101 %{_includedir}/notification/notification_type.h
102 %{_includedir}/notification/notification_list.h
103 %{_includedir}/notification/notification_ongoing.h
104 %{_includedir}/notification/notification_ongoing_flag.h
105 %{_includedir}/notification/notification_text_domain.h
106 %{_includedir}/notification/notification_status.h
107 %{_includedir}/notification/notification_status_internal.h
108 %{_includedir}/notification/notification_setting.h
109 %{_includedir}/notification/notification_setting_internal.h
110 %{_includedir}/notification/notification_ipc.h
111 %{_includedir}/notification/notification_noti.h
112 %{_includedir}/notification/notification_setting_service.h
113 %{_libdir}/pkgconfig/notification.pc