blob: eeb4af5db6d0a03e0546166269691dd9407b7bd3 (
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
|
# Maintainer: Yurii Kolesnykov <root@yurikoles.com>
# Submitter: Spyhawk
_pkgname=libzypp
pkgname="${_pkgname}-git"
pkgver=17.25.0.r7.gf247a52b7
pkgrel=1
pkgdesc='Library for package, patch, pattern and product management'
arch=('x86_64')
url="https://github.com/openSUSE/${_pkgname}"
license=('GPL')
depends=(
'boost-libs'
'gpgme'
'libproxy'
'libsigc++'
'libsolv-git'
'libsystemd'
'libxml2'
'yaml-cpp'
)
makedepends=(
'asciidoc'
'boost'
'cmake'
'dejagnu'
'expat'
'git'
'gnupg'
'graphviz'
'ninja'
)
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${pkgname}::git+https://github.com/openSUSE/${_pkgname}.git")
sha256sums=('SKIP')
pkgver() {
cd "${pkgname}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
# CMake doesn't find FindLibSolv.cmake in /usr/share/cmake/Modules
cp /usr/share/cmake/Modules/FindLibSolv.cmake "${pkgname}"/cmake/modules/
rm -rf build
}
build() {
cmake \
-B build \
-S "${pkgname}" \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr \
-D LIB=lib \
-D CMAKE_SKIP_RPATH=1 \
-D DISABLE_LIBPROXY=0 \
-D DISABLE_AUTODOCS=1 \
-D DISABLE_MEDIABACKEND_TESTS=ON \
ninja -C build
}
check() {
ninja -C build test
}
package() {
DESTDIR="${pkgdir}" ninja -C build install
# cmake fix (see GH#28)
mkdir -p "${pkgdir}"/usr/lib/cmake/Zypp
mv "${pkgdir}"/usr/share/cmake/Modules/* "${pkgdir}"/usr/lib/cmake/Zypp/
rm -rf "${pkgdir}"/usr/share/cmake
}
|