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

make cpack generate macos pkg files #1213

Merged
merged 4 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ build:win32:
paths:
- build/lokinet-*.exe

build:macos:
tags:
- osx
stage: build
script:
- IS_NOTIFICATION=1 STATIC_LINK=ON DOWNLOAD_SODIUM=ON make mac
artifacts:
paths:
- build/*.pkg


# needs libuv and libcurl
#build:freebsd:
# tags:
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,12 @@ windows-release: windows-release-configure

windows: windows-release

mac-release: release-configure
$(MAKE) -C '$(BUILD_ROOT)'
cd '$(BUILD_ROOT)' && cpack -D CPACK_MONOLITHIC_INSTALL=1 -G productbuild ..
mac-release-configure: $(LIBUV_PREFIX)
mkdir -p '$(BUILD_ROOT)'
$(CONFIG_CMD) -DCMAKE_BUILD_TYPE=Release -DRELEASE_MOTTO="$(shell cat motto.txt)" -DCMAKE_ASM_FLAGS='$(ASFLAGS)' -DCMAKE_C_FLAGS='$(CFLAGS)' -DCMAKE_CXX_FLAGS='$(CXXFLAGS)' -DLIBUV_ROOT='$(LIBUV_PREFIX)' -DWITH_TESTS=OFF '$(REPO)'

mac-release: mac-release-configure
$(MAKE) -C '$(BUILD_ROOT)' package

mac: mac-release

Expand Down
5 changes: 3 additions & 2 deletions cmake/installer.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
set(CPACK_PACKAGE_NAME "lokinet")
set(CPACK_PACKAGE_VENDOR "lokinet.org")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "lokinet - onion router thingydoo")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://lokinet.org/")
set(CPACK_PACKAGE_DESCRIPTION "lokinet - IP packet onion router")
set(CPACK_PACKAGE_README_FILE "${CMAKE_SOURCE_DIR}/readme.md")
set(CPACK_PACKAGE_VERSION_MAJOR "${LLARP_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${LLARP_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${LLARP_VERSION_PATCH}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "lokinet")

if(WIN32)
include(cmake/win32_installer_deps.cmake)
Expand Down
3 changes: 2 additions & 1 deletion cmake/macos_installer_deps.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# macos specific cpack stuff goes here
set(CPACK_PRODUCTBUILD_RESOURCES_DIR ${CMAKE_SOURCE_DIR}/osx-setup/resources)
set(CPACK_GENERATOR "productbuild")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local")
7 changes: 3 additions & 4 deletions daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ else()
add_log_tag(${EXE})
add_log_tag(${CTL})

install(TARGETS ${EXE} RUNTIME DESTINATION bin)
install(TARGETS ${CTL} RUNTIME DESTINATION bin)
install(TARGETS ${EXE} RUNTIME DESTINATION bin COMPONENT lokinet)
if(WIN32)
install(PROGRAMS ${CMAKE_SOURCE_DIR}/lokinet-bootstrap.ps1 DESTINATION bin)
install(PROGRAMS ${CMAKE_SOURCE_DIR}/lokinet-bootstrap.ps1 DESTINATION bin COMPONENT lokinet)
else()
install(PROGRAMS ${CMAKE_SOURCE_DIR}/lokinet-bootstrap DESTINATION bin)
install(PROGRAMS ${CMAKE_SOURCE_DIR}/lokinet-bootstrap DESTINATION bin COMPONENT lokinet)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
Expand Down
29 changes: 0 additions & 29 deletions osx-setup/distribution.xml

This file was deleted.

19 changes: 0 additions & 19 deletions osx-setup/make-release.sh

This file was deleted.

3 changes: 0 additions & 3 deletions osx-setup/resources/conclusion.html

This file was deleted.

13 changes: 0 additions & 13 deletions osx-setup/resources/license.html

This file was deleted.

7 changes: 0 additions & 7 deletions osx-setup/resources/welcome.html

This file was deleted.

29 changes: 0 additions & 29 deletions osx-setup/scripts/postinstall

This file was deleted.

8 changes: 0 additions & 8 deletions osx-setup/scripts/preinstall

This file was deleted.