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

build: resurrect make deb #1082

Merged
merged 6 commits into from
Sep 29, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ find_package(Boost 1.50 REQUIRED COMPONENTS
message(STATUS "Boost version: ${Boost_VERSION}")

# Install paths
set(FLUX_CMD_DIR "${CMAKE_INSTALL_PREFIX}/libexec/cmd")
set(FLUX_CMD_DIR "${CMAKE_INSTALL_LIBEXECDIR}/flux/cmd")
set(FLUX_LIB_DIR "${CMAKE_INSTALL_LIBDIR}/flux")
set(FLUX_MOD_DIR "${FLUX_LIB_DIR}/modules")
set(FLUX_SHELL_PLUGIN_DIR "${FLUX_LIB_DIR}/shell/plugins")
Expand Down Expand Up @@ -197,15 +197,25 @@ add_custom_target(check
)
add_custom_target(installcheck
COMMAND env FLUX_SCHED_TEST_INSTALLED=1 ${CMAKE_CTEST_COMMAND} ${CTEST_COMMON_FLAGS})
add_custom_target(dist
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND echo ${FLUX_SCHED_VER} > flux-sched.ver
COMMAND git archive --format=tar.gz
--prefix=flux-sched-${FLUX_SCHED_VER}/
--add-file=flux-sched.ver
--output=${CMAKE_BINARY_DIR}/flux-sched-${FLUX_SCHED_VER}.tar.gz
HEAD .
COMMAND rm flux-sched.ver
COMMENT "Generated flux-sched-${FLUX_SCHED_VER}.tar.gz"
)
# run installcheck, if it passes then write out version information and pack up
# a tarball with the result
add_custom_target(distcheck
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target check
COMMAND git archive --format=tar.gz
--add-virtual-file=flux-sched.ver:${FLUX_SCHED_VER}
--prefix=flux-sched-${FLUX_SCHED_VER}/
--output=${CMAKE_BINARY_DIR}/flux-sched-${FLUX_SCHED_VER}.tar.gz
HEAD .
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target dist
)
add_custom_target(deb
COMMAND ${CMAKE_SOURCE_DIR}/scripts/debbuild.sh ${CMAKE_SOURCE_DIR}
)
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Priority: optional
Maintainer: Mark A. Grondona <[email protected]>
Standards-Version: 4.1.2
Build-Depends:
cmake (>= 3.18),
debhelper (>= 10),
flux-core (>= 0.49.0),
libhwloc-dev,
Expand Down
6 changes: 5 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
dh $@
dh $@ --buildsystem=cmake

override_dh_autoreconf:
@echo not running autogen.sh on dist product

override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_install:
dh_auto_install
find . -name '*.la' -delete
19 changes: 19 additions & 0 deletions src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,22 @@ install(DIRECTORY fluxion
DESTINATION "${PYTHON_INSTALL_SITELIB}"
FILES_MATCHING PATTERN "*.py")

set(PYNAME "python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
set(PYDIR "${CMAKE_INSTALL_FULL_LIBDIR}/flux/${PYNAME}")
set(LINKTARGET "${PYTHON_INSTALL_SITELIB}/fluxion")

INSTALL(CODE "\
execute_process( \
COMMAND \
mkdir -p \$ENV{DESTDIR}/${PYDIR} \
)
execute_process( \
COMMAND \
rm -f \$ENV{DESTDIR}/${PYDIR}/fluxion \
)
MESSAGE (STATUS \
\"linking ${PYDIR}/fluxion -> ${PYTHON_INSTALL_SITELIB}/fluxion\")
execute_process( \
COMMAND \
ln -s ${LINKTARGET} \$ENV{DESTDIR}/${PYDIR}/fluxion \
)")
Loading