blob: e76411233d47f8cb46c2b94922cbdfc8ed790c0b (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# Maintainer: Jason Kercher <jkercher 43 at gmail dot com>
pkgname=linuxcnc-git
pkgver=2.9.1.r1316.gd0885cf485
pkgrel=1
pkgdesc="Controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more (formerly EMC2)"
arch=('i686' 'x86_64')
license=('GPL2')
url="http://linuxcnc.org"
depends=(bc
boost
bwidget
glibc
glu
gtk3
libgpiod
libxaw
readline
procps-ng
psmisc
python
python-gobject
python-pillow
python-yapps2
tkimg
# python-gtkglext
tclx
xorg-server
)
makedepends=(
asciidoc
gettext
git
# texinfo
intltool
python-sphinx
man-db)
provides=('linuxcnc')
conflicts=('linuxcnc' 'linuxcnc-bin')
options=('!strip')
source=("${pkgname}::git+https://github.com/LinuxCNC/linuxcnc"
'libtirpc.patch')
sha256sums=('SKIP'
'bc95bafd67fad1c1d3722261bc586cdc612ec9e1597fadb95fa825c10550ac2c')
pkgver() {
cd "${srcdir}/${pkgname}"
# Generate git tag based version. Count only proper (v)#.#* [#=number] tags.
local _gitversion=$(git describe --long --tags --match '[v0-9][0-9.][0-9.]*' | sed -e 's|^v||' | tr '[:upper:]' '[:lower:]')
# Format git-based version for pkgver
# Expected format: e.g. 1.5.0rc2.r521.g99982a1c
echo "${_gitversion}" | sed \
-e 's|^\([0-9][0-9.]*\)-\([a-zA-Z]\+\)|\1\2|' \
-e 's|\([0-9]\+-g\)|r\1|' \
-e 's|-|.|g'
}
prepare() {
git -C "${srcdir}/${pkgname}" clean -dfx
cd "${srcdir}/${pkgname}/src"
echo "export TCLLIBPATH=$TCLLIBPATH:/usr/lib/tcltk/linuxcnc" > ${pkgname}.sh
find . -iname fixpaths.py -o -iname checkglade -o \
-iname update_ini | xargs perl -p -i -e "s/python/python3/"
patch -Np2 -i "${srcdir}/libtirpc.patch"
sed -i 's|/usr/local/etc/emc2/configs|/etc/emc2/configs|g' Makefile.inc.in
sed -i 's|$(DESTDIR)$(sysconfdir)/linuxcnc|$(DESTDIR)/etc/linuxcnc|g' Makefile.orig
./autogen.sh
./configure --with-realtime=uspace \
--without-libmodbus --prefix=/usr \
--with-python=/usr/bin/python3 \
--enable-non-distributable=yes
sed -i 's|$(DESTDIR)$(sysconfdir)/linuxcnc|$(DESTDIR)/etc/linuxcnc|g' Makefile
}
build () {
cd "${srcdir}/${pkgname}/src"
make
}
package() {
cd "${srcdir}/${pkgname}/src"
DESTDIR=${pkgdir} make install
cp -PR "${srcdir}/${pkgname}/share/applications" "${pkgdir}/usr/share"
mkdir -p "${pkgdir}/etc/xdg"
cp -PR "${srcdir}/${pkgname}/share/menus" "${pkgdir}/etc/xdg/"
install -Dm755 "${srcdir}/${pkgname}/src/${pkgname}.sh" \
"${pkgdir}/etc/profile.d/${pkgname}.sh"
sed -i "s|${srcdir}||" "${pkgdir}/usr/share/linuxcnc/Makefile.modinc"
install -Dm644 ${pkgdir}/usr/share/linuxcnc/linuxcncicon.png -t ${pkgdir}/usr/share/pixmaps
}
|