Advertisement
Guest User

Josephgbr

a guest
Jan 25th, 2011
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.30 KB | None | 0 0
  1. _pkgbasename=pam
  2. pkgname=lib32-$_pkgbasename
  3. pkgver=1.1.3
  4. pkgrel=1
  5. pkgdesc="PAM (Pluggable Authentication Modules) library (32 bit)"
  6. arch=('x86_64')
  7. license=('GPL2')
  8. url="http://www.kernel.org/pub/linux/libs/pam/"
  9. depends=('lib32-glibc' 'lib32-db' 'lib32-cracklib' ${_pkgbasename})
  10. makedepends=('lib32-flex' 'w3m' 'docbook-xml>=4.4' 'docbook-xsl')
  11. source=(http://www.kernel.org/pub/linux/libs/pam/library/Linux-PAM-$pkgver.tar.bz2
  12.         ftp://ftp.suse.com/pub/people/kukuk/pam/pam_unix2/pam_unix2-2.6.tar.bz2
  13.         other)
  14. options=('!libtool' '!emptydirs')
  15. md5sums=('6db7fcb5db6253350e3a4648ceac40e7'
  16.          'e2788389a6c59224110a45fcff30e02b'
  17.          '6e6c8719e5989d976a14610f340bd33a')
  18.  
  19. build() {
  20.   cd $srcdir/Linux-PAM-$pkgver
  21.   ./configure CC='gcc -m32' --prefix=/usr --libdir=/usr/lib32
  22.   make
  23. }
  24.  
  25. package() {
  26.   cd $srcdir/Linux-PAM-$pkgver
  27.  
  28.   make DESTDIR=$pkgdir install
  29.   # LIB32 comment: These came for Arch "pam" package. Needed?  
  30.   #install -D -m644 ../other $pkgdir/etc/pam.d/other  
  31.  
  32.   # BUILD pam_unix2 module -- Is it needed in lib32?
  33.   cd $srcdir/pam_unix2-2.6  
  34.   # Fix "error: conflicting types for 'pam_syslog'" - this occurs only with our toolchain...
  35.   sed -i -e 's|pam_syslog (pam_handle_t|pam_syslog (const pam_handle_t|g' src/public.h src/support.c  
  36.   ./configure CC='gcc -m32' --libdir=/usr/lib32 \
  37.                 --libexecdir=/usr/lib32 --prefix=/usr
  38.   make
  39.   make DESTDIR=$pkgdir install
  40.   # fix some missing symlinks from old pam for compatibility
  41.   cd $pkgdir/usr/lib32/security
  42.   ln -s pam_unix.so pam_unix_acct.so
  43.   ln -s pam_unix.so pam_unix_auth.so
  44.   ln -s pam_unix.so pam_unix_passwd.so
  45.   ln -s pam_unix.so pam_unix_session.so
  46.  
  47.   # LIB32 comment: These came for Arch "pam" package. Is it needed in lib32?
  48.   #
  49.   # add the realtime permissions for audio users
  50.   #sed -i 's|# End of file||' $pkgdir/etc/security/limits.conf
  51.   #cat >>$pkgdir/etc/security/limits.conf <<_EOT
  52. #*               -       rtprio          0
  53. #*               -       nice            0
  54. #@audio          -       rtprio          65
  55. #@audio          -       nice           -10
  56. #@audio          -       memlock         40000
  57. #_EOT
  58.   #set unix_chkpwd uid
  59.   #chmod +s $pkgdir/sbin/unix_chkpwd
  60.  
  61.   # Cleanup, leave only libs
  62.   rm -rf ${pkgdir}/{etc,sbin}
  63.   rm -rf ${pkgdir}/usr/{include,share}
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement