blob: f769b2ce8944e0bdf0d72c36d3ac8f1d4905652e (
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
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
|
# Contributor:
# Maintainer: Paul Morgan <jumanjiman@gmail.com>
pkgname=createrepo_c
pkgver=0.14.3
pkgrel=0
pkgdesc="C implementation of createrepo"
url="https://github.com/rpm-software-management/createrepo_c/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
bash-completion
bzip2-dev
cmake
curl-dev
expat-dev
file-dev
glib-dev
openssl-dev
libxml2-dev
python3-dev
rpm-dev
scanelf
sqlite-dev
xz-dev
zlib-dev
"
checkdepends="
check-dev
py3-nose
xz
"
subpackages="
${pkgname}-bash-completion:bashcomp:noarch
${pkgname}-dev
${pkgname}-doc
${pkgname}-libs
py3-${pkgname}:py3
"
source="
${pkgname}-${pkgver}.tar.gz::https://github.com/rpm-software-management/createrepo_c/archive/${pkgver}.tar.gz
"
build() {
mkdir "${builddir}"/build
cd "${builddir}"/build
# Pass cmake variables so
# end user does not need to set LD_LIBRARY_PATH.
# https://cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_SKIP_BUILD_RPATH=true \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=false \
-DCMAKE_INSTALL_RPATH=/usr/lib \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=true \
-DPYTHON_DESIRED=3 \
-DWITH_ZCHUNK=OFF \
-DWITH_LIBMODULEMD=OFF
make
}
check() {
cd "${builddir}"/build
make tests
tests/run_gtester.sh
}
package() {
cd "${builddir}"/build
make install/strip DESTDIR=${pkgdir}
}
py3() {
pkgdesc="Python3 bindings for createrepo_c"
depends="python3 ${pkgname}-libs"
# This is architecture-specific and provides a *.so file.
mkdir -p "${subpkgdir}"/usr/lib
mv "${pkgdir}"/usr/lib/python* "${subpkgdir}"/usr/lib/
}
bashcomp() {
depends=""
pkgdesc="Bash completions for ${pkgname}"
install_if="${pkgname}=${pkgver}-r${pkgrel} bash-completion"
mkdir -p "${subpkgdir}"/usr/share/
mv "${pkgdir}"/usr/share/bash-completion "${subpkgdir}"/usr/share/
}
sha512sums="949d3831ec0a54800948e2338eaf65e3d5d4ef06fcb4cef10541eac8dd44be80aecfc06c5de1de9cb318df01fdd9369912101fcb7b7265f32daa377765e98a55 createrepo_c-0.14.3.tar.gz"
|