-
Notifications
You must be signed in to change notification settings - Fork 0
/
pkgbuild-bin
41 lines (34 loc) · 1.47 KB
/
pkgbuild-bin
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
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Your Name <[email protected]>
pkgname=pix
pkgver=v1.0.0
pkgrel=1
pkgdesc="Installation and configuration done in one command "
arch=('any')
url="https://github.com/koompi/os-pix/"
license=('GPL3')
depends=('glibc')
makedepends=('llvm' 'autoconf' 'automake' 'binutils' 'bison' 'fakeroot' 'file' 'findutils' 'flex' 'gawk' 'gcc' 'gettext' 'grep' 'groff' 'gzip' 'libtool' 'm4' 'make' 'pacman' 'patch' 'pkgconf' 'sed' 'sudo' 'texinfo' 'which' 'rustup' 'git' 'clang' 'cmake' 'openssl')
provides=('pix')
source=('git+https://github.com/koompi/os-pix.git')
md5sums=('5ca08138b568354314c9034de9a5c6e1') #generate with 'makepkg -g'
prepare() {
rustup default stable
}
build() {
cd "$srcdir/os-pix"
sed -i 's/http:\/\/localhost:4000/https:\/\/pix.koompi.org/' "$srcdir/os-pix/bin/src/graph.rs"
cargo build --release
}
package() {
mkdir -p "${pkgdir}/var/lib/pix/db"
mkdir -p "${pkgdir}/var/lib/pix/registry"
chgrp -R pix "${pkgdir}/var/lib/pix"
chmod -R 2775 "${pkgdir}/var/lib/pix"
mv "$srcdir/os-pix/target/release/bin" "$srcdir/os-pix/target/release/pix"
install -Dm755 "$srcdir/os-pix/target/release/pix" -t "${pkgdir}/usr/bin/"
echo '{"packages":[]}' > ${pkgdir}/var/lib/pix/db/db.json
}