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

PKGBUILD

By: a guest on Feb 6th, 2012  |  syntax: Bash  |  size: 2.66 KB  |  views: 175  |  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: Dassault Systemes <CrashReports@DraftSight.com>
  2. # Maintainer: dongfengweixiao  <dongfengweixiao "at" gmail {dot} com>
  3. # Contributor: dongfengweixiao  <dongfengweixiao "at" gmail {dot} com>
  4.  
  5. pkgname=dassault-systemes-draftsight
  6. pkgver=2012.1.1177
  7. pkgrel=1
  8. pkgdesc="With DraftSight, you can easily create professional CAD drawings. Supported file formats are DWT, DXF and DWG."
  9. arch=('i686' 'x86_64')
  10. url="http://www.draftsight.com/download-linux-ubuntu"
  11. source=('http://www.draftsight.com/download-linux-ubuntu/draftSight.deb'
  12.         'dassault-systemes_draftsight.desktop'
  13.         'ft-rockey.rules')
  14. license=('Commercial')
  15. conflicts=('draftsight')
  16. install=draftsight.install
  17.  
  18. _pkgprefix=opt/dassault-systemes/draftsight
  19.  
  20. depends=(
  21.     fontconfig
  22.     gcc-libs
  23.     glib2
  24.     glibc
  25.     libcups
  26.     libgl
  27.     libice
  28.     libsm
  29.     libx11
  30.     libxext
  31.     libxrender
  32.     libxt
  33.     mesa
  34.     nas
  35.     util-linux
  36.     zlib
  37. )
  38. md5sums=('6f737dfae32949e10b9eac873e24e1e8'
  39.          '3a5cf440c860958d1beaddf45015fac8'
  40.          'b2e84ed22e10237cdba880c914689937')
  41.          
  42. # Build and replace dependency list for x86_64
  43. if [[ "$CARCH" == 'x86_64' ]]; then
  44.     for i in ${depends[@]}
  45.     do
  46.         _depends_64+=("lib32-$i")
  47.     done
  48.     depends=("${_depends_64[@]}")
  49. fi
  50.  
  51. package() {
  52.     msg "Extracting the draftsight package"
  53.     ar -xv draftSight.deb
  54.     tar -xzvf data.tar.gz
  55.     tar -xzvf control.tar.gz
  56.     msg2 "Done extracting!"
  57.  
  58.     msg "Preparing install"
  59.     install -d "$pkgdir"/{opt,var,usr/share/applications}
  60.     mv -v opt/dassault-systemes "$pkgdir"/opt
  61.     mv -v var/opt "$pkgdir"/var
  62.     mv -v license* "$pkgdir"/var/opt/dassault-systemes/draftsight/licence
  63.     msg2 "Done preparing!"
  64.  
  65.     msg "Actual installation"
  66.     mkdir -p "${pkgdir}"/etc/profile.d
  67.     echo "export PATH=\$PATH:/${_pkgprefix}/bin" > $pkgdir/etc/profile.d/$pkgname.sh
  68.     chmod 644 "${pkgdir}"/etc/profile.d/$pkgname.sh
  69.     install -D -m644 "${srcdir}"/ft-rockey.rules "${pkgdir}"/etc/udev/rules.d/ft-rockey.rules
  70.     rm -rf "${pkgdir}"/opt/dassault-systemes/draftsight/mime/dassault-systemes_draftsight.desktop
  71.     mv -v "${srcdir}"/dassault-systemes_draftsight.desktop "${pkgdir}"/opt/dassault-systemes/draftsight/mime/dassault-systemes_draftsight.desktop
  72.     cp "${pkgdir}"/opt/dassault-systemes/draftsight/mime/dassault-systemes_draftsight.desktop "${pkgdir}"/usr/share/applications/dassault-systemes_draftsight.desktop
  73.     chmod 644 "${pkgdir}"/usr/share/applications/dassault-systemes_draftsight.desktop
  74.     install -D "${pkgdir}"/opt/dassault-systemes/draftsight/Eula/english/eula.htm "${pkgdir}"/usr/share/licenses/draftsight/eula.htm
  75.     msg2 "Installation finished!"
  76. }
clone this paste RAW Paste Data