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

Add pkg-config support #47

Closed
wants to merge 3 commits into from

Conversation

lkundrak
Copy link
Contributor

Hii,

plese review this and consider merging it. It will make it simpler for us to determine the location where to put the NetworkManger pppd plugin.

Thank you!
Lubo

@lkundrak lkundrak mentioned this pull request Oct 31, 2015
@paulusmack
Copy link
Collaborator

This has several problems in the "Determine some more variables at configure time" commit.

  • In pppd/plugins/pppoatm/Makefile.linux you have changed the mode for the plugin from 4550 to 455, which is wrong. Arguably the 4000 (setuid) bit doesn't really mean anything for a plugin, but if you want to change that, it's a separate change that should be a separate patch, and then the mode should be 555 not 455.
  • In pppd/plugins/pppol2tp/Makefile.linux you change the symbol for the plugin directory from LIBDIR to PLUGINDIR but then still install the plugin to LIBDIR.
  • In pppd/plugins/rp-pppoe/Makefile.linux you set PPPDVERSION to the version number but then use $(VERSION) in defining PLUGINDIR.

Namely LIBDIR, INCDIR and VERSION. Prefix paths with INSTROOT when
installing. This is not very useful as is, but will make substituting
the variables onto the pkg-config .pc file at configure time possible.

Moreover, it will be easier for distributors which use multilib to override
LIBDIR on 64-bit systems.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Rename ${DESTDIR} to ${prefix} and only let make expand it. This is
basically analogous to what autotools do. It will be useful for generating a
proper pkg-config file (where the prefix is called ${prefix} and is expected to
be unexpanded).

DESTDIR name was used inconsistently with what the rest of the world
does (where it modifies the installation prefix, sort of what our
${INSTROOT} does).

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
This makes it convenient for external plugins to determine path to install into.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
@lkundrak
Copy link
Contributor Author

lkundrak commented Jan 9, 2017

Thanks. Addressed the review.

I've also added one more change. That one is required so that the .pc file is "relocatable" -- the prefix is expanded later and thus can be overridden. That is useful when whoever consumes the file chooses an alternate installation prefix after the build is done (e.g. what autotools' "make distcheck" does when checking sanity of the installation).

@Neustradamus
Copy link
Member

@lkundrak: Can you rebase your PR?

@enaess
Copy link
Contributor

enaess commented Mar 6, 2021

I'd also vouch for this as maintenance of network-manager-sstp and sstp-client would be easier.

@Neustradamus
Copy link
Member

@enaess: I think the best solution, badly, is to create a new PR... :/

@enaess
Copy link
Contributor

enaess commented Mar 15, 2021

@Neustradamus I'll have a look

enaess added a commit to enaess/ppp that referenced this pull request Apr 15, 2021
This adds pppd.pc into $(INSTROOT)/$(LIBDIR)/pkgconfig. On some distributions
this would be /lib/pkgconfig, or /usr/lib/pkgconfig, but other distributions
may consider specifying --libdir=/usr/lib/x86_x64-linux-gnu/ and the pkgconfig
directory would be under that. Allowing --libdir to be specified at configure
time fixes ppp-project#223, providing pkgconfig support fixes ppp-project#19 and allows third party
packages pickup the plugin directory.

Manually cherry picking parts of two commits by @lkundrak from:
    https://github.com/NetworkManager/ppp/tree/lr/pkgconfig

Mainly, the difference between the original commit is not to replace DESTDIR
with "prefix". Leave DESTDIR alone, and add needed pkgconfig (pppd.pc.in)
as a part of the linux distribution (previously in pppd/plugin directory).

This fixes GitHub issues: ppp-project#19 ppp-project#47 and ppp-project#223

Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
paulusmack pushed a commit that referenced this pull request Apr 24, 2021
This adds pppd.pc into $(INSTROOT)/$(LIBDIR)/pkgconfig. On some distributions
this would be /lib/pkgconfig, or /usr/lib/pkgconfig, but other distributions
may consider specifying --libdir=/usr/lib/x86_x64-linux-gnu/ and the pkgconfig
directory would be under that. Allowing --libdir to be specified at configure
time fixes #223, providing pkgconfig support fixes #19 and allows third party
packages pickup the plugin directory.

Manually cherry picking parts of two commits by @lkundrak from:
    https://github.com/NetworkManager/ppp/tree/lr/pkgconfig

Mainly, the difference between the original commit is not to replace DESTDIR
with "prefix". Leave DESTDIR alone, and add needed pkgconfig (pppd.pc.in)
as a part of the linux distribution (previously in pppd/plugin directory).

This fixes GitHub issues: #19 #47 and #223

Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
@vincele
Copy link

vincele commented Apr 24, 2021

Hello, should this PR be closed now that pkg-config has been merged ? c.f. #270

@enaess
Copy link
Contributor

enaess commented Apr 24, 2021

@lkundrak @paulusmack could you please close this PR?

@paulusmack paulusmack closed this Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants