This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 28th, 2010  |  syntax: None  |  size: 3.65 KB  |  views: 221  |  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: sxe <sxxe@gmx.de>
  2.  
  3. pkgname=wine-git
  4. pkgver=20100928
  5. pkgrel=1
  6.  
  7. _pkgbasever=${pkgver/rc/-rc}
  8.  
  9. _gitroot="git://source.winehq.org/git/wine.git"
  10. _gitname="wine"
  11.  
  12. pkgdesc="A compatibility layer for running Windows programs. Latest GIT version."
  13. url="http://www.winehq.com"
  14. arch=(i686 x86_64)
  15. license=(LGPL)
  16.  
  17. depends=(
  18.   fontconfig      lib32-fontconfig
  19.   mesa            lib32-mesa
  20.   libxcursor      lib32-libxcursor
  21.   libxrandr       lib32-libxrandr
  22.   libxdamage      lib32-libxdamage
  23.   libxxf86dga     lib32-libxxf86dga
  24.   alsa-lib        lib32-alsa-lib
  25. )
  26.  
  27. makedepends=(autoconf ncurses bison perl fontforge flex prelink
  28.   'gcc>=4.5.0-2'  'gcc-multilib>=4.5.0-2'
  29.   giflib          lib32-giflib
  30.   libxpm          lib32-libxpm
  31.   libpng          lib32-libpng
  32.   libxinerama     lib32-libxinerama
  33.   libxcomposite   lib32-libxcomposite
  34.   libxmu          lib32-libxmu
  35.   libxxf86vm      lib32-libxxf86vm
  36.   libxml2         lib32-libxml2
  37.   libxslt         lib32-libxslt
  38.   libldap         lib32-libldap
  39.   lcms            lib32-lcms
  40.   mpg123          lib32-mpg123
  41.   openal          lib32-openal
  42.   jack            lib32-jack
  43.   libcups         lib32-libcups
  44.   gnutls          lib32-gnutls
  45.   v4l-utils       lib32-v4l-utils
  46. )
  47.  
  48. optdepends=(
  49.   giflib          lib32-giflib
  50.   libpng          lib32-libpng
  51.   libldap         lib32-libldap
  52.   lcms            lib32-lcms
  53.   libxml2         lib32-libxml2
  54.   mpg123          lib32-mpg123
  55.   openal          lib32-openal
  56.   jack            lib32-jack
  57.   libcups         lib32-libcups
  58.   gnutls          lib32-gnutls
  59.   v4l-utils       lib32-v4l-utils
  60. )
  61.  
  62. if [[ $CARCH == i686 ]]; then
  63.   # Strip lib32 etc. on i686
  64.   depends=(${depends[@]/*32-*/})
  65.   makedepends=(${makedepends[@]/*32-*/})
  66.   makedepends=(${makedepends[@]/*-multilib*/})
  67.   optdepends=(${optdepends[@]/*32-*/})
  68. else
  69.   provides=("wine=$pkgver" "bin32-wine=$pkgver" "wine-wow64=$pkgver")
  70.   conflicts=("wine" 'bin32-wine' 'wine-wow64')
  71.   replaces=("wine" 'bin32-wine')
  72. fi
  73.  
  74. build() {
  75.   cd "$srcdir"
  76.  
  77.   # Get rid of old build dirs
  78.   rm -rf $pkgname-{32,64}-build
  79.   mkdir $pkgname-32-build
  80.  
  81.   msg "Connecting to GIT server...."
  82.  
  83.   if [ -d ${srcdir}/$pkgname ] ; then
  84.     cd $pkgname && git pull origin
  85.     msg "Local repository updated."
  86.   else
  87.     git clone $_gitroot $pkgname
  88.   fi
  89.  
  90.   cd "$srcdir"
  91.  
  92.   if [[ $CARCH == x86_64 ]]; then
  93.  
  94.     msg2 "Building Wine-64..."
  95.  
  96.     mkdir $pkgname-64-build
  97.     cd "$srcdir/$pkgname-64-build"
  98.     ../$pkgname/configure \
  99.       --prefix=/usr \
  100.       --sysconfdir=/etc \
  101.       --libdir=/usr/lib \
  102.       --with-x \
  103.       --enable-win64
  104.  
  105.     make
  106.  
  107.     # Wine32 build needs a patched ldd
  108.     # Do it here until it's patched in glibc
  109.     cp /usr/bin/ldd "$srcdir/ldd"
  110.     sed -i '/^RTLDLIST=/s:"$: /lib/ld-linux.so.2&:' "$srcdir/ldd"
  111.  
  112.     _wine32opts=(
  113.       LDD="$srcdir/ldd"
  114.       --libdir=/usr/lib32
  115.       --with-wine64="$srcdir/$pkgname-64-build"
  116.     )
  117.  
  118.     export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
  119.   fi
  120.  
  121.   msg2 "Building Wine-32..."
  122.   cd "$srcdir/$pkgname-32-build"
  123.   ../$pkgname/configure \
  124.     --prefix=/usr \
  125.     --sysconfdir=/etc \
  126.     --with-x \
  127.     "${_wine32opts[@]}"
  128.  
  129.   make
  130. }
  131.  
  132. package() {
  133.   msg2 "Packaging Wine-32..."
  134.   cd "$srcdir/$pkgname-32-build"
  135.  
  136.   if [[ $CARCH == i686 ]]; then
  137.     make prefix="$pkgdir/usr" install
  138.   else
  139.     make prefix="$pkgdir/usr" \
  140.       libdir="$pkgdir/usr/lib32" \
  141.       dlldir="$pkgdir/usr/lib32/wine" install
  142.  
  143.     msg2 "Packaging Wine-64..."
  144.     cd "$srcdir/$pkgname-64-build"
  145.     make prefix="$pkgdir/usr" \
  146.       libdir="$pkgdir/usr/lib" \
  147.       dlldir="$pkgdir/usr/lib/wine" install
  148.   fi
  149. }
  150.  
  151. # vim:set ts=8 sts=2 sw=2 et:
clone this paste RAW Paste Data