🔒 Repository is read-only – file editing is disabled.

recipes/utils/openldap/PAGBUILD.yaml main

70 linii Raw ← Powrót
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
pkgname: openldap
pkgver: '2.7.0'
pkgrel: 1
pkgdesc: Lightweight Directory Access Protocol (LDAP) client and server
url: 'https://www.openldap.org'
arch: x86_64
license:
- Custom
depends: []
makedepends:
- autoconf
- m4
- shadow
source:
- 'https://repo.paganlinux.eu/sources/pagan-scripts-20260822.tar.gz'
- 'https://www.openldap.org/software/download/OpenLDAP/openldap-release/${pkgname}-${pkgver}.tgz'
sha256sums:
- 32e0aec88cc56a8afe0b2671debe47d19357792a6ffaffaf6e3db8a021a57072
- SKIP
hooks:
  pre-install: |
    name=openldap
    version=2.6.13
    release=2
    INFO="\033[1;36m"
    NORMAL="\033[0;39m"

    UN=ldap
    if ! (getent group $UN > /dev/null); then
     printf "${INFO}Creating $UN group${NORMAL}\n"
     groupadd -g 83 $UN
    fi
    if ! (getent passwd $UN > /dev/null); then
     printf "${INFO}Creating $UN user${NORMAL}\n"
     useradd  -c "OpenLDAP Daemon Owner" -d /var/lib/openldap \
     -g $UN -s /usr/bin/false -u 83 $UN
    fi
build: |
  (getent group  ldap > /dev/null) || groupadd -g 83 ldap
  (getent passwd ldap > /dev/null) || useradd  -c "OpenLDAP Daemon Owner" \
           -d /var/lib/openldap -u 83 \
           -g ldap -s /usr/bin/false ldap

  cd ${pkgname}-${pkgver}

  sed -e 's/cn->length/ASN1_STRING_length(cn)/g'  \
      -e 's/cn->data/ASN1_STRING_get0_data(cn)/g' \
      -i libraries/libldap/tls_o.c

  autoconf

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --disable-static \
              --enable-dynamic \
              --disable-debug \
              --disable-slapd
  make depend
  make
  make DESTDIR=${PKGDIR} install

  rm -f ${PKGDIR}/usr/lib/liblber.la

  install -Dm644 LICENSE ${PKGDIR}/usr/share/licenses/${pkgname}/LICENSE

  # Service
  cd ../pagan-scripts-20260822
  make DESTDIR=${PKGDIR} install-sysd-slapd
package: |
  true