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 | |
parent | b85324fb8ac4213962ee75c129a19d2f11a4450a (diff) | |
download | aur-1bacbdf4c4ab88eeb2bc503bfcd24ae4f12ece1f.tar.gz |
refactoring
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 83 |
3 files changed, 59 insertions, 33 deletions
@@ -1,9 +1,8 @@ pkgbase = zypper-git - pkgdesc = Command line software manager using libzypp - pkgver = 1.14.27.17.g41f31dd1 + pkgdesc = World's most powerful command line package manager + pkgver = 1.14.39.3.g1d28e66a pkgrel = 1 url = https://github.com/openSUSE/zypper - arch = i686 arch = x86_64 license = GPL makedepends = git @@ -11,6 +10,7 @@ pkgbase = zypper-git makedepends = ninja makedepends = boost makedepends = asciidoc + makedepends = asciidoctor depends = libzypp-git depends = libxml2 depends = procps @@ -20,7 +20,7 @@ pkgbase = zypper-git provides = apt conflicts = zypper conflicts = apt - source = git+https://github.com/openSUSE/zypper.git + source = zypper-git::git+https://github.com/openSUSE/zypper.git source = make-ZyppCommon-cmake-module-includable.patch sha256sums = SKIP sha256sums = f5cdd85109c58d786f1124fa3cab1c5431a93a8d87a59117eac257c6e4698ae7 diff --git a/.gitignore b/.gitignore index f87ef6aaca6c..811fda55f5d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ zypper src +*.log pkg *.pkg.* @@ -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" } |