Skip to content

Instantly share code, notes, and snippets.

@tonylambiris tonylambiris/PKGBUILD Secret
Created Jun 28, 2017

Embed
What would you like to do?
libsolv PKGBUILD
pkgname=libsolv
pkgver=0.6.27
pkgrel=1
pkgdesc="Library for solving packages and reading repositories"
arch=('i686' 'x86_64')
url="https://github.com/openSUSE/$pkgname"
license=('BSD')
depends=('expat' 'xz' 'zlib')
makedepends=('cmake' 'perl' 'python' 'rpm-org' 'ruby' 'swig')
optdepends=('perl: for perl bindings'
'python: for python bindings'
'ruby: for ruby bindings')
source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz" "Add-conditionals-for-swig-perl-bug-workaround.patch")
md5sums=('04803110f87fe3840e611f902f18d8dc'
'78cc6c67f7c2adad4de40baa41b2745f')
prepare() {
cd "$pkgname-$pkgver"
patch -p1 -i "$srcdir/Add-conditionals-for-swig-perl-bug-workaround.patch"
rm -rf build
mkdir build
}
build() {
cd "$pkgname-$pkgver"/build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB=/lib \
-DUSE_VENDORDIRS=ON \
-DFEDORA=1 \
-DENABLE_APPDATA=ON \
-DENABLE_ARCHREPO=ON \
-DENABLE_BZIP2_COMPRESSION=ON \
-DENABLE_COMPLEX_DEPS=1 \
-DENABLE_COMPS=ON \
-DENABLE_CUDFREPO=ON \
-DENABLE_DEBIAN=ON \
-DENABLE_HAIKU=OFF \
-DENABLE_HELIXREPO=ON \
-DENABLE_LZMA_COMPRESSION=ON \
-DENABLE_MDKREPO=ON \
-DENABLE_PERL=ON \
-DENABLE_PUBKEY=ON \
-DENABLE_PYTHON=ON \
-DENABLE_RPMDB=ON \
-DENABLE_RPMDB_BYRPMHEADER=ON \
-DENABLE_RPMMD=ON \
-DENABLE_RPMPKG=ON \
-DENABLE_RUBY=ON \
-DENABLE_TCL=OFF \
-DENABLE_SUSEREPO=ON \
-DMULTI_SEMANTICS=ON \
-DWITH_LIBXML2=OFF \
..
make
}
check() {
cd "$pkgname-$pkgver"/build
make ARGS="-V" test
}
package() {
cd "$pkgname-$pkgver"/build
make DESTDIR="$pkgdir/" install
install -D -m644 ../LICENSE.BSD "$pkgdir/usr/share/licenses/$pkgname/LICENSE.BSD"
install -D -m644 ../README "$pkgdir/usr/share/doc/$pkgname/README"
install -D -m644 ../BUGS "$pkgdir/usr/share/doc/$pkgname/BUGS"
}
# vim: set ft=sh ts=4 sw=4 noet:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.