65cba493f3542b09a87664ada5a136cecf7b3ba4
[profile/ivi/dlt-daemon.git] / packaging / dlt-daemon.spec
1 Name:             dlt
2 License:          MPL-2.0
3 Group:            Automotive/GENIVI
4 Summary:          GENIVI Diagnostic Log and Trace
5 Version:          2.11.0
6 Release:          0
7 Source:           %{name}-%{version}.tar.bz2
8 BuildRequires:    cmake
9 BuildRequires:    pkg-config
10 BuildRequires:    pkgconfig(dbus-1)
11 BuildRequires:    pkgconfig(zlib)
12 BuildRequires:    pkgconfig(libsystemd-journal)
13 Requires(post):   /sbin/ldconfig
14 Requires(postun): /sbin/ldconfig
15
16 %description
17 GENIVI Diagnostic Log and Tracing Daemon and Tools
18
19 %package daemon
20 Summary:    GENIVI DLT Daemon
21
22 %description daemon
23 GENIVI Diagnostic Log and Tracing Daemon
24
25 %package bin
26 Summary:    GENIVI DLT utility binaries
27
28 %description bin
29 GENIVI DLT utility binaries
30
31 %package test
32 Summary:    GENIVI DLT test binaries
33
34 %description test
35 GENIVI DLT test binaries
36
37 %package -n libdlt
38 Summary:    GENIVI DLT library
39
40 %description -n libdlt
41 GENIVI DLT library
42
43 %package devel
44 Summary:         Automotive DLT Development Package
45 Requires:        libdlt = %{version}-%{release}
46
47 %description devel
48 Files needed for developing against the Automotive DLT
49
50 %prep
51 %setup -q -n %{name}-%{version}
52
53 %build
54 mkdir -p build
55 cd build
56
57 cmake -DWITH_SYSTEMD=ON -DWITH_SYSTEMD_JOURNAL=ON \
58       -DWITH_MAN=OFF -DWITH_DLT_EXAMPLES=OFF ..
59 make %{?_smp_mflags}
60
61 %install
62 rm -rf "$RPM_BUILD_ROOT"
63 cd build
64 make install DESTDIR=$RPM_BUILD_ROOT
65
66 %post -n libdlt -p /sbin/ldconfig
67
68 %postun -n libdlt -p /sbin/ldconfig
69
70 %clean
71 rm -rf "$RPM_BUILD_ROOT"
72
73 %files daemon
74 %defattr(-,root,root,-)
75 %{_bindir}/dlt-daemon
76 %config %{_sysconfdir}/dlt.conf
77 %{_prefix}/lib/systemd/system/dlt.service
78 %license MPL.txt
79
80 %files test
81 %defattr(-,root,root,-)
82 %{_bindir}/dlt-test*
83 %{_datadir}/dlt-filetransfer/*
84
85 %files bin
86 %defattr(-,root,root,-)
87 %{_bindir}/dlt-adaptor*
88 %{_bindir}/dlt-convert
89 %{_bindir}/dlt-dbus
90 %{_bindir}/dlt-receive
91 %{_bindir}/dlt-system
92 %{_bindir}/dlt-control
93 %config %{_sysconfdir}/dlt-system.conf
94 %{_prefix}/lib/systemd/system/dlt-adaptor-udp.service
95 %{_prefix}/lib/systemd/system/dlt-receive.service
96 %{_prefix}/lib/systemd/system/dlt-system.service
97 %{_prefix}/lib/systemd/system/dlt-dbus.service
98 %config %{_sysconfdir}/dlt-dbus.conf
99
100 %files -n libdlt
101 %defattr(-,root,root,-)
102 %{_libdir}/*so.*
103
104 %files devel
105 %defattr(-,root,root,-)
106 %{_includedir}/dlt/*
107 %{_libdir}/*.so
108 %{_libdir}/pkgconfig/*.pc