1 %define DBDIR "/opt/dbspace"
6 VCS: magnolia/framework/appfw/badge#badge_0.0.2-2-34-g7d493a8a797f0022faafaa25561d2e85a2bde6bf
9 Source0: %{name}-%{version}.tar.gz
10 BuildRequires: pkgconfig(aul)
11 BuildRequires: pkgconfig(dbus-1)
12 BuildRequires: pkgconfig(dbus-glib-1)
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(vconf)
15 BuildRequires: pkgconfig(com-core)
17 Requires(post): /sbin/ldconfig
18 requires(postun): /sbin/ldconfig
20 Client/Server library for updating badge information
26 Summary: Badge library (devel)
27 Group: Development/Libraries
28 Requires: %{name} = %{version}-%{release}
31 Development files needed to build software that needs to system a system badge.
33 %package service-devel
34 Summary: Badge library (service-devel)
35 Group: Development/Libraries
36 Requires: %{name} = %{version}-%{release}
38 %description service-devel
39 Development files needed to build badge service
42 %if 0%{?tizen_build_binary_release_type_eng}
43 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
44 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
45 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
47 %if 0%{?sec_build_binary_debug_enable}
48 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
49 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
50 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
52 export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
53 LDFLAGS="$LDFLAGS" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
59 mkdir -p %{buildroot}/usr/share/license
60 cp -f LICENSE %{buildroot}/usr/share/license/%{name}
71 if [ ! -f %{DBDIR}/.%{name}.db ]
73 sqlite3 %{DBDIR}/.%{name}.db 'PRAGMA journal_mode = PERSIST;
74 create table if not exists badge_data (
75 pkgname TEXT NOT NULL,
77 badge INTEGER default 0,
78 rowid INTEGER PRIMARY KEY AUTOINCREMENT,
81 create table if not exists badge_option (
82 pkgname TEXT NOT NULL,
83 display INTEGER default 1,
89 chown :5000 %{DBDIR}/.%{name}.db
90 chown :5000 %{DBDIR}/.%{name}.db-journal
91 chmod 640 %{DBDIR}/.%{name}.db
92 chmod 640 %{DBDIR}/.%{name}.db-journal
93 if [ -f /usr/lib/rpm-plugins/msm.so ]
95 chsmack -a 'badge::db' %{DBDIR}/.%{name}.db*
98 %postun -p /sbin/ldconfig
101 %manifest badge.manifest
102 %defattr(-,root,root,-)
103 %{_libdir}/libbadge.so*
104 /usr/share/license/%{name}
107 %defattr(-,root,root,-)
108 %{_includedir}/badge/badge.h
109 %{_includedir}/badge/badge_error.h
110 %{_includedir}/badge/badge_setting.h
111 %{_libdir}/pkgconfig/%{name}.pc
114 %defattr(-,root,root,-)
115 %{_includedir}/badge/service/badge_db.h
116 %{_includedir}/badge/service/badge_setting_service.h
117 %{_libdir}/pkgconfig/badge-service.pc