summaryrefslogtreecommitdiff
path: root/packaging/libsystem.spec
blob: 073ebb7b9fe5d8e7776ae30d630dd39f17576490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Name:           libsystem
Summary:        System Libraries
Version:        4.1
Release:        0%{?release_flags}
License:        Apache-2.0
Group:          System/Libraries
Source:         %{name}-%{version}.tar.gz
%if 0%{?_with_tizen}
Source1001:     %{name}.manifest
%endif

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(glib-2.0) >= 2.44
BuildRequires:  pkgconfig(gio-2.0) >= 2.44
BuildRequires:  gperf

Requires:       /bin/cp

Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%description
System utility libraries.

%package devel
Summary:        Header files for System Libraries
License:        Apache-2.0
Requires:       %{name} = %{version}
Requires:       pkgconfig(glib-2.0)

%description devel
Development header files for System Libraries.

%package -n libsystem-sd
Summary:        Utility libraries for systemd
License:        Apache-2.0
Requires:       libsystem = %{version}

%description -n libsystem-sd
A helper utility libraries for systemd.

%package -n libsystem-sd-devel
Summary:        Header files for systemd util
License:        Apache-2.0
Requires:       libsystem-sd = %{version}
Requires:       pkgconfig(libsystem) = %{version}
Requires:       pkgconfig(gio-2.0)
Requires:       pkgconfig(dbus-1)

%description -n libsystem-sd-devel
Development header files for systemd util.

%prep
%setup -q

%build
%if 0%{?_with_tizen}
cp %{SOURCE1001} .
%endif

%if 0%{?debug_enable}
export CFLAGS=$(echo $CFLAGS | sed -e 's/^-g / /g' | sed -e 's/ -g / /g')
export CFLAGS=$(echo $CFLAGS | sed -e 's/^-O[0-9] / /g' | sed -e 's/ $-O[0-9] / /g')
export CFLAGS=$(echo $CFLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2 / /g')
export CFLAGS="-O0 -g $CFLAGS"
%endif

./autogen.sh
%configure

make %{?_smp_mflags}

%install
%make_install

rm -f %{buildroot}%{_libdir}/*.la

# make sure debugsources.list exist, it used by rpm macro in %file
# section.
touch debugsources.list

%check
make check

%post
/sbin/ldconfig

%postun -p /sbin/ldconfig

%post -n libsystem-sd
/sbin/ldconfig

%postun -n libsystem-sd
/sbin/ldconfig

%files
%defattr(-,root,root,-)
%if 0%{?_with_tizen}
%manifest %{name}.manifest
%endif
%{_libdir}/libsystem.so.*

%files devel
%defattr(-,root,root,-)
%if 0%{?_with_tizen}
%manifest %{name}.manifest
%endif
%{_libdir}/libsystem.so
%{_includedir}/libsystem/config-parser.h
%{_includedir}/libsystem/dbus-util.h
%{_includedir}/libsystem/glib-util.h
%{_includedir}/libsystem/libsystem.h
%{_includedir}/libsystem/proc.h
%{_libdir}/pkgconfig/libsystem.pc

%files -n libsystem-sd
%defattr(-,root,root,-)
%if 0%{?_with_tizen}
%manifest %{name}.manifest
%endif
%{_libdir}/libsystem-sd.so.*

%files -n libsystem-sd-devel
%defattr(-,root,root,-)
%if 0%{?_with_tizen}
%manifest %{name}.manifest
%endif
%{_libdir}/libsystem-sd.so
%{_includedir}/libsystem-sd/systemd.h
%{_libdir}/pkgconfig/libsystem-sd.pc