1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/python-ldap/python-ldap.conf
3 # Copyright (C) 2004 - 2023 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 python_ldap_preconf() {
14 for package in openldap openssl cyrus-sasl2; do
15 if pkginstalled $package; then
17 lib_dir="$lib_dir $(pkgprefix libdir $package)"
18 inc_dir="$inc_dir $(pkgprefix includedir $package)"
21 # adjusting library and include path
22 sed -i "/library_dirs/s,/.*,$lib_dir," setup.cfg
23 sed -i "/include_dirs/s,/.*,$inc_dir," setup.cfg
25 # removing hardcoded sasl from setup.cfg if cyrus-sasl2
27 if ! pkginstalled cyrus-sasl; then
28 sed -i "s/^\(libs.*\) sasl2 \(.*\)/\1 \2/g" setup.cfg
32 hook_add preconf 5 "python_ldap_preconf"