You are not logged in.
Hi,
I just made a PKGBUILD for the Gurobi optimizer, which is proprietary software unfortunately: https://aur.archlinux.org/packages/gurobi/
I would be glad to get feedback as I am not used to package proprietary software. Moreover, Gurobi has a few programming interfaces, some of which I am not sure how to package such as the MATLAB one.
To get the software itself, you must register on the website. Then you can download it with a free evaluation license.
Feel free to point out improvements.
Thanks
Offline
Alright. First, the problems:
There needs to be some comments in the PKGBUILD about how to get the file. The person building it needs to know where to go and what to do.
Currently, makepkg --repackage will fail because you make changes to $srcdir in the package function. mv should be cp, and sed and rm should be done in a separate prepare function or after things are already in $pkgdir.
You install things based on what's available on the build machine. What if you're building in a clean chroot? What if you want to take the package from one of your systems to another? Avoid those "if"s if possible.
Then, suggestions/questions:
In the source array, why "${pkgname}${pkgver}_linux64.tar.gz::file://${pkgname}${pkgver}_linux64.tar.gz" instead of just "${pkgname}${pkgver}_linux64.tar.gz"?
A lot of your install command can be combined, simplifying things significantly. All of the install -d commands can be done at once, for example. Or using -D more when installing only one file. If you want to keep things separated to keep them organized, I understand that, too.
Last edited by Scimmia (2014-10-17 19:44:26)
Offline
Moving to AUR Issues, Discussion and PKGBUILD requests.
Could you please provide us with some sort of statement as to your relation (or lack thereof) to gurobi software and to Gurobi Optimization, Inc.
Edit: That is weird. I thought I saw this in Arch Discussion, but when I tried to move it, it was already here ![]()
Last edited by ewaller (2014-10-17 19:47:54)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
You install things based on what's available on the build machine. What if you're building in a clean chroot? What if you want to take the package from one of your systems to another? Avoid those "if"s if possible.
OK. I can probably avoid the "if" for the R interface but I am not sure how to avoid it for the Python one.
The thing is they support both python 2.7 and 3.2. I put python2 in depends because their interactive shell is based on it, but python3.2 is not mandatory.
So how should I install the python3 interface? With a seperate package maybe?
In the source array, why "${pkgname}${pkgver}_linux64.tar.gz::file://${pkgname}${pkgver}_linux64.tar.gz" instead of just "${pkgname}${pkgver}_linux64.tar.gz"?
I followed the Non-free packaging guidelines on that.
Thanks for the comments.
Offline
Could you please provide us with some sort of statement as to your relation (or lack thereof) to gurobi software and to Gurobi Optimization, Inc.
Sure. I have no relation whatsoever with Gurobi Optimization Inc., I am just a PhD student using their optimizer. I thought some other people might find a PKGBUILD for it useful.
Do you need more information?
Offline
Nope. It was just the moderator in me checking that this was not advertising. Thanks.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Scimmia wrote:You install things based on what's available on the build machine. What if you're building in a clean chroot? What if you want to take the package from one of your systems to another? Avoid those "if"s if possible.
OK. I can probably avoid the "if" for the R interface but I am not sure how to avoid it for the Python one.
The thing is they support both python 2.7 and 3.2. I put python2 in depends because their interactive shell is based on it, but python3.2 is not mandatory.
So how should I install the python3 interface? With a seperate package maybe?
You would have to either exclude it or add python32 as a makedependency so that you know it's there at build time. I would also check to see if it worked with python 3.4, as that would simplify things quite a bit. Most things written for python 3.2 will work just fine in 3.4.
Scimmia wrote:In the source array, why "${pkgname}${pkgver}_linux64.tar.gz::file://${pkgname}${pkgver}_linux64.tar.gz" instead of just "${pkgname}${pkgver}_linux64.tar.gz"?
I followed the Non-free packaging guidelines on that.
Thanks for the comments.
Ah, I see, it's simply so that it shows differently in the AUR web interface. Eh.
Offline
If you have only dependencies inside the package() function and not in build(), then you can create a split package. Then the --pkg options given to makepkg tell you if the dependency will be required or not.
depends=(python2)
package_gurobi() {
optdepends= (gurobi-python3 gurobi-r)
install
}
package_gurobi-python3() {
depends=(gurobi python3)
python3 setup.py
}
package_gurobi-r() {
depends=(gurobi r)
R SETUP
}Last edited by progandy (2014-10-17 21:44:39)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Online
Neat! I did not know this split package concept.
I updated the PKGBUILD on the AUR.
I took into account your feedbacks, could you check it?
I would also check to see if it worked with python 3.4, as that would simplify things quite a bit. Most things written for python 3.2 will work just fine in 3.4.
I tried some of the examples provided with the software. Unfortunately, they do not work with python 3.4, only 3.2.
Also, Gurobi's archive comes with some statically-linked libs (libgurobi_g++4.1.a and libgurobi_g++4.2.a).
Given that makepkg in its default configuration removes these .a files, should I override this setting in the PKGBUILD so that does not happen?
Offline