diff options
author | Yurii Kolesnykov | 2020-09-24 11:22:47 +0300 |
---|---|---|
committer | Yurii Kolesnykov | 2020-09-24 11:22:47 +0300 |
commit | 1bacbdf4c4ab88eeb2bc503bfcd24ae4f12ece1f (patch) | |
tree | f14e5c027ffe107c28936f2ecb05d8600c25ec1a /PKGBUILD | |
parent | b85324fb8ac4213962ee75c129a19d2f11a4450a (diff) | |
download | aur-1bacbdf4c4ab88eeb2bc503bfcd24ae4f12ece1f.tar.gz |
refactoring
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 83 |
1 files changed, 54 insertions, 29 deletions
@@ -1,50 +1,75 @@ # Maintainer: Yurii Kolesnykov <root@yurikoles.com> -pkgname=zypper-git -pkgver=1.14.27.17.g41f31dd1 +_pkgname=zypper +pkgname=${_pkgname}-git +pkgver=1.14.39.3.g1d28e66a pkgrel=1 -pkgdesc="Command line software manager using libzypp" -arch=('i686' 'x86_64') -url="https://github.com/openSUSE/zypper" +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') -provides=('zypper' 'apt') -conflicts=('zypper' 'apt') -source=('git+https://github.com/openSUSE/zypper.git' - 'make-ZyppCommon-cmake-module-includable.patch') -sha256sums=('SKIP' - 'f5cdd85109c58d786f1124fa3cab1c5431a93a8d87a59117eac257c6e4698ae7') -_gitname="zypper" +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 "${_gitname}" + cd "${pkgname}" echo $(git describe --always | sed -r 's/-/./g') } prepare() { - cd "${_gitname}" + cd "${pkgname}" patch -p1 -i ../make-ZyppCommon-cmake-module-includable.patch } build() { - cd "${_gitname}" - mkdir -p build && cd build cmake \ - -G Ninja \ - -D CMAKE_INSTALL_PREFIX=/usr \ - -D CMAKE_BUILD_TYPE=Release \ - -D LIB=/lib \ - -D ZYPP_PREFIX=/usr \ - .. - ninja + -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() { - cd "${_gitname}/build" - DESTDIR="$pkgdir/" ninja install + DESTDIR="${pkgdir}" cmake --install build # hacky sbin symlink fix - mv "${pkgdir}"/usr/sbin/* "$pkgdir/usr/bin/" - rmdir "$pkgdir/usr/sbin" + mv "${pkgdir}"/usr/sbin/* "${pkgdir}/usr/bin/" + rmdir "${pkgdir}/usr/sbin" } |