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

building pkgconfig files still not right #333

Closed
loveshack opened this issue May 2, 2019 · 3 comments
Closed

building pkgconfig files still not right #333

loveshack opened this issue May 2, 2019 · 3 comments
Assignees
Milestone

Comments

@loveshack
Copy link

I still can't get the .pc files made correctly, but perhaps I'm doing it wrongly because I don't understand the directory variables and how to use them when building packages. I always get prefix= in the .pc file set to the staging area used by make install because DESTDIR and PREFIX aren't separate as in the autotools convention. (No great problem, of course, as I just sed them.)

[Apologies if this is a patronizing explanation in case it's not clear!] For packaging it's convenient to be able to set the variables such that PREFIX is /usr (typically) and DESTDIR is the staging area into which the install is actually done (%buildroot for RPM builds, and a sub-directory for dpkg). Then paths in the installed files are under PREFIX, and DESTDIR shouldn't appear in them (which rpm checks). Is it possible to get that with the current make system somehow that I've missed?

@hfp hfp self-assigned this May 2, 2019
@hfp
Copy link
Collaborator

hfp commented May 2, 2019

No worries, I will bring a follow-on release shortly and thereby making another attempt to fix this problem.

hfp added a commit that referenced this issue May 3, 2019
hfp added a commit that referenced this issue May 3, 2019
@hfp
Copy link
Collaborator

hfp commented May 3, 2019

I think what you want is to get the pkg-file's prefix set to PREFIX/DESTDIR even when not running make install. At this point, pkg's prefix is set to the staging folder but when you do make PREFIX=/path/to/prefix install, it is properly set to the given PREFIX/DESTDIR. This would tell me, that when you build the package, make install is not invoked.

@hfp hfp added this to the 1.12 milestone May 9, 2019
@hfp
Copy link
Collaborator

hfp commented May 9, 2019

This is now hopefully fixed and targeted for v1.12. There is an updated documentation here for DESTDIR, PREFIX, and DESTDIR vs. PREFIX. In addition, I have implemented PPKGDIR to set the location of the .pc files relative to the DESTDIR/PREFIX. For FreeBSD, PPKGDIR defaults to libdata/pkgconfig otherwise it defaults to lib as it was/is.

@hfp hfp closed this as completed May 9, 2019
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

No branches or pull requests

2 participants