Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting an install prefix #63

Merged
merged 1 commit into from
Jan 26, 2016
Merged

Allow setting an install prefix #63

merged 1 commit into from
Jan 26, 2016

Conversation

phw
Copy link
Contributor

@phw phw commented Jan 26, 2016

With this patch one can specify an install prefix for installation like so:

./install.sh /usr/local

I have kept the default as /usr, but I actually think it should be changed to /usr/local as this is the common location for side installing software (and /usr is reserved for distribution packages).

This would also make it easier to build source packages as one can specify a completely different package root (e.g. ${pkgdir} inside a PKGBUILD). But this is currently prevented by the root check. Not sure, I personally would just remove it. Or we only enable the check when the prefix is /usr/....

@gnunn1
Copy link
Owner

gnunn1 commented Jan 26, 2016

Thanks for this. I use install.sh at development time so I can update all of the resources when I make a change and need to push it to my local file system to test it. Since I was managing packages as well, I used /usr to override the existing files there. There is another script in data/pkg that I use to create the build package, at some point I should look at merging the two together as with your change it's pretty much doing the same thing now.

gnunn1 added a commit that referenced this pull request Jan 26, 2016
Allow setting an install prefix
@gnunn1 gnunn1 merged commit 15d8369 into gnunn1:master Jan 26, 2016
@phw
Copy link
Contributor Author

phw commented Jan 26, 2016

Thanks for merging. Now I see the createReleaseArchive.sh. Looks like this could just call install.sh with a proper path now for most of the work :)

@dsboger-zz
Copy link
Contributor

./install.sh $pkgdir/usr works well for AUR, except I have to manually remove gschemas.compiled, which is a system-wide file.

@phw
Copy link
Contributor Author

phw commented Jan 26, 2016

./install.sh $pkgdir/usr works well for AUR, except I have to manually remove gschemas.compiled, which is a system-wide file.

Yes, in my own apps I solve this by making gschema compilation configurable via a flag. That way the install can compile the schema but when building packages this can be disabled. That is something to consider when expanding the install script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants