summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3f527eedab79c984842d9301c7e62b735cb08960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: Peter Ivanov <ivanovp@gmail.com>
# Contributor: Alec Ari <neotheuser@ymail.com>

pkgname=linuxcnc-sim
pkgver=2.7.15
pkgrel=1
pkgdesc="It can interpret G-code and simulate a CNC machine (formerly EMC2)."
arch=('i686' 'x86_64')
license=('GPL2')
url="http://linuxcnc.org/"
depends=('bc' 'bwidget' 'tcl' 'tk' 'xorg-server' 'python2-imaging' 'tkimg' 'python2-gtkglext' 'tclx' 'boost' 'boost-libs' 'libtirpc' 'procps-ng' 'psmisc' 'python2-yapps2')
install=$pkgname.install
_gitname='linuxcnc'
source=($_gitname::"git://github.com/LinuxCNC/linuxcnc.git#tag=v$pkgver" 'linuxcnc-sim.sh' 'libtirpc.patch')
#source=($_gitname::'git://git.linuxcnc.org/git/linuxcnc.git#tag=739df958aca9d246daad36f439c82bfbeac681b9' 'boost.patch')
md5sums=('SKIP'
         '3fb3f231cfefdfe1fa4d600ecbf4a3cb'
         '42770a1aa791172358700e4d5af335ed')
makedepends=('git' 'intltool')
PKGEXT='.pkg.tar'

#pkgver() {
#  cd "$srcdir/$_gitname"
#  git log -1 --format="%cd" --date=short | tr -d '-'
#}

build () {
  find . -iname fixpaths.py -o -iname checkglade -o -iname update_ini|xargs perl -p -i -e "s/python/python2/"
  cd $srcdir/$_gitname/src

  patch -Np2 -i $srcdir/libtirpc.patch

  ./autogen.sh
  ./configure --with-realtime=uspace --without-libmodbus --prefix=/usr --with-python=/usr/bin/python2.7 --enable-non-distributable=yes
  make
}

package() {
  cd $srcdir/linuxcnc/src
  make install DESTDIR=${pkgdir} || return 1
  #Fix lsmod
#  sed -i 's/sbin/bin/g' $pkgdir/etc/init.d/realtime
  #Stop hiding it from GNOME
  cp -PR $srcdir/linuxcnc/share/applications $pkgdir/usr/share/
  mkdir -p $pkgdir/etc/xdg
#  echo To avoid conflict with linux-manpages...
#  mv -v $pkgdir/usr/share/man/man9/abs.9.gz $pkgdir/usr/share/man/man9/linuxcnc_abs.9.gz
  cp -PR $srcdir/linuxcnc/share/menus $pkgdir/etc/xdg/
  install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/etc/profile.d/${pkgname}.sh"
}