Name: stc-manager
Summary: STC(Smart Traffic Control) manager
-Version: 0.0.6
+Version: 0.0.27
Release: 0
Group: Network & Connectivity/Other
License: Apache-2.0
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(capi-system-info)
%if %{?enable_database} == YES
BuildRequires: pkgconfig(sqlite3)
%description
A smart traffic control manager to manage traffic counting and bandwidth limitation
+%package plugin
+Summary: STC manager plugin
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(syspopup-caller)
+
+%description plugin
+A smart traffic control manager extension for plugin
+
%prep
%setup -q
chmod 644 %{SOURCE0}
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DBIN_DIR=%{_bindir} \
+ -DLIB_PATH=%{_lib} \
-DENABLE_DATABASE=%{enable_database} \
-DDATABASE_FULL_PATH=%{database_full_path} \
-DENABLE_STATISTICS=%{enable_statistics} \
mkdir -p %{buildroot}/opt/usr/dbspace
sqlite3 %{buildroot}%{database_full_path} < %{buildroot}/usr/share/traffic_db.sql
rm %{buildroot}/usr/share/traffic_db.sql
- sqlite3 %{buildroot}%{database_full_path} < %{buildroot}/usr/share/exception_db.sql
- rm %{buildroot}/usr/share/exception_db.sql
%endif
#Systemd service file
mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
ln -s ../stc-manager.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/stc-manager.service
-mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
-cp resources/dbus/net.stc.service %{buildroot}%{_datadir}/dbus-1/system-services/
-
#DBus DAC (stc-manager.manifest enables DBus SMACK)
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
cp resources/dbus/stc-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/stc-manager.conf
#DBus DAC
%attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
-%attr(644,-,-) %{_datadir}/dbus-1/system-services/*.service
%if %{?enable_database} == YES
%config(noreplace) %attr(660, root, root) %{database_full_path}
%config(noreplace) %attr(660, root, root) %{database_full_path}-journal
%endif
+
+%files plugin
+%manifest %{name}.manifest
+%attr(644, -,-) %{_datadir}/icons/*.png
+%attr(500,root,root) %{_libdir}/stc-manager-plugin.so