-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPKGBUILD
48 lines (41 loc) · 811 Bytes
/
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
# Maintainter: Woshiluo Luo <[email protected]>
pkgname=woshiluo-tools
_pkgname=tools
pkgver=28a2bf
pkgrel=1
pkgdesc="小工具集合"
arch=('x86_64' 'i686')
url="https://github.com/woshiluo/tools"
license=('AGPL3')
makedepends=('git')
source=(git+https://github.com/woshiluo/tools)
md5sums=('SKIP')
pkgver() {
cd "$srcdir/$_pkgname"
echo $(git rev-list --all --max-count=1 | cut -b 1-6)
}
build() {
cd "$srcdir/$_pkgname"
for repo in ./*; do
if [ -d $repo ]; then
cd $repo
cargo build --release
cd ..
fi
done
}
package() {
cd "$srcdir/$_pkgname"
mkdir -p $pkgdir/usr/bin
for repo in ./*; do
if [ -d $repo ]; then
cd $repo
find target/release \
-maxdepth 1 \
-executable \
-type f \
-exec install -m 755 "{}" "$pkgdir"/usr/bin \;
cd ..
fi
done
}