1 %define DBDIR "/usr/dbspace"
6 Group: Applications/Core Applications
8 Source0: %{name}-%{version}.tar.gz
9 BuildRequires: pkgconfig(aul)
10 BuildRequires: pkgconfig(dbus-1)
11 BuildRequires: pkgconfig(dbus-glib-1)
12 BuildRequires: pkgconfig(dlog)
13 BuildRequires: pkgconfig(vconf)
14 BuildRequires: pkgconfig(com-core)
15 BuildRequires: pkgconfig(capi-appfw-package-manager)
16 BuildRequires: pkgconfig(db-util)
18 Requires(post): /sbin/ldconfig
19 requires(postun): /sbin/ldconfig
21 Client/Server library for updating badge information
27 Summary: Badge library (devel)
28 Group: Development/Libraries
29 Requires: %{name} = %{version}-%{release}
32 Development files needed to build software that needs to system a system badge.
34 %package service-devel
35 Summary: Badge library (service-devel)
36 Group: Development/Libraries
37 Requires: %{name} = %{version}-%{release}
39 %description service-devel
40 Development files needed to build badge service
43 %if 0%{?tizen_build_binary_release_type_eng}
44 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
45 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
46 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
48 %if 0%{?sec_build_binary_debug_enable}
49 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
50 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
51 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
53 export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
54 LDFLAGS="$LDFLAGS" %cmake .
60 mkdir -p %{buildroot}/usr/share/license
61 cp -f LICENSE %{buildroot}/usr/share/license/%{name}
72 if [ ! -f %{DBDIR}/.%{name}.db ]
74 sqlite3 %{DBDIR}/.%{name}.db 'PRAGMA journal_mode = PERSIST;
75 create table if not exists badge_data (
76 pkgname TEXT NOT NULL,
78 badge INTEGER default 0,
79 rowid INTEGER PRIMARY KEY AUTOINCREMENT,
82 create table if not exists badge_option (
83 pkgname TEXT NOT NULL,
84 display INTEGER default 1,
90 chown :5000 %{DBDIR}/.%{name}.db
91 chown :5000 %{DBDIR}/.%{name}.db-journal
92 chmod 644 %{DBDIR}/.%{name}.db
93 chmod 644 %{DBDIR}/.%{name}.db-journal
95 %postun -p /sbin/ldconfig
98 %manifest badge.manifest
99 %defattr(-,root,root,-)
100 %{_libdir}/libbadge.so*
101 %{_datarootdir}/license/%{name}
104 %defattr(-,root,root,-)
105 %{_includedir}/badge/badge.h
106 %{_includedir}/badge/badge_error.h
107 %{_includedir}/badge/badge_internal.h
108 %{_libdir}/pkgconfig/%{name}.pc
111 %defattr(-,root,root,-)
112 %{_includedir}/badge/service/badge_db.h
113 %{_includedir}/badge/service/badge_setting_service.h
114 %{_libdir}/pkgconfig/badge-service.pc