forked from arch4edu/arch4edu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
48 lines (41 loc) · 1.34 KB
/
PKGBUILD
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
# Maintainer: Jingbei Li <[email protected]>
pkgname=devtools-qemu
pkgver=18.c3983da
pkgrel=2
pkgdesc='QEMU based cross-build tools for Arch Linux ARM package maintainers'
arch=('x86_64')
url='https://aur.archlinux.org/packages/devtools-qemu'
license=('GPL')
depends=('archlinuxarm-keyring' 'binfmt-qemu-static' 'devtools' 'qemu-user-static-bin')
makedepends=('git')
source=("$pkgname::git+https://github.com/arch4edu/devtools-arch4edu-extra.git"
"archbuild-qemu.patch"
)
sha256sums=('SKIP'
'0d8549497ff97e2d11ca73c3d6463e134ce590cb7767b76b3c54eceab19c831e')
pkgver() {
cd "$srcdir/$pkgname"
echo "$(git rev-list --count master).$(git rev-parse --short master)"
}
build() {
cd $srcdir/$pkgname
cp /usr/bin/archbuild archbuild-qemu
patch archbuild-qemu < $srcdir/archbuild-qemu.patch
for i in armv6h armv7h aarch64
do
sed -i '/^Include/s/$/.alarm/' pacman-extra-$i.conf
done
}
package() {
mkdir -p $pkgdir/usr/bin
mkdir -p $pkgdir/usr/share/devtools
mkdir -p $pkgdir/etc/pacman.d
cp $srcdir/$pkgname/archbuild-qemu $pkgdir/usr/bin
cp $srcdir/$pkgname/mirrorlist $pkgdir/etc/pacman.d/mirrorlist.alarm
for i in armv6h armv7h aarch64
do
cp $srcdir/$pkgname/pacman-extra-$i.conf $pkgdir/usr/share/devtools/
cp $srcdir/$pkgname/makepkg-$i.conf $pkgdir/usr/share/devtools/
ln -sf /usr/bin/archbuild-qemu $pkgdir/usr/bin/extra-$i-build
done
}