wok-6.x annotate nss_ldap/receipt @ rev 24535
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 23 11:49:52 2022 +0000 (2022-02-23) |
parents | 2d4c3cc3ef95 |
children | bd7510903310 |
rev | line source |
---|---|
pascal@1946 | 1 # SliTaz package receipt. |
pascal@1946 | 2 |
pascal@1946 | 3 PACKAGE="nss_ldap" |
pascal@5792 | 4 VERSION="265" |
pascal@1946 | 5 CATEGORY="system-tools" |
pascal@1946 | 6 SHORT_DESC="Get users, hosts, and groups from LDAP." |
pascal@1946 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15584 | 8 LICENSE="GPL2" |
pascal@5808 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@20692 | 10 WEB_SITE="https://web.archive.org/web/20181221041632/https://www.padl.com/OSS/nss_ldap.html" |
pascal@15584 | 11 WGET_URL="http://www.padl.com/download/$TARBALL" |
pascal@15584 | 12 |
pascal@5004 | 13 DEPENDS="cyrus-sasl libkrb5 libldap openssl libcomerr libcomerr3" |
pascal@15587 | 14 BUILD_DEPENDS="openldap-dev perl" |
pascal@1946 | 15 |
pascal@24535 | 16 # What is the latest version available today? |
pascal@24535 | 17 current_version() |
pascal@24535 | 18 { |
pascal@24535 | 19 wget -O - https://raw.githubusercontent.com/PADL/nss_ldap/master/ChangeLog 2>/dev/null | \ |
pascal@24535 | 20 sed '/^[0-9]/!d;s|[\t ].*||;q' |
pascal@24535 | 21 } |
pascal@24535 | 22 |
pascal@1946 | 23 # Rules to configure and make the package. |
pascal@1946 | 24 compile_rules() |
pascal@1946 | 25 { |
pascal@1946 | 26 cd $src |
pascal@5880 | 27 ./vers_string -v |
pascal@1946 | 28 ./configure --prefix=/usr --infodir=/usr/share/info \ |
pascal@2453 | 29 --enable-rfc2307bis --enable-schema-mapping --enable-paged-results \ |
pascal@1946 | 30 --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS && |
gokhlayeh@11574 | 31 make $MAKEFLAGS && |
pascal@15587 | 32 make DESTDIR=$DESTDIR install |
pascal@1946 | 33 } |
pascal@1946 | 34 |
pascal@1946 | 35 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1946 | 36 genpkg_rules() |
pascal@1946 | 37 { |
pascal@1946 | 38 mkdir -p $fs/usr $fs/etc |
pascal@15584 | 39 cp -a $install/usr/lib $fs/usr |
pascal@15584 | 40 cp -a $install/etc $fs |
pascal@1946 | 41 } |
pascal@1946 | 42 |
pascal@1946 | 43 post_install() |
pascal@1946 | 44 { |
pascal@18730 | 45 if [ -s "$1/etc/openldap/slapd.conf" ]; then |
pascal@18730 | 46 suffix=$(awk '/^suffix/ { print $2 }' < "$1/etc/openldap/slapd.conf" | sed 's/"//g') |
pascal@18730 | 47 rootdn=$(awk '/^rootdn/ { print $2 }' < "$1/etc/openldap/slapd.conf" | sed 's/"//g') |
pascal@18730 | 48 rootpw=$(awk '/^rootpw/ { print $2 }' < "$1/etc/openldap/slapd.conf") |
pascal@2532 | 49 sed -i -e "s|binddn .*|binddn $rootdn|" \ |
pascal@2532 | 50 -e "s|bindpw .*|bindpw $rootpw|" \ |
pascal@18730 | 51 -e "s|dc=padl,dc=com|$suffix|g" "$1/etc/ldap.conf" |
pascal@1946 | 52 cat <<EOT |
pascal@1946 | 53 ------ |
pascal@1946 | 54 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords: |
pascal@1946 | 55 $(grep ^suffix /etc/openldap/slapd.conf) |
pascal@1946 | 56 $(grep ^rootdn /etc/openldap/slapd.conf) |
pascal@1946 | 57 $(grep ^rootpw /etc/openldap/slapd.conf) |
pascal@1946 | 58 ------ |
pascal@1946 | 59 EOT |
pascal@1946 | 60 fi |
pascal@1946 | 61 } |