summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 86d047bbe8e48f29459f8f68574cafb15cf622e5 (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
# Maintainer: Joshua Smith <smolsheep@opensuse.org>
# Contributor: Yurii Kolesnykov <root@yurikoles.com>
# Contributor: Daan De Meye <daan.j.demeyer@gmail.com>
# Contributor: Silvio Knizek <knizek@b1-systems.de>

pkgname=zypper
pkgver=1.14.77
pkgrel=1
pkgdesc="World's most powerful command line package manager"
arch=('x86_64')
url='http://en.opensuse.org/Portal:Zypper'
license=('GPL')
depends=(
  'augeas'
  'libzypp'
  'perl'
  'procps'
)
makedepends=(
  'asciidoc'
  'asciidoctor'
  'boost'
  'cmake'
)
provides=('apt')
conflicts=('apt')
source=(
  "${pkgname}-${pkgver}.tar.gz::https://github.com/openSUSE/zypper/archive/${pkgver}.tar.gz"
)
sha256sums=('1674a46da997dc5a366d8fcb02172dfd15242975eccd0068d083fbf4199474f4')

prepare() {
  cd "${pkgname}-${pkgver}"
}

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

  cmake --build build
}

check() {
  ctest --test-dir build
}

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

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