blob: ee30fe77b1d643614a9a16b7147d9b538795e73a (
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
45
46
47
48
49
50
51
|
# Maintainer: Terrasse <terrasse@qq.com>
# Maintainer: ccmywish <ccmywish@qq.com>
pkgname=chsrc-git
pkgver=20250107.r1097.f1f97a3
pkgrel=1
pkgdesc="A cli tool to change source for every software on every platform"
arch=('x86_64') # TODO: add more archs
url="https://github.com/RubyMetric/chsrc"
license=('GPL-3.0-or-later' 'MIT')
groups=()
depends=()
makedepends=('git')
provides=('chsrc')
conflicts=('chsrc')
replaces=()
backup=()
options=()
install=
source=("$pkgname::git+$url")
noextract=()
sha256sums=('SKIP')
pkgver() {
cd "$srcdir"/"$pkgname"
local date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
local count=$(git rev-list --count HEAD)
local commit=$(git rev-parse --short HEAD)
echo "$date.r${count}.$commit"
}
build() {
cd "$srcdir"/"$pkgname"
make
}
check() {
cd "$srcdir"/"$pkgname"
make fastcheck
}
package() {
cd "$srcdir"/"$pkgname"
install -Dm 755 chsrc -t $pkgdir/usr/bin/
# MIT License
install -Dm 644 LICENSE-MIT.txt -t $pkgdir/usr/share/licenses/$pkgname
# Man Page
install -Dm 644 doc/chsrc.1 -t $pkgdir/usr/share/man/man1/
# Texinfo
makeinfo doc/chsrc.texi --output=doc/chsrc.info
install -Dm 644 doc/chsrc.info -t $pkgdir/usr/share/info/
}
|