forked from haikuports/haikuports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openldap-2.4.48.recipe
138 lines (122 loc) · 3.65 KB
/
openldap-2.4.48.recipe
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
134
135
136
137
138
SUMMARY="Open source LDAP suite of applications and development tools"
DESCRIPTION="The OpenLDAP Project is a collaborative effort to develop a \
robust, commercial-grade, fully featured, and open source LDAP suite of \
applications and development tools. The project is managed by a worldwide \
coummunity of volunteers that use the Internet to communicate, plan, and \
develop the OpenLDAP Suite and its related documentation."
COPYRIGHT="1998-2016 The OpenLDAP Foundation"
HOMEPAGE="https://www.openldap.org/"
LICENSE="OpenLDAP Public License"
REVISION="2"
SOURCE_URI="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-$portVersion.tgz"
CHECKSUM_SHA256="d9523ffcab5cd14b709fcf3cb4d04e8bc76bb8970113255f372bc74954c6074d"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="2.10.11"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
portVers="${portVersion%.*}"
GLOBAL_WRITABLE_FILES="settings/openldap/ldap.conf keep-old"
USER_SETTINGS_FILES="
settings/openldap/ldap.conf template data/openldap/ldap.conf.default
"
PROVIDES="
openldap$secondaryArchSuffix = $portVersion
lib:liblber$secondaryArchSuffix = $libVersionCompat
lib:liblber_$portVers$secondaryArchSuffix = $libVersionCompat
lib:libldap$secondaryArchSuffix = $libVersionCompat
lib:libldap_$portVers$secondaryArchSuffix = $libVersionCompat
lib:libldap_r$secondaryArchSuffix = $libVersionCompat
lib:libldap_r_$portVers$secondaryArchSuffix = $libVersionCompat
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:ldapadd
cmd:ldapcompare
cmd:ldapdelete
cmd:ldapexop
cmd:ldapmodify
cmd:ldapmodrdn
cmd:ldappasswd
cmd:ldapsearch
cmd:ldapurl
cmd:ldapwhoami
"
fi
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
"
PROVIDES_devel="
openldap${secondaryArchSuffix}_devel = $portVersion
devel:liblber$secondaryArchSuffix = $libVersionCompat
devel:liblber_$portVers$secondaryArchSuffix = $libVersionCompat
devel:libldap$secondaryArchSuffix = $libVersionCompat
devel:libldap_$portVers$secondaryArchSuffix = $libVersionCompat
devel:libldap_r$secondaryArchSuffix = $libVersionCompat
devel:libldap_r_$portVers$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
openldap$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcrypto$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:soelim
"
defineDebugInfoPackage openldap$secondaryArchSuffix \
"$libDir"/liblber-$portVers.so.$libVersion \
"$libDir"/libldap-$portVers.so.$libVersion \
"$libDir"/libldap_r-$portVers.so.$libVersion
PATCH()
{
sed \
-e 's/-\<lnet\>/&work/g' \
-e 's/net, socket/network, socket/g' \
-i configure.in
}
BUILD()
{
# TODO: openldap uses it's own variation of autotools
libtoolize --force --copy --install
aclocal
autoconf
runConfigure ./configure --enable-slapd=no --with-tls=openssl
make $jobArgs depend
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/lib*.la
prepareInstalledDevelLibs \
liblber \
liblber-$portVers \
libldap \
libldap-$portVers \
libldap_r \
libldap_r-$portVers
mkdir -p $dataDir/openldap
mv $settingsDir/openldap/ldap.conf.default $dataDir/openldap/
if [ -z "$secondaryArchSuffix" ]; then
# On primary architectures: move man3 to devel package
packageEntries devel $developDir $documentationDir/man/man3
else
# On secondary architectures: delete binDir and documentationDir
rm -rf $binDir $documentationDir
packageEntries devel $developDir
fi
}
TEST()
{
make check
}