Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD

By: a guest on Oct 26th, 2012  |  syntax: None  |  size: 1.95 KB  |  views: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: josephgbr <rafael.f.f1 at gmail.com>
  2. # Contributor: Janax <janax99@yahoo.com>
  3.  
  4. _pkgbase=pam
  5. pkgname=lib32-${_pkgbase}
  6. pkgver=1.1.6
  7. pkgrel=1
  8. pkgdesc="PAM (Pluggable Authentication Modules) library (32 bit)"
  9. arch=('any')
  10. license=('GPL2')
  11. url="http://www.kernel.org/pub/linux/libs/pam/"
  12. depends=('lib32-libtirpc' 'lib32-db' 'lib32-cracklib' "${_pkgbase}")
  13. makedepends=('lib32-flex' 'gcc-multilib')
  14. options=('!libtool' '!emptydirs')
  15. source=(https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-${pkgver}.tar.bz2
  16.         ftp://ftp.archlinux.org/other/pam_unix2/pam_unix2-2.9.1.tar.bz2
  17.         pam_unix2-glibc216.patch
  18.         pam_namespace-build-1.1.6.patch)
  19. md5sums=('7b73e58b7ce79ffa321d408de06db2c4'
  20.          'da6a46e5f8cd3eaa7cbc4fc3a7e2b555'
  21.          '931b91bd50289c1f1e0bada7743ad272'
  22.          '7e7a3c5a1d18aa2ac804d05d43d15c88')
  23.  
  24. build() {
  25.   export CC='gcc -m32'
  26.   export CXX='g++ -m32'
  27.   export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
  28.  
  29.   cd "${srcdir}/Linux-PAM-${pkgver}"
  30.   ./configure --libdir=/usr/lib32
  31.   patch --verbose -Np0 -i "${srcdir}/pam_namespace-build-1.1.6.patch"
  32.   make
  33.  
  34.   cd "${srcdir}/pam_unix2-2.9.1"
  35.   sed -e 's|pam_syslog (pam_handle_t|pam_syslog (const pam_handle_t|g' \
  36.           -i src/public.h src/support.c
  37.   patch -Np1 -i "${srcdir}/pam_unix2-glibc216.patch"
  38.   ./configure --libdir=/usr/lib32
  39.   make
  40. }
  41.  
  42. package() {
  43.   cd "${srcdir}/Linux-PAM-${pkgver}"
  44.   make DESTDIR="${pkgdir}" SCONFIGDIR=/etc/security install
  45.  
  46.   cd "${srcdir}/pam_unix2-2.9.1"
  47.   #make DESTDIR="${pkgdir}" install
  48.   install src/pam_unix2.so "${pkgdir}/usr/lib32/security/pam_unix2.so"
  49.  
  50.   # fix some missing symlinks from old pam for compatibility
  51.   cd "${pkgdir}/usr/lib32/security"
  52.   ln -s pam_unix.so pam_unix_acct.so
  53.   ln -s pam_unix.so pam_unix_auth.so
  54.   ln -s pam_unix.so pam_unix_passwd.so
  55.   ln -s pam_unix.so pam_unix_session.so
  56.  
  57.   # cleanup for lib32 package
  58.   rm -rf "${pkgdir}"/{etc,sbin,usr/{include,share}}
  59. }
clone this paste RAW Paste Data