Advertisement
Guest User

Untitled

a guest
Jan 24th, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1. # Maintainer: ngoonee <n g o o n e e <at gmail.com, delete all spaces>>
  2. # Contributor: Adam Russell <adamlr6+arch@gmail.com>
  3. pkgname=samba4
  4. pkgver=4.0.0A13
  5. # We use the 'A' to fake out pacman's version comparators. Samba chooses
  6. # to append 'a','b',etc to their subsequent releases, which pamcan
  7. # misconstrues as alpha, beta, etc. Bad samba!
  8. _realver=4.0.0alpha13
  9. pkgrel=4
  10. pkgdesc="Alpha build of samba4. This package was SPECIFICALLY created to support evolution-mapi and may not work for any other purpose."
  11. arch=('i686' 'x86_64')
  12. url="http://www.samba.org"
  13. license=('GPL3')
  14. depends=('db>=4.7' 'popt' 'libcups' 'acl' 'libldap' 'libcap>=2.16' 'heimdal>=1.2-1' 'pam' 'fam' 'gnutls>=2.4.1' 'talloc' 'tdb')
  15. makedepends=('python2' 'docbook-xsl')
  16. options=(!makeflags)
  17. source=(http://us1.samba.org/samba/ftp/samba4/samba-${_realver}.tar.gz)
  18. md5sums=('76cdb4f50f8b892eaa885fcf0f1aef4a')
  19. _prefix="/opt/samba4"
  20.  
  21. build() {
  22. # The build process expects python to be python2,
  23. # so that's what it will be.
  24. #mkdir -p ${srcdir}/bin
  25. #if [[ ! -h ${srcdir}/bin/python ]]; then
  26. #ln -s /usr/bin/python2 ${srcdir}/bin/python
  27. #fi
  28. #if [[ ! -h ${srcdir}/bin/python-config ]]; then
  29. #ln -s /usr/bin/python2-config ${srcdir}/bin/python-config
  30. #fi
  31. #export PATH="${srcdir}/bin:${PATH}"
  32. sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
  33. -e "s|python-config|python2-config|" \
  34. -e "s|bin/python|bin/python2|" \
  35. $(find ${srcdir}/samba-${_realver} -name '*.py')
  36. sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
  37. $(find ${srcdir}/samba-${_realver} -name 'wscript*')
  38. sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
  39. -e "s|python-config|python2-config|" \
  40. -e "s|bin/python|bin/python2|" \
  41. $(find ${srcdir}/samba-${_realver} -name 'configure.ac')
  42. sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
  43. $(find ${srcdir}/samba-${_realver} -name 'upgrade_from_s3')
  44. sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
  45. $(find ${srcdir}/samba-${_realver} -name 'provision')
  46. sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
  47. -e "s|python-config|python2-config|" \
  48. $(find ${srcdir}/samba-${_realver}/buildtools -type f)
  49. sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
  50. -e "s|python-config|python2-config|" \
  51. $(find ${srcdir}/samba-${_realver}/source4/scripting -type f)
  52. export PYTHON=/usr/bin/python2
  53. cd ${srcdir}/samba-${_realver}/lib/tdb
  54. ./autogen.sh
  55. ./configure --prefix=${_prefix}/samba
  56. make
  57. make DESTDIR="$pkgdir/" install
  58. make realdistclean
  59.  
  60. cd ${srcdir}/samba-${_realver}/lib/tevent
  61. ./autogen.sh
  62. ./configure --prefix=${_prefix}/samba
  63. make
  64. make DESTDIR="$pkgdir/" install
  65. make realdistclean
  66.  
  67. cd ${srcdir}/samba-${_realver}/source4
  68. ./autogen.sh
  69. ./configure --prefix=${_prefix} --enable-fhs
  70. make
  71. }
  72.  
  73. package() {
  74. _pyver=`python2 -c 'import sys; print(sys.version[:3])'`
  75.  
  76. #export PATH="${srcdir}/bin:${PATH}"
  77.  
  78. cd ${srcdir}/samba-${_realver}/source4
  79. make DESTDIR="$pkgdir/" install
  80.  
  81. install -d ${pkgdir}/etc/ld.so.conf.d
  82. echo "${_prefix}/samba/lib" > ${pkgdir}/etc/ld.so.conf.d/samba4.conf
  83.  
  84. cd ${pkgdir}/${_prefix}/lib/
  85. for _i in libldb; do
  86. ln -s ${_i}-samba4.so.0 ${_i}.so
  87. ln -s ${_i}-samba4.so.0 ${_i}.so.0
  88. done
  89.  
  90. find ${pkgdir}/${_prefix}/lib/python${_pyver}/site-packages/ -name '*.py' | \
  91. xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
  92. find ${pkgdir}/${_prefix}/bin ${pkgdir}/${_prefix}/sbin -type f -executable | \
  93. xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement