source: npl/system/pam_ldap/pam_ldap.SlackBuild @ f9ce31e

perl-5.22
Last change on this file since f9ce31e 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.1 KB
Line 
1#!/bin/bash
2#DEP:Linux_PAM
3#DEP:openldap
4#http://www.pdc.kth.se/heimdal/
5#daar staat de source
6# Doe wat standaardzooi...
7CWD=`pwd`
8NAME=pam_ldap
9VERSION=186
10ROOT=`pwd`;
11rm -rf pkgtmp
12mkdir pkgtmp
13cd pkgtmp
14PKGROOT=`pwd`;
15cd ..
16PGMDIR=`find . -type d -maxdepth 1 | grep pam_ldap`
17PGM=`ls *.tgz | grep pam_ldap | grep -v DatuX | sed  -e 's/.tgz//'`
18rm -rf $PGMDIR
19export CPPFLAGS="-I/usr/include/db4" LDFLAGS="-L/usr/lib"
20
21# source tarball uitpakken...
22echo "Bezig met uitpakken..."
23echo "tar -xzf $PGM.tar.gz"
24tar -xzf $PGM.tgz &&
25PGMDIR=`find . -type d -maxdepth 1 | grep pam_ldap`
26cd $PGMDIR &&
27
28# Configure script runnen...
29echo "Uitvoeren van configure..."
30./configure --sysconfdir=/etc \
31            --prefix=/ \
32            --bindir=/usr/bin \
33            --sbindir=/usr/sbin \
34            --localstatedir=/var \
35            --with-ldap-conf-file=/etc/ldap.conf \
36            --with-ldap-secret-file=/etc/ldap.secret \
37            --with-ldap-lib=openldap || exit 1
38# compile de source...
39echo "Uitvoeren van make..."
40make || exit 1
41# installeer alles in een tijdelijke root...
42echo "Make install..."
43make DESTDIR="$PKGROOT" install || exit 1
44
45
46# En maak er uiteindelijk een package van en ruim alle zooi op...
47echo "Package maken..."
48cd "$PKGROOT" &&
49#strippen van onodige data
50find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
51find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
52
53#default config file moven
54mv etc/ldap.conf etc/ldap.conf-default-pam_ldap
55#onze standaart config file copieeren
56cp $ROOT/ldap.conf $PKGROOT/etc
57cp $ROOT/ldap.secret $PKGROOT/etc
58mkdir -p etc/pam.d
59cp $ROOT/other $PKGROOT/etc/pam.d
60
61#maak alle configfiles eindigend op .new
62find $PKGROOT/etc -follow -type f -exec mv "{}" "{}.new" \; || exit 1
63
64#doinst
65mkdir $PKGROOT/install
66cat <<EOF > $PKGROOT/install/doinst.sh
67mv etc/ldap.conf.new etc/ldap.conf
68EOF
69
70#makepkg -l y -c n $PGMDIR-`arch`-1DatuX.tgz 1> /dev/null &&
71makepkg -l y -c n $CWD/$NAME.pkg > /dev/null &&
72echo $VERSION > $CWD/$NAME.version &&
73arch > $CWD/$NAME.arch &&
74
75#mv -f *.tgz .. &&
76cd .. &&
77rm -rf $PGMDIR $PKGROOT
Note: See TracBrowser for help on using the repository browser.