libgdbus: Add common internal apis for gdbus
[platform/core/system/libsyscommon.git] / packaging / libsyscommon.spec
1 Name:           libsyscommon
2 Summary:        System Libraries
3 Version:        4.1
4 Release:        0%{?release_flags}
5 License:        Apache-2.0
6 Group:          System/Libraries
7 Source:         %{name}-%{version}.tar.gz
8 %if 0%{?_with_tizen}
9 Source1001:     %{name}.manifest
10 %endif
11
12 BuildRequires:  autoconf
13 BuildRequires:  automake
14 BuildRequires:  libtool
15 BuildRequires:  pkgconfig(glib-2.0) >= 2.44
16 BuildRequires:  pkgconfig(gio-2.0) >= 2.44
17 BuildRequires:  pkgconfig(gio-unix-2.0)
18 BuildRequires:  gperf
19
20 Requires:       /bin/cp
21
22 Requires(post): /sbin/ldconfig
23 Requires(postun): /sbin/ldconfig
24
25 %description
26 System utility libraries.
27
28 %package -n libgdbus
29 Summary:        Dbus library 
30 License:        Apache-2.0
31
32 %description -n libgdbus
33 Internal dbus library
34
35 %package -n libgdbus-devel
36 Summary:        Header files for dbus library 
37 License:        Apache-2.0
38 Requires:       libgdbus = %{version}
39 Requires:       pkgconfig(gio-2.0)
40 Requires:       pkgconfig(gio-unix-2.0)
41 Requires:       pkgconfig(dbus-1)
42
43 %description -n libgdbus-devel
44 Development header files for dbus library.
45
46 %prep
47 %setup -q
48 %if 0%{?_with_tizen}
49 cp %{SOURCE1001} .
50 %endif
51
52 %build
53 %if 0%{?debug_enable}
54 export CFLAGS=$(echo $CFLAGS | sed -e 's/^-g / /g' | sed -e 's/ -g / /g')
55 export CFLAGS=$(echo $CFLAGS | sed -e 's/^-O[0-9] / /g' | sed -e 's/ $-O[0-9] / /g')
56 export CFLAGS=$(echo $CFLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2 / /g')
57 export CFLAGS="-O0 -g $CFLAGS"
58 %endif
59
60 ./autogen.sh
61 %configure
62
63 make %{?_smp_mflags}
64
65 %install
66 %make_install
67
68 rm -f %{buildroot}%{_libdir}/*.la
69
70 # make sure debugsources.list exist, it used by rpm macro in %file
71 # section.
72 touch debugsources.list
73
74 %check
75 make check
76
77 %post
78 /sbin/ldconfig
79
80 %postun -p /sbin/ldconfig
81
82 %files -n libgdbus
83 %defattr(-,root,root,-)
84 %if 0%{?_with_tizen}
85 %manifest %{name}.manifest
86 %endif
87 %license LICENSE.Apache-2.0
88 %{_libdir}/libgdbus.so.*
89
90 %files -n libgdbus-devel
91 %defattr(-,root,root,-)
92 %if 0%{?_with_tizen}
93 %manifest %{name}.manifest
94 %endif
95 %license LICENSE.Apache-2.0
96 %{_libdir}/libgdbus.so
97 %{_includedir}/libgdbus/dbus-system.h
98 %{_libdir}/pkgconfig/libgdbus.pc