add openssl to mac build
since the openssl bundled with mac is old and deprecated we build our own instead
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PACKAGE=yubico-piv-tool
|
PACKAGE=yubico-piv-tool
|
||||||
|
OPENSSLVERSION=1.0.1p
|
||||||
|
|
||||||
all: usage mac
|
all: usage mac
|
||||||
|
|
||||||
@@ -42,13 +43,30 @@ usage:
|
|||||||
doit:
|
doit:
|
||||||
rm -rf tmp && mkdir tmp && cd tmp && \
|
rm -rf tmp && mkdir tmp && cd tmp && \
|
||||||
mkdir -p root/licenses && \
|
mkdir -p root/licenses && \
|
||||||
|
cp ../openssl-$(OPENSSLVERSION).tar.gz . || \
|
||||||
|
curl -L -O "https://www.openssl.org/source/openssl-$(OPENSSLVERSION).tar.gz" && \
|
||||||
|
tar xfz openssl-$(OPENSSLVERSION).tar.gz && \
|
||||||
|
cd openssl-$(OPENSSLVERSION) && \
|
||||||
|
./Configure darwin64-x86_64-cc shared no-ssl2 no-ssl3 no-engines --prefix=$(PWD)/tmp/root && \
|
||||||
|
make all install_sw && \
|
||||||
|
cp LICENSE $(PWD)/tmp$(ARCH)/root/licenses/openssl.txt && \
|
||||||
|
rm -rf $(PWD)/tmp/root/ssl/ && \
|
||||||
|
rm -rf $(PWD)/tmp/root/bin/ && \
|
||||||
|
rm -rf $(PWD)/tmp/root/lib/engines/ && \
|
||||||
|
rm -rf $(PWD)/tmp/root/lib/libssl* && \
|
||||||
|
rm $(PWD)/tmp/root/lib/pkgconfig/libssl.pc && \
|
||||||
|
rm $(PWD)/tmp/root/lib/pkgconfig/openssl.pc && \
|
||||||
|
cd .. && \
|
||||||
cp ../$(PACKAGE)-$(VERSION).tar.gz . && \
|
cp ../$(PACKAGE)-$(VERSION).tar.gz . && \
|
||||||
tar xfz $(PACKAGE)-$(VERSION).tar.gz && \
|
tar xfz $(PACKAGE)-$(VERSION).tar.gz && \
|
||||||
cd $(PACKAGE)-$(VERSION)/ && \
|
cd $(PACKAGE)-$(VERSION)/ && \
|
||||||
./configure --prefix=$(PWD)/tmp/root && \
|
PKG_CONFIG_PATH=$(PWD)/tmp/root/lib/pkgconfig ./configure --prefix=$(PWD)/tmp/root && \
|
||||||
make install check && \
|
make install check && \
|
||||||
install_name_tool -id @executable_path/../lib/libykpiv.dylib $(PWD)/tmp/root/lib/libykpiv.dylib && \
|
chmod u+w $(PWD)/tmp/root/lib/libcrypto.1.0.0.dylib && \
|
||||||
|
install_name_tool -id @executable_path/../lib/libcrypto.1.0.0.dylib $(PWD)/tmp/root/lib/libcrypto.1.0.0.dylib && \
|
||||||
install_name_tool -id @executable_path/../lib/libykpiv.1.dylib $(PWD)/tmp/root/lib/libykpiv.1.dylib && \
|
install_name_tool -id @executable_path/../lib/libykpiv.1.dylib $(PWD)/tmp/root/lib/libykpiv.1.dylib && \
|
||||||
|
install_name_tool -change $(PWD)/tmp/root/lib/libcrypto.1.0.0.dylib @executable_path/../lib/libcrypto.1.0.0.dylib $(PWD)/tmp/root/lib/libykpiv.1.dylib && \
|
||||||
|
install_name_tool -change $(PWD)/tmp/root/lib/libcrypto.1.0.0.dylib @executable_path/../lib/libcrypto.1.0.0.dylib $(PWD)/tmp/root/bin/yubico-piv-tool && \
|
||||||
install_name_tool -change $(PWD)/tmp/root/lib/libykpiv.1.dylib @executable_path/../lib/libykpiv.1.dylib $(PWD)/tmp/root/bin/yubico-piv-tool ; \
|
install_name_tool -change $(PWD)/tmp/root/lib/libykpiv.1.dylib @executable_path/../lib/libykpiv.1.dylib $(PWD)/tmp/root/bin/yubico-piv-tool ; \
|
||||||
if otool -L $(PWD)/tmp/root/lib/*.dylib $(PWD)/tmp/root/bin/* | grep '$(PWD)/tmp/root' | grep -q compatibility; then \
|
if otool -L $(PWD)/tmp/root/lib/*.dylib $(PWD)/tmp/root/bin/* | grep '$(PWD)/tmp/root' | grep -q compatibility; then \
|
||||||
echo "something is incorrectly linked!"; \
|
echo "something is incorrectly linked!"; \
|
||||||
|
|||||||
Reference in New Issue
Block a user