void-packages/srcpkgs/lpsolve/template

47 lines
1021 B
Bash

# Template file for 'lpsolve'
pkgname=lpsolve
version=5.5.2.3
revision=1
wrksrc=lp_solve_${version%.*.*}
short_desc="Mixed Integer Linear Programming (MILP) solver"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="GPL"
homepage="http://sourceforge.net/projects/lpsolve"
distfiles="${SOURCEFORGE_SITE}/$pkgname/lp_solve_${version}_source.tar.gz"
checksum=fb43ae8ad3bb4cee617863f7fc03b26ccc0ff7946a9cc4665cb9afa04c0a1cab
do_configure() {
sed -i \
-e 's/^c=cc/c="$CC"/' \
-e 's/^opts=.*/opts="$CFLAGS"/' \
-e 's/^PLATFORM=.*/PLATFORM=/' \
-e 's/-DNOISNAN//' \
lp_solve/ccc lpsolve55/ccc
}
do_build() {
cd lpsolve55
sh -x ccc
cd ../lp_solve
sh -x ccc
cd ..
}
do_install() {
vmkdir usr/bin
vmkdir usr/lib
vmkdir usr/include/lpsolve
vbin lp_solve/bin/lp_solve
vinstall lpsolve55/bin/liblpsolve55.so 755 usr/lib/
vcopy lp*.h usr/include/lpsolve/
}
lpsolve-devel_package() {
depends="lpsolve>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
}
}