-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
125 lines (105 loc) · 4.02 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
################################################################################
# Encoding: UTF-8 Tab size: 4 #
# #
# ARCH LINUX PACKAGE BUILD DESCRIPTION FILE #
# #
# Ordnung muss sein! Copyleft (Ɔ) 2019, Arch Linux #
################################################################################
# Maintainer: Jack Black <ezamlinsky@gmail.com>
#==============================================================================#
# Package information #
#==============================================================================#
pkgname=('gmp')
pkgver=6.2.0
pkgrel=1
pkgdesc='A free library for arbitrary precision arithmetic'
url='https://gmplib.org/'
license=('LGPL3' 'GPL')
arch=('x86_64')
#==============================================================================#
# Package dependencies #
#==============================================================================#
depends=(
'gcc-libs'
'glibc'
'sh'
)
#==============================================================================#
# Package sources and integrity #
#==============================================================================#
source=(
"https://gmplib.org/download/$pkgname/$pkgname-$pkgver.tar.lz"
"https://gmplib.org/download/$pkgname/$pkgname-$pkgver.tar.lz.sig"
)
md5sums=(
'e3e08ac185842a882204ba3c37985127'
'SKIP'
)
#==============================================================================#
# Package preparation sequence #
#==============================================================================#
prepare() {
# Change directory to source directory
cd $pkgname-$pkgver
# Run autogen script if exists
if [ -x autogen.sh ]; then
NOCONFIGURE=1 ./autogen.sh
fi
}
#==============================================================================#
# Package building sequence #
#==============================================================================#
build() {
# Change directory to source directory
cd $pkgname-$pkgver
# Default configure options
config_opts=(
'--prefix=/usr'
'--bindir=/usr/bin'
'--sbindir=/usr/bin'
'--libdir=/usr/lib'
'--libexecdir=/usr/lib'
'--sysconfdir=/etc'
'--localstatedir=/var'
'--enable-silent-rules'
'--enable-shared'
'--disable-static'
'--disable-assert'
'--disable-profiling'
'--enable-assembly'
'--enable-fft'
'--enable-fat'
# 'gcc-libs' related options
'--enable-cxx'
#'--disable-cxx'
)
# Run package configuration script
./configure "${config_opts[@]}"
# Set correct LDFLAGS to build a shared archive
if [ -f libtool ]; then
sed -e "s/ -shared / $LDFLAGS\0/g" -i libtool
fi
# Build package
make
}
#==============================================================================#
# Package self testing sequence #
#==============================================================================#
check() {
# Change directory to source directory
cd $pkgname-$pkgver
# Run internal checks
make -k check
}
#==============================================================================#
# Package installation sequence #
#==============================================================================#
package() {
# Change directory to source directory
cd $pkgname-$pkgver
# Install files
make DESTDIR=$pkgdir install
}
################################################################################
# END OF FILE #
################################################################################