Update dlog spec file
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Wed, 18 Jun 2014 09:23:44 +0000 (11:23 +0200)
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Wed, 18 Jun 2014 09:23:44 +0000 (11:23 +0200)
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
proto-meta-Tizen_generic/specfile-initial/dlog/packaging/dlog.spec [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 500e092..0d638a3
@@ -1,20 +1,14 @@
-%bcond_with dlog_to_systemd_journal
-
 Name:       dlog
 Summary:    Logging service
 Version:    0.4.1
-Release:    0
+Release:    15
 Group:      System/Libraries
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
-Source101:  dlog-main.service
-Source102:  dlog-radio.service
-Source103:  dlog.manifest
+Source1:    dlog.manifest
 
-%if %{with dlog_to_systemd_journal}
 BuildRequires: pkgconfig(libsystemd-journal)
-%endif
-BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(libtzplatform-config)
 
 %description
 dlog API library
@@ -32,80 +26,36 @@ Requires:   lib%{name} = %{version}-%{release}
 %description -n libdlog-devel
 dlog API library
 
-
 %package -n dlogutil
-Summary:    Print log data to the screen
+Summary:    Manages dlog configuration
 Requires:   lib%{name} = %{version}-%{release}
-Requires(post): /usr/bin/systemctl
-Requires(postun): /usr/bin/systemctl
-Requires(preun): /usr/bin/systemctl
 
 %description -n dlogutil
-Utilities for print log data
+Utilities for managing dlog configuration
 
 %prep
 %setup -q
-cp %{SOURCE103} .
+cp %{SOURCE1} .
 
 %build
 %autogen
-%configure --disable-static \
-%if %{with dlog_to_systemd_journal}
---with-systemd-journal
-%else
---without-systemd-journal
-%endif
+%configure --disable-static
 
 make %{?jobs:-j%jobs}
 
 %install
 %make_install
-mkdir -p %{buildroot}%{TZ_SYS_ETC}/dump.d/default.d
-cp dlog_dump.sh %{buildroot}%{TZ_SYS_ETC}/dump.d/default.d/dlog_dump.sh
-mkdir -p %{buildroot}/usr/bin/
-cp dlogctrl %{buildroot}/usr/bin/dlogctrl
-
-mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
-
-install -m 0644 %SOURCE101 %{buildroot}%{_unitdir}
-install -m 0644 %SOURCE102 %{buildroot}%{_unitdir}
-
-%install_service multi-user.target.wants dlog-main.service
-%install_service multi-user.target.wants dlog-radio.service
-
-%preun -n dlogutil
-if [ $1 == 0 ]; then
-    systemctl stop dlog-main.service
-    systemctl stop dlog-radio.service
-fi
-
-%post -n dlogutil
-systemctl daemon-reload
-if [ $1 == 1 ]; then
-    systemctl restart dlog-main.service
-    systemctl restart dlog-radio.service
-fi
-
-%postun -n dlogutil
-systemctl daemon-reload
+mkdir -p %{buildroot}%{TZ_SYS_ETC}/dlog
+cp platformlog.conf %{buildroot}%{TZ_SYS_ETC}/dlog/platformlog.conf
+cp dlogctrl %{buildroot}%{TZ_SYS_BIN}/dlogctrl
 
 %post -n libdlog -p /sbin/ldconfig
 
 %postun -n libdlog -p /sbin/ldconfig
 
-%files  -n dlogutil
-%manifest %{name}.manifest
-%license LICENSE.APLv2
-%attr(755,root,root) %{TZ_SYS_ETC}/dump.d/default.d/dlog_dump.sh
-%attr(755,root,app_logging) %{_bindir}/dlogutil
-%attr(755,root,app_logging) %{_bindir}/dlogctrl
-%{_unitdir}/dlog-main.service
-%{_unitdir}/dlog-radio.service
-%{_unitdir}/multi-user.target.wants/dlog-main.service
-%{_unitdir}/multi-user.target.wants/dlog-radio.service
-
 %files  -n libdlog
 %manifest %{name}.manifest
+%config %{TZ_SYS_ETC}/dlog/platformlog.conf
 %{_libdir}/libdlog.so.*
 
 %files -n libdlog-devel
@@ -114,3 +64,7 @@ systemctl daemon-reload
 %{_libdir}/pkgconfig/dlog.pc
 %{_libdir}/libdlog.so
 
+%files -n dlogutil
+%manifest %{name}.manifest
+%license LICENSE.APLv2
+%attr(750,system,app_logging) %{_bindir}/dlogctrl