Initialize Tizen 2.3
[framework/system/dlog.git] / packaging / dlog.spec
1 Name:       dlog
2 Summary:    Logging service
3 Version:    0.4.1
4 Release:    15
5 Group:      System/Libraries
6 License:    Apache License, Version 2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source101:  packaging/dlogutil.manifest
9 Source102:  packaging/libdlog.manifest
10 Source201:  packaging/dlog.conf.in
11 Source202:  packaging/dlog_logger.conf.in
12 Source203:  packaging/dlog_logger.conf-micro.in
13 Source301:  packaging/dlog_logger.service
14 BuildRequires: pkgconfig(libsystemd-journal)
15 Requires(post): coreutils
16
17 %description
18 dlog API library
19
20 %package -n libdlog
21 Summary:    Logging service dlog API
22 Group:      Development/Libraries
23 Requires(post): smack-utils
24
25 %description -n libdlog
26 dlog API library
27
28 %package -n libdlog-devel
29 Summary:    Logging service dlog API
30 Group:      Development/Libraries
31 Requires:   lib%{name} = %{?epoch:%{epoch}:}%{version}-%{release}
32
33 %description -n libdlog-devel
34 dlog API library
35
36
37 %package -n dlogutil
38 Summary:    print log data to the screen
39 Group:      Development/Libraries
40 Requires:   lib%{name} = %{?epoch:%{epoch}:}%{version}-%{release}
41 Requires(post): /usr/bin/systemctl
42 Requires(postun): /usr/bin/systemctl
43 Requires(preun): /usr/bin/systemctl
44
45 %description -n dlogutil
46 Utilities for print log data
47
48 %prep
49 %setup -q
50
51 %build
52 cp %{SOURCE101} .
53 cp %{SOURCE102} .
54 %autogen --disable-static
55 %configure --disable-static \
56 %if 0%{?tizen_build_binary_release_type_daily}
57                         --enable-fatal_on \
58 %endif
59 %if 0%{?tizen_build_binary_release_type_eng}
60                         --enable-engineer_mode \
61 %endif
62 %if 0%{?sec_build_binary_debug_enable}
63                         --enable-debug_enable \
64 %endif
65                         --without-systemd-journal
66 make %{?jobs:-j%jobs}
67
68 %install
69 rm -rf %{buildroot}
70 %make_install
71 mkdir -p %{buildroot}/usr/bin/
72 cp %{_builddir}/%{name}-%{version}/scripts/dlogctrl %{buildroot}/usr/bin/dlogctrl
73
74 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
75 install -m 0644 %SOURCE301 %{buildroot}%{_libdir}/systemd/system/
76
77 ln -s ../dlog_logger.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/dlog_logger.service
78
79 mkdir -p %{buildroot}/usr/share/license
80 cp LICENSE.Apache-2.0 %{buildroot}/usr/share/license/%{name}
81 cp LICENSE.Apache-2.0 %{buildroot}/usr/share/license/libdlog
82 cp LICENSE.Apache-2.0 %{buildroot}/usr/share/license/dlogutil
83
84 mkdir -p %{buildroot}/opt/etc
85 cp %SOURCE201 %{buildroot}/opt/etc/dlog.conf
86 %if "%{_repository}" == "wearable"
87 cp %SOURCE203 %{buildroot}/opt/etc/dlog_logger.conf
88 %else
89 cp %SOURCE202 %{buildroot}/opt/etc/dlog_logger.conf
90 %endif
91
92 %preun -n dlogutil
93
94 %post -n dlogutil
95 systemctl daemon-reload
96
97 %postun -n dlogutil
98 systemctl daemon-reload
99
100 %post -n libdlog
101 /sbin/ldconfig
102
103 %postun -n libdlog
104 /sbin/ldconfig
105
106 %files
107 /usr/share/license/%{name}
108
109 %files  -n dlogutil
110 %manifest dlogutil.manifest
111 /usr/share/license/dlogutil
112 %attr(755,root,app_logging) %{_bindir}/dlog_logger
113 %attr(755,root,app_logging) %{_bindir}/dlogutil
114 %attr(755,root,app_logging) %{_bindir}/dlogctrl
115 %attr(755,root,app_logging) /opt/etc/dlog_logger.conf
116 %{_libdir}/systemd/system/dlog_logger.service
117 %{_libdir}/systemd/system/multi-user.target.wants/dlog_logger.service
118
119
120 %files  -n libdlog
121 %manifest libdlog.manifest
122 /usr/share/license/libdlog
123 %{_libdir}/libdlog.so.0
124 %{_libdir}/libdlog.so.0.0.0
125 %attr(664,root,app_logging) /opt/etc/dlog.conf
126
127 %files -n libdlog-devel
128 %{_includedir}/dlog/dlog.h
129 %{_libdir}/pkgconfig/dlog.pc
130 %{_libdir}/libdlog.so
131