source: npl/system/shadow/shadow.SlackBuild @ 1a19ecd

perl-5.22
Last change on this file since 1a19ecd 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: 3.8 KB
RevLine 
[c5c522c]1#!/bin/sh
2#DEP:Linux_PAM
3#DEP:pam_ldap
4#DEP:nss_ldap
5# Set initial variables:
6CWD=`pwd`
7TMP=$CWD/tmp
8if [ "$TMP" = "" ]; then
9  TMP=/tmp
10fi
11
12VERSION=4.0.14
13ARCH=${ARCH:-i486}
14BUILD=1DatuX
15
16PKG=$TMP/package-shadow
17
18if [ ! -d $TMP ]; then
19  mkdir -p $TMP # location to build the source
20fi
21rm -rf $PKG
22mkdir -p $PKG
23
24### Explode the package framework:
25##cd $PKG
26##explodepkg $CWD/_shadow.tar.gz
27
28cd $TMP
29rm -rf shadow-$VERSION
30tar xjvf $CWD/shadow-$VERSION.tar.bz2 || exit 1
31cd shadow-$VERSION
32chown -R root.root .
33#cat $CWD/shadow.shadowconfig.diff.gz | patch -p1 --verbose --backup
34#zcat $CWD/shadow.newgrp.nopam.gz | patch -p0 --verbose --backup
35#cat $CWD/shadow.login.defs.diff.gz | patch -p0 --verbose --backup
36#cat $CWD/shadow.newgrp.getlogin.gz | patch -p1 --verbose --backup
37#cat $CWD/shadow.audiovideocdrom.diff.gz | patch -p1 --verbose --backup
38export LIBS="-lpam -lpam_misc"
39./configure --prefix=/ \
40            --libdir=/lib \
41            --mandir=/usr/man \
42            --enable-shadowgrp \
43            --enable-shared \
44            --with-libpam \
45            --without-selinux \
46            --without-libcrack || exit 1
47#           --includedir=/usr/include/security \
48make -j1  || exit 1
49#make install
50mkdir -p $PKG/bin \
51        $PKG/usr/bin \
52        $PKG/sbin \
53        $PKG/usr/sbin \
54        $PKG/etc/pam.d
55       
56#Maak wat config bestanden aan...
57cp $CWD/login.defs $PKG/etc/login.defs
58
59cat > $PKG/etc/pam.d/shadow << EOF
60auth            required        pam_rootok.so
61account         required        pam_permit.so
62password        required        pam_permit.so
63session         required        pam_deny.so
64EOF
65
66cat > $PKG/etc/pam.d/chpasswd << EOF
67auth            required        pam_rootok.so
68account         required        pam_permit.so
69password        required        pam_permit.so
70session         required        pam_deny.so
71EOF
72
73cat > $PKG/etc/pam.d/su << EOF
74# Begin /etc/pam.d/su
75auth            sufficient      pam_rootok.so
76auth            sufficient      pam_ldap.so
77auth            required        pam_unix.so use_first_pass
78#auth           required        pam_warn.so
79account         sufficient      pam_ldap.so
80account         required        pam_unix.so
81session         sufficient      pam_ldap.so
82session         required        pam_unix.so
83password        sufficient      pam_ldap.so
84password        required        pam_unix.so
85EOF
86
87
88cat > $PKG/etc/pam.d/useradd << EOF
89auth            required        pam_rootok.so
90account         required        pam_permit.so
91password        required        pam_permit.so
92session         required        pam_deny.so
93EOF
94
95cat > $PKG/etc/pam.d/userdel << EOF
96auth            required        pam_rootok.so
97account         required        pam_permit.so
98password        required        pam_permit.so
99session         required        pam_deny.so
100EOF
101
102cat > $PKG/etc/pam.d/groupadd << EOF
103auth            required        pam_rootok.so
104account         required        pam_permit.so
105password        required        pam_permit.so
106session         required        pam_deny.so
107EOF
108
109cat > $PKG/etc/pam.d/groupdel << EOF
110auth            required        pam_rootok.so
111account         required        pam_permit.so
112password        required        pam_permit.so
113session         required        pam_deny.so
114EOF
115
116cat > $PKG/etc/pam.d/passwd << EOF
117password requisite pam_unix.so obscure md5
118EOF
119
120make DESTDIR=$PKG install || exit 1
121
122
123#maak alle configfiles eindigend op .new
124#EDWIN:NIET, waarom zouden we dit doen?
125#find $PKG/etc -follow -type f -exec mv "{}" "{}.new" \; || exit 1
126#login.defs overschrijven!!!!!!!! ivm nieuwe uid systeem vanaf 500
127mv $PKG/etc/login.defs.new $PKG/etc/login.defs
128
129#wat doet dit ding hier???
130rm -r $PKG/share
131
132# Build the package:
133cd $CWD
134
135#strip bins and other stuff
136NAME=shadow
137syn3_strip $PKG || exit 1
138
139#move development stuff and create seperate development package
140syn3_move_dev $PKG $PKG.dev || exit 1
141syn3_makepkg $PKG.dev $NAME""_dev $VERSION $ARCH || exit 1
142
143#make main package
144syn3_makepkg $PKG $NAME $VERSION $ARCH || exit 1
145
146
Note: See TracBrowser for help on using the repository browser.