summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a2eeaf9bae4f9ee941b7a2af4fcffbccf3a4f690 (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: TurtleRuss <tttturtleruss@gmail.com> 

pkgname=hustmirror-cli-git
pkgver=1.1.4.r6.g4314ffe
pkgrel=1
epoch=
pkgdesc="The command line tool (hustmirror-cli) is a small tool that can help you quickly change sources to HUST mirror sources."
arch=('any')
license=('GPL-3.0-only')
url='https://github.com/hust-open-atom-club/hustmirror-cli'
groups=()
depends=('bash')
makedepends=('make' 'python3' 'git')
checkdepends=()
optdepends=()
provides=()
conflicts=(hustmirror-cli)
replaces=()
backup=()
options=()
install=
changelog=
source=("git+${url}.git"
        "$pkgname.patch"
	"$pkgname-makefile.patch")
noextract=()
sha256sums=('SKIP'
            'a08dfc1246edcb721505d717dff36abdaa4aee0f1a74c02d4eece69f563cb5e8'
	    '98b7f5cc6e8e8eb930417024c1382e8f29df4eab6d7c386329881c03f19a7c71')
validpgpkeys=()

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^v//'
}

prepare() {
	cd "$srcdir/${pkgname%-git}"
	patch -p1 -i "$srcdir/$pkgname.patch"
	patch -p1 -i "$srcdir/$pkgname-makefile.patch"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	make
}

package() {
	cd "$srcdir/${pkgname%-git}"
	make DESTDIR="$pkgdir/" install
}