Skip to content

Commit 09b24c8

Browse files
committed
upload xbuild to the repo
1 parent 2c8edbc commit 09b24c8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

packaging/xpkg/XBUILD

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[package]
2+
name = "xpkg"
3+
version = "0.1.0"
4+
release = 1
5+
description = "Package builder for X Distribution"
6+
url = "https://github.com/xscriptordev/xpkg"
7+
license = ["GPL-3.0-or-later"]
8+
arch = ["x86_64"]
9+
10+
[dependencies]
11+
depends = ["glibc"]
12+
makedepends = ["cargo", "gcc", "rust"]
13+
14+
[source]
15+
urls = []
16+
17+
[build]
18+
prepare = """
19+
REPO_ROOT="$(cd "$startdir/../.." && pwd)"
20+
rm -rf "$SRCDIR/xpkg-src"
21+
mkdir -p "$SRCDIR/xpkg-src"
22+
cp -a "$REPO_ROOT/." "$SRCDIR/xpkg-src/"
23+
rm -rf "$SRCDIR/xpkg-src/target"
24+
"""
25+
26+
build = """
27+
cd "$SRCDIR/xpkg-src"
28+
cargo build -p xpkg --release --locked
29+
"""
30+
31+
package = """
32+
cd "$SRCDIR/xpkg-src"
33+
install -Dm755 "target/release/xpkg" "$PKGDIR/usr/bin/xpkg"
34+
install -Dm644 LICENSE "$PKGDIR/usr/share/licenses/xpkg/LICENSE"
35+
install -Dm644 README.md "$PKGDIR/usr/share/doc/xpkg/README.md"
36+
install -Dm644 etc/xpkg.conf.example "$PKGDIR/usr/share/xpkg/xpkg.conf.example"
37+
"""

0 commit comments

Comments
 (0)