diff options
author | sukanka | 2023-04-15 11:49:01 +0800 |
---|---|---|
committer | sukanka | 2023-04-15 11:49:01 +0800 |
commit | 446bad6640414f739f66f208fa2228d08e1ffe1c (patch) | |
tree | d3ec04211473f2000f906516b7523cdcdd1f85a9 | |
download | aur-446bad6640414f739f66f208fa2228d08e1ffe1c.tar.gz |
add lingo
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | lingo.desktop | 11 | ||||
-rw-r--r-- | runlingo.sh | 12 |
4 files changed, 125 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..434f83e991be --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = lingo + pkgdesc = Comprehensive modeling language and solvers for linear, non-linear, and integer programming. + pkgver = 20.0 + pkgrel = 1 + url = https://www.lindo.com + arch = x86_64 + license = unknown + makedepends = shared-mime-info + makedepends = desktop-file-utils + makedepends = imagemagick + makedepends = patchelf + depends = gcc-libs + depends = qt5-base + depends = tbb + source = lingo-20.0.run::https://www.lindo.com/downloads/Lingo-20.0-linux-x64-installer.run + source = runlingo.sh + source = lingo.desktop + sha256sums = e6ed9b8541e0ee3f13c66739e72e8b5343f796e8204179603bafbc4fedc04fbd + sha256sums = eaeefbec47a5ab44176dd1088bf83bb3724d369fe12d033e7c9d62b00aaa1653 + sha256sums = 8c12e4675d2507d6d91e73b16c10f7b313778cb91e29be14a83f8d73fb1d1b63 + +pkgname = lingo diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ee2b99db6c35 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: Sukanka <su975853527 [AT] gmail.com> + +pkgname=lingo +pkgver=20.0 +pkgrel=1 +pkgdesc='Comprehensive modeling language and solvers for linear, non-linear, and integer programming.' +arch=('x86_64') +url='https://www.lindo.com' +license=('unknown') +depends=('gcc-libs' 'qt5-base' 'tbb') +makedepends=('shared-mime-info' 'desktop-file-utils' 'imagemagick' 'patchelf') +source=("${pkgname}-${pkgver}.run::${url}/downloads/Lingo-${pkgver}-linux-x64-installer.run" +'runlingo.sh' +'lingo.desktop' +) + +sha256sums=('e6ed9b8541e0ee3f13c66739e72e8b5343f796e8204179603bafbc4fedc04fbd' + 'eaeefbec47a5ab44176dd1088bf83bb3724d369fe12d033e7c9d62b00aaa1653' + '8c12e4675d2507d6d91e73b16c10f7b313778cb91e29be14a83f8d73fb1d1b63') +DLAGENTS=("https::/usr/bin/curl -A 'Mozilla' -fLC - --retry 3 --retry-delay 3 -o %o %u") + +prepare() { + cd "$srcdir" + chmod a+x "${pkgname}-${pkgver}.run" + ./"${pkgname}-${pkgver}.run" --mode unattended --prefix ${srcdir}/usr/share/${pkgname} + mkdir -p ${srcdir}/usr/lib/${pkgname} + mv ${srcdir}/usr/share/${pkgname}/bin/linux64/* ${srcdir}/usr/lib/${pkgname} + + mv ${srcdir}/usr/lib/${pkgname}/lingo${pkgver%.*}.bin ${srcdir}/usr/lib/${pkgname}/lingo.bin + + sed -i "s|VER|${pkgver%.*}|g" runlingo.sh + install -Dm755 runlingo.sh ${srcdir}/usr/bin/runlingo + install -Dm755 runlingo.sh ${srcdir}/usr/bin/lingo + sed -i 's/runlingo.bin/lingo.bin/g' ${srcdir}/usr/bin/lingo + + sed -i "s|__VER__|${pkgver}|g" lingo.desktop + install -Dm644 lingo.desktop -t ${srcdir}/usr/share/applications + + + cd ${srcdir}/usr/share/${pkgname} + rm -rf uninstall.dat uninstall *.desktop runlingo lingo${pkgver%.*} *.log + + # icon + cd ${srcdir}/usr/share/${pkgname}/images + # convert lingo128.ico to png + convert "lingo128.ico" -thumbnail 128x128 -alpha on -background none -flatten "lingo.png" + install -Dm644 lingo.png -t ${srcdir}/usr/share/icons/hicolor/128x128/apps + rm lingo.png + + + cd ${srcdir}/usr/lib/${pkgname}/ + rm -rf libQt5* platforms/libqxcb.so # qt5-base + # ln -sf /usr/lib/qt/plugins/platforms/libqxcb.so platforms/libqxcb.so + rm -rf libgcc_s* libgfortran* libquadmath* #gcc-libs + rm -rf libtbb* #tbb + +} + + +package() { + cd "$srcdir" + mv usr "${pkgdir}" + + cd "${pkgdir}"/usr/share/${pkgname} + mkdir -p ${pkgdir}/usr/share/doc + mv doc ${pkgdir}/usr/share/doc/${pkgname} + ln -s /usr/share/doc/${pkgname} ${pkgdir}/usr/share/${pkgname}/doc + + chmod 0755 -R ${pkgdir}/usr/lib/${pkgname} + + cd ${pkgdir}/usr/share/${pkgname} + find . -type f -exec chmod 644 {} \; + find . -type d -exec chmod 755 {} \; + chmod a+w LINGO.CNF + chmod a+w -R license + rm -rf bin programming_samples/c/runlingo/runlingo.bin + cd ${pkgdir}/usr/share/doc/${pkgname} + find . -type f -exec chmod 644 {} \; + +} diff --git a/lingo.desktop b/lingo.desktop new file mode 100644 index 000000000000..627ea7ca0ac8 --- /dev/null +++ b/lingo.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=__VER__ +Name=Lingo __VER__ +GenericName=Lingo __VER__ +Comment=www.lindo.com +Exec=lingo +Terminal=false +Type=Application +Icon=lingo +Path=/usr/share/lingo/samples +MimeType=application/x-lingo-model diff --git a/runlingo.sh b/runlingo.sh new file mode 100644 index 000000000000..5242ee0529c8 --- /dev/null +++ b/runlingo.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# cd /usr/share/lingo +export LINGO_VER_HOME=/usr/share/lingo +# +# export LD_LIBRARY_PATH=$LINGO_VER_HOME/bin/linux64:$LD_LIBRARY_PATH +# +export FONTPATH=$LINGO_VER_HOME/fonts/charting +# +export QT_QPA_FONTDIR=$LINGO_VER_HOME/fonts/gui +# +exec /usr/lib/lingo/runlingo.bin "$@" +# exec ../../lib/lingo/runlingo.bin "$@" |