source: npl/system/nss_ldap/nss_ldap.SlackBuild @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.0 KB
Line 
1#!/bin/bash
2#DEP:openldap
3#ftp://ftp.padl.com/pub/nss_ldap.tgz
4#daar staat de source
5# Doe wat standaardzooi...
6CWD=`pwd`
7VERSION=265
8rm -rf pkgtmp
9mkdir pkgtmp
10cd pkgtmp
11PKGROOT=`pwd`;
12cd ..
13PGMDIR=`find . -type d -maxdepth 1 | grep nss_ldap`
14PGM=`ls *.tar.gz | grep nss_ldap | grep -v DatuX | sed  -e 's/.tar.gz//'`
15rm -rf $PGMDIR
16#export CPPFLAGS="-I/usr/include/db4" LDFLAGS="-L/usr/lib"
17
18# source tarball uitpakken...
19echo "Bezig met uitpakken..."
20tar -xzf $PGM.tar.gz || exit 1
21PGMDIR=`find . -type d -maxdepth 1 | grep nss_ldap` || exit 1
22cd $PGMDIR || exit 1
23
24# Debian patches
25for PATCH in `cat $CWD/patches/series`; do
26        patch -p1 < $CWD/patches/$PATCH || exit 1
27done
28
29# Configure script runnen...
30echo "Uitvoeren van configure..."
31./configure --sysconfdir=/etc \
32            --prefix=/ \
33            --bindir=/usr/bin \
34            --sbindir=/usr/sbin \
35            --localstatedir=/var \
36            --with-ldap-lib=openldap \
37            --with-ldap-conf-file=/etc/ldap.conf \
38            --with-ldap-secret-file=/etc/ldap.secret \
39            --enable-schema-mapping  || exit 1
40# compile de source...
41echo "Uitvoeren van make..."
42PATH=$PATH:.
43make || exit 1
44# installeer alles in een tijdelijke root...
45echo "Make install..."
46mkdir -p $PKGROOT/lib
47make DESTDIR="$PKGROOT" install || exit 1
48
49
50# En maak er uiteindelijk een package van en ruim alle zooi op...
51echo "Package maken..."
52cd "$PKGROOT" &&
53#strippen van onodige data
54find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
55find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
56
57mkdir $PKGROOT/etc
58#default config file aanpassen
59mv etc/ldap.conf etc/ldap.conf-default-ssl_ldap
60cp ../nsswitch.conf etc
61chown root:root etc/nsswitch.conf
62chmod 644 etc/nsswitch.conf
63#makepkg -l n $PGMDIR-1DatuX.tgz 1> /dev/null &&
64#makepkg -l y -c n $PGMDIR-`arch`-1DatuX.tgz 1> /dev/null &&
65#mv -f *.tgz .. &&
66NAME=`echo $0|cut -f2 -d'.'`
67makepkg -l y -c n $CWD/$NAME.pkg > /dev/null &&
68echo $VERSION > $CWD/$NAME.version &&
69arch > $CWD/$NAME.arch &&
70
71cd .. &&
72rm -rf $PGMDIR $PKGROOT
Note: See TracBrowser for help on using the repository browser.