void-packages/srcpkgs/lpsolve/template

47 lines
1 KiB
Bash

# Template file for 'lpsolve'
pkgname=lpsolve
version=5.5.2.5
revision=2
wrksrc=lp_solve_${version%.*.*}
short_desc="Mixed Integer Linear Programming (MILP) solver"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL"
homepage="http://sourceforge.net/projects/lpsolve"
distfiles="${SOURCEFORGE_SITE}/$pkgname/lp_solve_${version}_source.tar.gz"
checksum=201a7c62b8b3360c884ee2a73ed7667e5716fc1e809755053b398c2f5b0cf28a
do_configure() {
sed -i \
-e 's/^c=cc/c="$CC"/' \
-e 's/dl=-ldl/dl="-ldl $LDFLAGS"/' \
-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
}
}