leborchuk commented on code in PR #1609:
URL: https://github.com/apache/cloudberry/pull/1609#discussion_r2930138736


##########
devops/build/packaging/deb/ubuntu22.04/rules:
##########
@@ -19,7 +19,22 @@ include /usr/share/dpkg/default.mk
        dh $@ --parallel
 
 gpinstall:
-       make install DESTDIR=${DEBIAN_DESTINATION} prefix=
+       # If the build staging directory is empty, copy from the pre-installed 
location.
+       # In CI, BUILD_DESTINATION already points here so it will be populated.
+       # For local manual packaging, copy from the installed Cloudberry path.
+       @mkdir -p ${DEBIAN_DESTINATION}
+       @if [ -z "$$(ls -A ${DEBIAN_DESTINATION} 2>/dev/null)" ]; then \
+               echo "Copying pre-built binaries from ${CBDB_BIN_PATH} to 
${DEBIAN_DESTINATION}..."; \
+               cp -a ${CBDB_BIN_PATH}/* ${DEBIAN_DESTINATION}/; \
+       else \
+               echo "Build staging directory already populated, skipping 
copy."; \
+       fi
+       # Copy Apache compliance files into the build staging directory
+       cp -a LICENSE NOTICE DISCLAIMER ${DEBIAN_DESTINATION}/
+       cp -a licenses ${DEBIAN_DESTINATION}/
+       # Create debian/copyright for Debian policy compliance
+       mkdir -p $(shell pwd)/debian
+       cat LICENSE NOTICE > $(shell pwd)/debian/copyright

Review Comment:
   Got it! We have a script named build-cloudberry.sh but actually do `make` && 
`make install` inside it. So there is no need to install binaries once again



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to