diff options
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 48 |
2 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1a316fa147ca --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = librepo + pkgdesc = Repodata downloading library + pkgver = 1.7.15 + pkgrel = 1 + url = https://github.com/Tojaj/librepo + arch = i686 + arch = x86_64 + license = LGPL2.1 + checkdepends = check + checkdepends = python-flask + checkdepends = python-nose + checkdepends = python-pygpgme + checkdepends = python-pyxattr + makedepends = cmake + makedepends = python + depends = curl + depends = expat + depends = glib2 + depends = gpgme + optdepends = python: for python bindings + source = https://github.com/Tojaj/librepo/archive/librepo-1.7.15.tar.gz + md5sums = e4971ffccf2c78c2b390df43b01297c3 + +pkgname = librepo + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0b5a49be8800 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +pkgname=librepo +pkgver=1.7.15 +pkgrel=1 +pkgdesc="Repodata downloading library" +arch=('i686' 'x86_64') +url="https://github.com/Tojaj/$pkgname" +license=('LGPL2.1') +depends=('curl' 'expat' 'glib2' 'gpgme') +makedepends=('cmake' 'python') +checkdepends=('check' 'python-flask' 'python-nose' 'python-pygpgme' 'python-pyxattr') +optdepends=('python: for python bindings') +source=("$url/archive/$pkgname-$pkgver.tar.gz") +md5sums=('e4971ffccf2c78c2b390df43b01297c3') + +prepare() { + cd "$pkgname-$pkgname-$pkgver" + rm -rf build + mkdir build +} + +build() { + cd "$pkgname-$pkgname-$pkgver"/build + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_SKIP_RPATH=ON \ + -DPYTHON_DESIRED=3 \ + -DENABLE_DOCS=OFF \ + .. + make +} + +check() { + cd "$pkgname-$pkgname-$pkgver"/build + make ARGS="-V" test +} + +package() { + cd "$pkgname-$pkgname-$pkgver"/build + make DESTDIR="$pkgdir/" install + if [[ "$CARCH" == "x86_64" ]]; then + mv "$pkgdir/"usr/lib64/* "$pkgdir/"usr/lib + rmdir "$pkgdir/"usr/lib64 + fi + + install -D -m644 ../README.md "$pkgdir/usr/share/doc/$pkgname/README.md" +} + +# vim: set ft=sh ts=4 sw=4 noet: |