-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathcfbuild-openldap.spec
More file actions
102 lines (73 loc) · 1.94 KB
/
cfbuild-openldap.spec
File metadata and controls
102 lines (73 loc) · 1.94 KB
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
%define openldap_version 2.6.12
Summary: CFEngine Build Automation -- openldap
Name: cfbuild-openldap
Version: %{version}
Release: 1
Source0: openldap-%{openldap_version}.tgz
Patch0: no_Sockaddr_redefine.patch
License: MIT
Group: Other
Url: https://cfengine.com
BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release}-buildroot
AutoReqProv: no
%define prefix %{buildprefix}
%prep
mkdir -p %{_builddir}
%setup -q -n openldap-%{openldap_version}
%patch0 -p0
# we don't bundle OpenSSL on RHEL 8 (and newer in the future)
%if %{?rhel}%{!?rhel:0} > 7
CPPFLAGS=-I%{buildprefix}/include:/usr/include
%else
CPPFLAGS=-I%{buildprefix}/include
%endif
#
# glibc-2.8 errorneously hides peercred(3) under #ifdef __USE_GNU.
#
# Remove this after decomissioning all glibc-2.8-based distributions
# (e.g. SLES 11).
#
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
./configure --prefix=%{prefix} \
--enable-shared \
--disable-slapd \
--disable-backends \
--with-tls=openssl \
--without-gssapi \
CPPFLAGS="$CPPFLAGS"
%build
if [ -z $MAKE ]; then
MAKE_PATH=`which MAKE`
export MAKE=$MAKE_PATH
fi
$MAKE -C include
$MAKE -C libraries
%install
rm -rf ${RPM_BUILD_ROOT}
$MAKE -C include install DESTDIR=${RPM_BUILD_ROOT}
$MAKE -C libraries install DESTDIR=${RPM_BUILD_ROOT}
# Removing unused files
rm -rf ${RPM_BUILD_ROOT}%{prefix}/etc
rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/*.a
rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/*.la
rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/pkgconfig/*.pc
%clean
rm -rf $RPM_BUILD_ROOT
%package devel
Summary: CFEngine Build Automation -- openldap -- development files
Group: Other
AutoReqProv: no
%description
CFEngine Build Automation -- openldap
%description devel
CFEngine Build Automation -- openldap -- development files
%files
%defattr(-,root,root)
%dir %{prefix}/lib
%{prefix}/lib/*.so.*
%files devel
%defattr(-,root,root)
%{prefix}/include
%dir %{prefix}/lib
%{prefix}/lib/*.so
%changelog