summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e03416fb5f7b43ccd6e47d2541c424b99c47e980 (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
# Maintainer: Ruiqi Niu <rniu5 at jh dot edu>

pkgname=cad2fbd
pkgver=1.1
pkgrel=2
pkgdesc='CAD-geometry (STEP or IGES) to CalculiX FBD converter by Pascal Mossier.'
url=http://www.dhondt.de/
license=('GPL-2.0-only')
arch=('x86_64')
depends=(
	'opencascade'
)
makedepends=(
	'imake'
	'make'
	'gcc'
)
options=(
	'!buildflags'
	'!debug'
)
source=(
	"http://www.dhondt.de/cgxCadTools.tar.bz2"
)
md5sums=(
	'd9dacdaa2776dc9e24fa17084e0a237f'
)

prepare() {
	cd $srcdir/cgxCadTools/CadReader/src

	cp Makefile_orig Makefile
	sed -i "/^OCCT =/c\OCCT = /usr/lib" Makefile
	sed -i "/^OCCINC =/c\OCCINC = /usr/include/opencascade" Makefile
	sed -i "/^PROGPATH =/c\PROGPATH = $srcdir\/cgxCadTools\/CadReader" Makefile
	sed -i "/^CFLAGS =/c\CFLAGS = -std=c++11 -O3" Makefile
	sed -i "/^MAIN =/c\MAIN = $pkgname" Makefile

	make depend
	make clean
}

build() {
	cd $srcdir/cgxCadTools/CadReader/src

	make -j$(($(nproc) - 1))
}

package() {
	install -Dm755 $srcdir/cgxCadTools/CadReader/src/$pkgname $pkgdir/usr/bin/$pkgname
}