cleanup specfile for packaging
[profile/ivi/automotive-dlt.git] / packaging / automotive-dlt.spec
1 Name:             automotive-dlt
2 License:          LGPLv2.1
3 Group:            System/Daemons
4 Summary:          Automotive DLT
5 Version:          2.2.0
6 Release:          1
7 Source:           %{name}-%{version}.tar.bz2
8 BuildRequires:    cmake
9 Requires(post):   /sbin/ldconfig
10 Requires(postun): /sbin/ldconfig
11
12 %description
13 Automotive Diagnostic Log and Tracing Daemon
14
15 %package devel
16 License:         LGPLv2.1
17 Summary:         Automotive DLT Development Package
18 Group:           System/Development
19 Requires:        %{name} = %{version}-%{release}
20
21 %description devel
22 Files needed for developing against the Automotive DLT
23
24 %prep
25 %setup -q -n %{name}-%{version}
26
27 %build
28 mkdir build
29 cd build
30
31 cmake -DCMAKE_INSTALL_PREFIX=/usr ..
32 make %{?jobs:-j %jobs}
33
34 %install
35 rm -rf "$RPM_BUILD_ROOT"
36 cd build
37 make install DESTDIR=$RPM_BUILD_ROOT
38
39 # fix the documentation install location
40 mkdir -p $RPM_BUILD_ROOT%{_docdir}
41 mv $RPM_BUILD_ROOT/usr/doc/dlt2 $RPM_BUILD_ROOT%{_docdir}/dlt
42
43 %post -p /sbin/ldconfig
44
45 %postun -p /sbin/ldconfig
46
47 %clean
48 rm -rf "$RPM_BUILD_ROOT"
49
50 %files
51 %defattr(-,root,root,-)
52 %{_bindir}/*
53 %{_libdir}/*so.*
54
55 %files devel
56 %defattr(-,root,root,-)
57 %{_docdir}/dlt/*
58 %{_includedir}/dlt/*
59 %{_libdir}/*.so
60 %{_libdir}/pkgconfig/*.pc