-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
52 lines (48 loc) · 995 Bytes
/
PKGBUILD
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
52
# Maintainer: Courrier Guillaume <[email protected]>
pkgname=plotcpp
pkgver=0.1.1
pkgrel=1
epoch=0
pkgdesc="Simple C++ plot library."
arch=('x86_64')
url="https://github.com/CourrierGui/plotcpp"
license=('MIT')
groups=()
depends=('qcustomplot' 'qt5-base')
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!buildflags')
install=
changelog=
source=()
noextract=()
md5sums=()
validpgpkeys=()
pkgver() {
cd "$srcdir/$pkgname"
major=$(echo "$pkgver" | sed "s/\(\([0-9]\+\.\)\{2\}\([0-9]\)\+\)\.\?[0-9a-z]\+/\1/")
echo "$major.$(git rev-parse --short HEAD)"
}
prepare() {
if [ -d "$srcdir/$pkgname/.git" ]
then
cd "$srcdir/$pkgname"; git pull origin master
else
git clone $url "$srcdir/$pkgname"
fi
mkdir -p "$srcdir/$pkgname/build"
}
build() {
cd "$srcdir/$pkgname"
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
}
package() {
cd "$srcdir/$pkgname"
cmake --install build --prefix "$pkgdir"/usr
}