blob: 9f42780f5cdcbf46b8c293b3f71fdc0d0775648f (
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
#Maintainer: Armin Luntzer <armin.luntzer@univie.ac.at>
pkgname=star-system
pkgver=6.00
pkgrel=1
pkgdesc="STAR-System is the new driver and API system provided with all new and future STAR-Dundee interface and router devices."
arch=('x86_64')
url="http://www.star-dundee.com"
license=('custom')
optdepends=('qt5-multimedia')
makedepends=('linux-headers' 'fakeroot')
source=("file://star-system_linux_x86-64_v6.00.tgz"
"star-system.service"
"kbuild.patch"
"version.patch"
"99-star_spw_usb.rules"
"99-star_spw_pci.rules"
"99-star_ultra_pcie.rules")
install=star-system.install
prepare() {
cd ${srcdir}
rm -rf ${srcdir}/tmp
mkdir ${srcdir}/tmp
# unpack
echo -n "Extracting file..."
tar zxvf star-system.tgz -C ${srcdir}/tmp
cd ${srcdir}/tmp
patch -Np0 -i ${srcdir}/kbuild.patch
#patch -Np3 -i ${srcdir}/version.patch
}
build() {
# pci
cd ${srcdir}/tmp/driver_src/pci_driver
cp objects/x86-64/*.o_shipped .
make -f Kbuild EXTRA_CFLAGS=-DSTAR_TRY_NEWER_KERNEL CONFIG_WERROR=n
cp star_spw_pci.ko ../
# pcie
#
cd ${srcdir}/tmp/driver_src/ultra_pcie_driver
cp objects/x86-64/*.o_shipped .
make -f Kbuild EXTRA_CFLAGS=-DSTAR_TRY_NEWER_KERNEL CONFIG_WERROR=n
cp star_ultra_pcie.ko ../
#usb
cd ${srcdir}/tmp/driver_src/usb_driver
cp objects/x86-64/*.o_shipped .
make -f Kbuild EXTRA_CFLAGS=-DSTAR_TRY_NEWER_KERNEL CONFIG_WERROR=n
cp star_spw_usb.ko ../
}
package() {
cd ${srcdir}/tmp
# kernel modules
mkdir -p ${pkgdir}/usr/lib/modules/$(uname -r)/kernel/drivers/spacewire
install -m755 driver_src/*.ko ${pkgdir}/usr/lib/modules/$(uname -r)/kernel/drivers/spacewire
# x64 libraries
mkdir -p ${pkgdir}/usr/lib
install -m755 lib/x86-64/*.so ${pkgdir}/usr/lib
# includes
mkdir -p ${pkgdir}/usr/include/star
install -m644 inc/star/* ${pkgdir}/usr/include/star
# daemon
mkdir -p ${pkgdir}/usr/bin
install -m755 lib/x86-64/star_conf_service ${pkgdir}/usr/bin
# udev rules
mkdir -p ${pkgdir}/usr/lib/udev/rules.d
install -m644 ${srcdir}/99-star_spw_usb.rules ${pkgdir}/usr/lib/udev/rules.d
install -m644 ${srcdir}/99-star_spw_pci.rules ${pkgdir}/usr/lib/udev/rules.d
install -m644 ${srcdir}/99-star_ultra_pcie.rules ${pkgdir}/usr/lib/udev/rules.d
# GUI binaries
#mkdir -p ${pkgdir}/usr/bin
install -m755 $(ls -1 -d lib/x86-64/Qt5/*|grep -v "\.so") ${pkgdir}/usr/bin
# install service file
install -Dm644 ${srcdir}/${pkgname}.service ${pkgdir}/etc/systemd/system/${pkgname}.service
mkdir -p ${pkgdir}/run/lock/subsys
chgrp uucp ${pkgdir}/run/lock/subsys
chmod 775 ${pkgdir}/run/lock/subsys
}
md5sums=('b540f74aa865ddf54976b41dc4f932c8'
'27cdc9e2194c607bd3dddd836436d1b5'
'ff68ba2ba6f66417be61b665ee9c640c'
'a199b4efd164a0624069a890af16e919'
'bf755f1b4bf51a6f21084627ce0160ee'
'93aade04088f34ae486ff6dc131b4e43'
'c41c13d299012654ff431500e12febca')
|