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
Added recipe for libyubikey #929
Conversation
a028307
to
b29acbc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start, thanks!
Minor changes are needed, however, to add support for building for secondary architectures, and to fix a few minor errors.
(I did not test the resulting recipe yet but will do so asap.)
CHECKSUM_SHA256="04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401" | ||
REVISION="1" | ||
LICENSE="BSD (2-clause)" | ||
COPYRIGHT="Yubico AB" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please change the order of these lines to:
SUMMARY="Low level C SDK for the Yubico YubiKey authentication device"
DESCRIPTION="This package make up the low-level C software development kit for the \
Yubico YubiKey authentication device."
HOMEPAGE="https://developers.yubico.com/yubico-c/"
COPYRIGHT="2008-2015 Yubico AB"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://developers.yubico.com/yubico-c/Releases/libyubikey-$portVersion.tar.gz"
CHECKSUM_SHA256="04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401"
(Minor changes to COPYRIGHT and re-wrapped DESCRIPTION.)
(See the HaikuPorter Guidelines for more info)
cmd:modhex = $portVersion | ||
cmd:ykparse = $portVersion | ||
cmd:ykgenerate = $portVersion | ||
lib:libyubikey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be:
PROVIDES="
libyubikey$secondaryArchSuffix = $portVersion
cmd:modhex$secondaryArchSuffix = $portVersion
cmd:ykparse$secondaryArchSuffix = $portVersion
cmd:ykgenerate$secondaryArchSuffix = $portVersion
lib:libyubikey$secondaryArchSuffix = 0.1.7
"
|
||
PROVIDES_devel=" | ||
libyubikey_devel = $portVersion | ||
devel:libyubikey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be:
PROVIDES_devel="
libyubikey${secondaryArchSuffix}_devel = $portVersion
devel:libyubikey$secondaryArchSuffix = 0.1.7
"
REQUIRES_devel="
libyubikey$secondaryArchSuffix == $portVersion base
"
LICENSE="BSD (2-clause)" | ||
COPYRIGHT="Yubico AB" | ||
|
||
ARCHITECTURES="x86_gcc2 x86" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be:
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||
REQUIRES=" | ||
haiku >= $haikuVersion | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REQUIRES should go right after PROVIDES, and should be:
REQUIRES="
haiku$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libusb$secondaryArchSuffix
"
" | ||
|
||
BUILD_REQUIRES=" | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libusb$secondaryArchSuffix
"
haiku_devel >= $haikuVersion | ||
cmd:gcc | ||
cmd:make | ||
cmd:awk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be:
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:make
"
make install | ||
|
||
prepareInstalledDevelLibs libyubikey | ||
packageEntries devel $developDir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please change this to:
rm $libDir/libyubikey.la
prepareInstalledDevelLib libyubikey
fixPkgconfig
packageEntries devel \
$developDir
(I'm not sure yet for the rm $libDir/libyubikey.la
because I don't know if that file is being generated.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that removing make install
is right since it gives me an error about being unable to stat some files.
BUILD() | ||
{ | ||
runConfigure ./configure --disable-dependency-tracking | ||
make $jobArgs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use tabs (instead of white spaces)?
7818976
to
ca8c311
Compare
Hello, thanks for your feedback. I have made the requested changes and updated the commit, bar the removal of PS. Sorry if I messed something up with GitHub's review system. I'm not entirely sure, but I think I did. I'm still trying to get the hang of it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your update! Your recipe is almost perfect!
You just missed a couple of cosmetic edits which I had not emphasized in my first review.
I'm also adding something I forgot, to remove the man page on secondary arch builds.
COPYRIGHT="2008-2015 Yubico AB" | ||
LICENSE="BSD (2-clause)" | ||
REVISION="1" | ||
SOURCE_URI="https://developers.yubico.com/yubico-c/Releases/libyubikey-1.13.tar.gz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change SOURCE_URI to:
SOURCE_URI="https://developers.yubico.com/yubico-c/Releases/libyubikey-$portVersion.tar.gz"
(I just replaced "1.13" by "$portVersion")
cmd:ykgenerate$secondaryArchSuffix = $portVersion | ||
lib:libyubikey$secondaryArchSuffix = 0.1.7 | ||
" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the blank line between PROVIDES and REQUIRES.
libyubikey${secondaryArchSuffix}_devel = $portVersion | ||
devel:libyubikey$secondaryArchSuffix = 0.1.7 | ||
" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the blank line between PROVIDES_devel and REQUIRES_devel.
@@ -0,0 +1,67 @@ | |||
SUMMARY="Low level C SDK for the Yubico YubiKey authentication device" | |||
DESCRIPTION="This package make up the low-level C software development kit for the Yubico YubiKey authentication device." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, after all, I don't like the "This package make the" (taken from upstream) because it has a grammar error (missing "s" in "makes"). Shall we drop that part? Here's what I would use:
DESCRIPTION="Low-level C software development kit for the Yubico YubiKey \
authentication device."
(BTW, we need to split the line otherwise it would be > 80 chars.)
haiku${secondaryArchSuffix}_devel | ||
lib:libcurl$secondaryArchSuffix | ||
lib:libusb$secondaryArchSuffix | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a tab before the closing double-quotes.
prepareInstalledDevelLibs libyubikey | ||
fixPkgconfig | ||
packageEntries devel \ | ||
$developDir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a few extra changes to INSTALL?
This is the layout we like to have:
INSTALL()
{
make install
rm $libDir/libyubikey.la
prepareInstalledDevelLib libyubikey
fixPkgconfig
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $manDir
fi
packageEntries devel \
$developDir
}
The main change here is that we remove $manDir if we are building for a secondary arch.
Notice that I replaced prepareInstalledDevelLibs by prepareInstalledDevelLib.
This is not required but it is welcome, since we only have one lib here.
BTW, in my previous review I should have mentioned that I was not willing to drop the "make install". Actually, we cannot control the number of lines GitHub puts in the context, so I should have copied the whole INSTALL ;-)
Hopefully you took the right decision, keeping it ;-)
ca8c311
to
4d7dccc
Compare
Hello again and again thanks for your time. I made the changes you specified and I hope everything is in order this time. |
4d7dccc
to
8958353
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello again and again thanks for your time. I made the changes you specified and I hope everything is in order this time.
You are welcome!
I think we're almost done: 2 cosmetic edits remaining.
(I forgot to report an ampty line and you forgot to remove a tab. ;-)
lib:libcurl$secondaryArchSuffix | ||
lib:libusb$secondaryArchSuffix | ||
" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the blank line between BUILD_REQUIRES and BUILD_PREREQUIRES.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, just to be sure, there should be no blank lines between variable definitions, right? But are they ok between the BUILD, INSTALL and TEST functions?
Edit: now I see that we've separated them in blocks of 2, separated by blank lines. I think I get it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I had missed your message.
And I just realized I forgot to mention our HaikuPorter Guidelines!
https://github.com/haikuports/haikuports/wiki/HaikuPorter-Guidelines#ordering
BTW, if you would like to work on other recipes, we have a lot of these Create a recipe for ... tasks ;-)
fi | ||
|
||
packageEntries devel \ | ||
$developDir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need 2 tabs in line 67.
8958353
to
f4b19d1
Compare
I updated the commit with the requested cosmetic changes. |
Thanks @xdizzaster for your great work! |
It means it has been merged ;-) |
I've commented on the commit 58be167 |
OK , thanks @korli . I'll fix that. |
Oops, I just noticed there were 2 other errors. So I guess we really need to bump REVISION. |
Hmm, libyubikey is currently using libusb-0.1.so from libusb_compat.
by
and
by
Thanks! |
Fixed. |
Added the recipe for the Yubico YubiKey authentication device library and associated tools.