summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bacbf0122f7e24402985b8727cb16337ea403f51 (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
# Maintainer: Nora Allen < blackcatgames at protonmail dot com >
# Contributor: Vincent Lee < vincent at vincent dash lee dot net >

_realname=sapling  # Already taken on AUR
pkgname="$_realname-scm"
_realver=0.2.20230426-145232+7ea1f245
_realver2=0.2.20230426-145232-7ea1f245
pkgver="${_realver//-/.}"  # dashes aren't allowed in pkgver
epoch=1  # Version scheme was changed from YYYYMMDD-.... to prepend a number: 0.1-YYYYMMDD-...
pkgrel=1
pkgdesc="A Scalable, User-Friendly Source Control System"
arch=("x86_64")
url="https://sapling-scm.com"
license=('GPL2')
provides=("$pkgname")
depends=('curl' 'nodejs' 'python')
# NOTE: namcap(1) reports various missing python libs from scanning the package, but
#  this binary actually vendors them in. The resulting sl(1)
#  program runs fine without those libraries installed systemwide.
makedepends=("cargo" "cmake" "rust" "yarn")
optdepends=("github-cli: for integration with GitHub")
source=("https://github.com/facebook/sapling/archive/refs/tags/$_realver.tar.gz")
sha256sums=('5295cfbc7428f4cd88c722108fa75737b73e01a1cdbf79df236c0513b5c374cd')

prepare() {
	cd "$_realname-$_realver2"
}

build() {
	cd "$_realname-$_realver2/eden/scm"
	# TODO `make install-oss` rebuilds the entire project, rendering `make oss`
	# pointless currently. See https://github.com/facebook/sapling/issues/161 for more info.
	# make PREFIX=/usr oss
}

check() {
	cd "$_realname-$_realver2"
}

package() {
	cd "$_realname-$_realver2/eden/scm"
	SAPLING_VERSION="$_realver" make PREFIX=/usr DESTDIR="$pkgdir/" install-oss
}