Skip to content

Instantly share code, notes, and snippets.

@kris7t
Created August 11, 2014 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kris7t/b250b304eed88cd4afb0 to your computer and use it in GitHub Desktop.
Save kris7t/b250b304eed88cd4afb0 to your computer and use it in GitHub Desktop.
# Contributor: jiuren <qiuwei1987@gmail.com>
# Maintainer: Benoit Favre <benoit.favre@lif.univ-mrs.fr>
# Contributor: Kristof Marussy <kris7topher@gmail.com>
pkgname=liblinear
pkgver=1.94
pkgrel=3
pkgdesc="A Library for Large Linear Classification"
arch=('i686' 'x86_64')
url="http://www.csie.ntu.edu.tw/~cjlin/liblinear/"
license=('BSD')
groups=()
depends=('coreutils')
makedepends=()
optdepends=(
'python: bindings for latest python version'
'python2: bindings for python 2'
'gcc-libs')
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
source=("http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/liblinear.cgi?+http://www.csie.ntu.edu.tw/~cjlin/liblinear+tar.gz")
noextract=()
md5sums=('f52e1f2dd6bccb58977a334bba0bbf90')
build() {
cd "$srcdir/$pkgname-$pkgver"
make lib all
}
package() {
cd "$srcdir/$pkgname-$pkgver"
install -D -m755 train $pkgdir/usr/bin/liblinear-train
install -D -m755 predict $pkgdir/usr/bin/liblinear-predict
install -D -m644 liblinear.so.1 $pkgdir/usr/lib/liblinear.so.1
install -D -m644 linear.h $pkgdir/usr/include/linear.h
ln -s liblinear.so.1 $pkgdir/usr/lib/liblinear.so
cd python
sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' liblinear.py
sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' liblinearutil.py
install -D -m644 liblinear.py $pkgdir/usr/lib/python2.7/liblinear.py
install -D -m644 liblinearutil.py $pkgdir/usr/lib/python2.7/liblinearutil.py
sed -i 's_#!/usr/bin/env python2_#!/usr/bin/env python3_' liblinear.py
sed -i 's_#!/usr/bin/env python2_#!/usr/bin/env python3_' liblinearutil.py
install -D -m644 liblinear.py $pkgdir/usr/lib/python3.4/liblinear.py
install -D -m644 liblinearutil.py $pkgdir/usr/lib/python3.4/liblinearutil.py
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment