forked from msys2/MSYS2-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
65 lines (54 loc) · 1.58 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
# Maintainer: Alexey Pavlov <[email protected]>
pkgname=('apr' 'apr-devel')
pkgver=1.7.5
pkgrel=1
pkgdesc="The Apache Portable Runtime"
arch=('i686' 'x86_64')
url="https://apr.apache.org/"
msys2_references=(
"cpe: cpe:/a:apache:portable_runtime"
)
makedepends=('libxcrypt-devel' 'libuuid-devel' 'autotools' 'gcc')
options=('!libtool')
license=('spdx:Apache-2.0')
source=(https://archive.apache.org/dist/apr/apr-${pkgver}.tar.bz2)
sha256sums=('cd0f5d52b9ab1704c72160c5ee3ed5d3d4ca2df4a7f8ab564e3cb352b67232f2')
prepare() {
cd "${srcdir}/apr-${pkgver}"
autoreconf -fi
}
build() {
cd "${srcdir}/apr-${pkgver}"
export MSYSTEM=CYGWIN
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
./configure \
--build=${CYGWIN_CHOST} \
--prefix=/usr \
--libexecdir=/usr/lib/apr/modules \
--datadir=/usr/share/apr \
ac_cv_header_windows_h=no \
ac_cv_header_winsock2_h=no
make
make DESTDIR="${srcdir}/dest" install
}
check() {
cd "${srcdir}/apr-${pkgver}"
make -j1 check || true
}
package_apr() {
depends=('libxcrypt' 'libuuid')
groups=('libraries')
mkdir -p ${pkgdir}/usr/{bin,share}
cp -f ${srcdir}/dest/usr/bin/*.dll ${pkgdir}/usr/bin/
}
package_apr-devel() {
pkgdesc="Libapr headers and libraries"
groups=('development')
depends=("apr=${pkgver}" "libxcrypt-devel" "libuuid-devel")
options=('staticlibs')
mkdir -p ${pkgdir}/usr/{bin,share}
cp -f ${srcdir}/dest/usr/bin/*-config ${pkgdir}/usr/bin/
cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr/
cp -rf ${srcdir}/dest/usr/lib ${pkgdir}/usr/
cp -rf ${srcdir}/dest/usr/share/apr ${pkgdir}/usr/share/
}