{"action":"created","issue":{"url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1789","repository_url":"https://api.github.com/repos/Alexpux/MINGW-packages","labels_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1789/labels{/name}","comments_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1789/comments","events_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1789/events","html_url":"https://github.com/Alexpux/MINGW-packages/issues/1789","id":181284655,"number":1789,"title":"Setting environment variables from PKGBUILD","user":{"login":"peterbud","id":7863452,"avatar_url":"https://avatars.githubusercontent.com/u/7863452?v=3","gravatar_id":"","url":"https://api.github.com/users/peterbud","html_url":"https://github.com/peterbud","followers_url":"https://api.github.com/users/peterbud/followers","following_url":"https://api.github.com/users/peterbud/following{/other_user}","gists_url":"https://api.github.com/users/peterbud/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbud/subscriptions","organizations_url":"https://api.github.com/users/peterbud/orgs","repos_url":"https://api.github.com/users/peterbud/repos","events_url":"https://api.github.com/users/peterbud/events{/privacy}","received_events_url":"https://api.github.com/users/peterbud/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-05T22:45:39Z","updated_at":"2016-10-06T19:45:17Z","closed_at":"2016-10-06T19:45:17Z","body":"Apologies for the basic question: what is the standard way to add an enviroment variable during a package installation in PKGBUILD file? One of the packages I'd like to port is using two env variables in the code, and if they are not set it does not work. If I set them in my .bash_profile it works nicely."},"comment":{"url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/comments/252068265","html_url":"https://github.com/Alexpux/MINGW-packages/issues/1789#issuecomment-252068265","issue_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1789","id":252068265,"user":{"login":"peterbud","id":7863452,"avatar_url":"https://avatars.githubusercontent.com/u/7863452?v=3","gravatar_id":"","url":"https://api.github.com/users/peterbud","html_url":"https://github.com/peterbud","followers_url":"https://api.github.com/users/peterbud/followers","following_url":"https://api.github.com/users/peterbud/following{/other_user}","gists_url":"https://api.github.com/users/peterbud/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbud/subscriptions","organizations_url":"https://api.github.com/users/peterbud/orgs","repos_url":"https://api.github.com/users/peterbud/repos","events_url":"https://api.github.com/users/peterbud/events{/privacy}","received_events_url":"https://api.github.com/users/peterbud/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T19:45:17Z","updated_at":"2016-10-06T19:45:17Z","body":"Hi David and Ray - thanks for the answer, I was looking for the /etc/profile.d solution.\r\n\r\nAnd to answer for your question, I'm trying to port the [libgphoto2 library](https://github.com/gphoto/libgphoto2), and it usese two env variables: CAMLIBS and IOLIBS to locate the place where the libraries are.\r\n\r\nI'm thinking to add something like this then:\r\n`# install profile script `\r\n`mkdir -p \"${pkgdir}${MINGW_PREFIX}\"/etc/profile.d`\r\n`echo \"export CAMLIBS=${MINGW_PREFIX}/lib//libgphoto2/2.5.10\" > \"${pkgdir}${MINGW_PREFIX}\"/etc/profile.d/libgphoto2.sh`\r\n"}}
{"actor":{"display_login":"peterbud"}}