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
|
Name: libsystem
Summary: System Libraries
Version: 4.0
Release: 1
License: Apache-2.0
Group: System/Libraries
Source: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-2.0)
Requires: /bin/cp
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description
System libraries.
%package devel
Summary: Development header files for System Libraries
License: Apache-2.0
Requires: pkgconfig(glib-2.0)
%description devel
Development headers and auxiliary files.
%package -n libsystem-sd
Summary: Utility libraries for systemd
License: Apache-2.0
%description -n libsystem-sd
systemd utility libraries.
%package -n libsystem-sd-devel
Summary: Development header files for systemd util
License: Apache-2.0
Requires: pkgconfig(gio-2.0)
Requires: pkgconfig(dbus-1)
Requires: pkgconfig(libsystem)
%description -n libsystem-sd-devel
Development header files for systemd util.
%prep
%setup -q
%build
cp %{SOURCE1001} .
%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 \
--disable-static \
--prefix=%{_prefix} \
make %{?_smp_mflags}
%install
%make_install
# Remove local archives
rm -f %{buildroot}%{_libdir}/*.la
%post
/sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n libsystem-sd
/sbin/ldconfig
%postun -n libsystem-sd -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_libdir}/libsystem.so.*
%manifest %{name}.manifest
%files devel
%defattr(-,root,root,-)
%{_libdir}/libsystem.so
%{_includedir}/libsystem/config-parser.h
%{_includedir}/libsystem/dbus-util.h
%{_includedir}/libsystem/glib-util.h
%{_includedir}/libsystem/libsystem.h
%{_libdir}/pkgconfig/libsystem.pc
%files -n libsystem-sd
%defattr(-,root,root,-)
%{_libdir}/libsystem-sd.so.*
%manifest %{name}.manifest
%files -n libsystem-sd-devel
%defattr(-,root,root,-)
%{_libdir}/libsystem-sd.so
%{_includedir}/libsystem-sd/systemd.h
%{_libdir}/pkgconfig/libsystem-sd.pc
|