-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathcfbuild-lmdb.spec
More file actions
112 lines (85 loc) · 2.32 KB
/
cfbuild-lmdb.spec
File metadata and controls
112 lines (85 loc) · 2.32 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
99
100
101
102
103
104
105
106
107
108
109
110
%define lmdb_version 0.9.35
Summary: CFEngine Build Automation -- lmdb
Name: cfbuild-lmdb
Version: %{version}
Release: 1
Source0: openldap-LMDB_%{lmdb_version}.tar.gz
License: OpenLDAP
Group: Other
Url: https://cfengine.com
BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release}-buildroot
AutoReqProv: no
Patch0: mdb.patch
%define prefix %{buildprefix}
%define srcdir openldap-LMDB_%{lmdb_version}/libraries/liblmdb
%if %{?with_debugsym}%{!?with_debugsym:0}
%define debug_package %{nil}
%define cflags CFLAGS="-ggdb3"
%else
%define cflags CFLAGS=""
%endif
%ifarch %ix86
%define lbits %{nil}
%else
%define lbits %{nil}
%endif
%prep
SYS=`uname -s`
mkdir -p %{_builddir}
%setup -q -n %{srcdir}
for i in %{_topdir}/SOURCES/00*.patch; do
$PATCH -p3 < $i
done
# Executable files taken from mdb-autoconf-generated.patch, which is generated
# from Git, and contains permission info, but patch -p1 cannot apply it.
# Use the following command to list the files.
# grep -B1 '^new file mode.*755' mdb-autoconf-generated.patch
chmod 755 config.guess
chmod 755 config.sub
chmod 755 configure
chmod 755 depcomp
chmod 755 install-sh
chmod 755 missing
# Workaround for automake being sensitive to the order in which the generated
# files are applied. If Makefile.in is patched before aclocal.m4 (which it is,
# following natural file order), then it will try to rebuild Makefile.in, which
# it can't without automake. Work around it by touching that file.
touch Makefile.in
%build
SYS=`uname -s`
if [ -z $MAKE ]; then
MAKE_PATH=`which make`
export MAKE=$MAKE_PATH
fi
%{cflags} ./configure --prefix=%{prefix} --libdir=%{buildprefix}/lib
$MAKE
%install
rm -rf ${RPM_BUILD_ROOT}
$MAKE DESTDIR=${RPM_BUILD_ROOT} install
rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/liblmdb.la
%clean
rm -rf $RPM_BUILD_ROOT
%package devel
Summary: CFEngine Build Automation -- lmdb -- development files
Group: Other
AutoReqProv: no
%description
CFEngine Build Automation -- lmdb
%description devel
CFEngine Build Automation -- lmdb -- development files
%files
%defattr(-,root,root)
%dir %{prefix}/bin
%{prefix}/bin/mdb_stat
%{prefix}/bin/mdb_copy
%{prefix}/bin/mdb_dump
%{prefix}/bin/mdb_load
%{prefix}/bin/lmdump
%{prefix}/bin/lmmgr
%dir %{prefix}/lib%{lbits}
%{prefix}/lib%{lbits}/*.so*
%files devel
%defattr(-,root,root)
%dir %{prefix}/include
%{prefix}/include/*.h
%changelog