summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d7481d6ec7bff0beb10b68080b5b2588cd3ea35b (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
# Maintainer: Yurii Kolesnykov <root@yurikoles.com>

_pkgname=zypper
pkgname=${_pkgname}-git
pkgver=1.14.39.3.g1d28e66a
pkgrel=1
pkgdesc="World's most powerful command line package manager"
arch=('x86_64')
url="https://github.com/openSUSE/${_pkgname}"
license=('GPL')
depends=(
  'libzypp-git'
  'libxml2'
  'procps'
  'readline'
  'augeas'
)
makedepends=(
  'git'
  'cmake'
  'ninja'
  'boost'
  'asciidoc'
  'asciidoctor'
)
provides=(
  "${_pkgname}"
  'apt'
)
conflicts=(
  "${_pkgname}"
  'apt'
)
source=(
  "${pkgname}::git+https://github.com/openSUSE/${_pkgname}.git"
  'make-ZyppCommon-cmake-module-includable.patch')
sha256sums=(
  'SKIP'
  'f5cdd85109c58d786f1124fa3cab1c5431a93a8d87a59117eac257c6e4698ae7'
)

pkgver() {
  cd "${pkgname}"
  echo $(git describe --always | sed -r 's/-/./g')
}

prepare() {
  cd "${pkgname}"
  patch -p1 -i ../make-ZyppCommon-cmake-module-includable.patch 
}

build() {
  cmake \
  -B build \
  -S "${pkgname}" \
  -G Ninja \
  -D CMAKE_INSTALL_PREFIX=/usr \
  -D CMAKE_BUILD_TYPE=Release \
  -D LIB=lib \
  -D ZYPP_PREFIX=/usr \

  cmake --build build
}

check() {
  ARGS="-V" cmake --test build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build

  # hacky sbin symlink fix
  mv "${pkgdir}"/usr/sbin/* "${pkgdir}/usr/bin/"
  rmdir "${pkgdir}/usr/sbin"
}