Merge pull request #1001 from rafalste/multiarch-packages
Add multi-arch package build support
This commit is contained in:
commit
8207d5d2b8
13
tools/pckgen
13
tools/pckgen
@ -68,6 +68,7 @@ print_help() {
|
|||||||
echo " dsc generate DSC (source DEB) package"
|
echo " dsc generate DSC (source DEB) package"
|
||||||
echo
|
echo
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
|
echo " -a, --arch <ARCH> target platform architecture for packages"
|
||||||
echo " -o, --output-dir <DIR> put all created files in the given directory;"
|
echo " -o, --output-dir <DIR> put all created files in the given directory;"
|
||||||
echo " default: 'SOURCES_PATH/packages/'"
|
echo " default: 'SOURCES_PATH/packages/'"
|
||||||
echo " -d, --debug create all debug files and packages as well"
|
echo " -d, --debug create all debug files and packages as well"
|
||||||
@ -366,7 +367,7 @@ generate_rpm() {
|
|||||||
|
|
||||||
if [ ! "$GENERATE_SRPM" ] && [ "$GENERATE_RPM" ]; then
|
if [ ! "$GENERATE_SRPM" ] && [ "$GENERATE_RPM" ]; then
|
||||||
echo "--- Building binary RPM packages"
|
echo "--- Building binary RPM packages"
|
||||||
(HOME="$TEMP_DIR"; rpmbuild -bb "$RPM_SPECS_DIR/$CAS_NAME.spec")
|
(HOME="$TEMP_DIR"; rpmbuild -bb --target "$ARCH" "$RPM_SPECS_DIR/$CAS_NAME.spec")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
error "couldn't create RPM packages"
|
error "couldn't create RPM packages"
|
||||||
fi
|
fi
|
||||||
@ -382,7 +383,7 @@ generate_rpm() {
|
|||||||
fi
|
fi
|
||||||
if [ "$GENERATE_SRPM" ] && [ "$GENERATE_RPM" ]; then
|
if [ "$GENERATE_SRPM" ] && [ "$GENERATE_RPM" ]; then
|
||||||
echo "--- Building source and binary RPM packages"
|
echo "--- Building source and binary RPM packages"
|
||||||
(HOME="$TEMP_DIR"; rpmbuild -ba "$RPM_SPECS_DIR/$CAS_NAME.spec")
|
(HOME="$TEMP_DIR"; rpmbuild -ba --target "$ARCH" "$RPM_SPECS_DIR/$CAS_NAME.spec")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
error "couldn't create RPM packages"
|
error "couldn't create RPM packages"
|
||||||
fi
|
fi
|
||||||
@ -407,7 +408,7 @@ generate_deb() {
|
|||||||
|
|
||||||
if [ ! "$GENERATE_DSC" ] && [ "$GENERATE_DEB" ]; then
|
if [ ! "$GENERATE_DSC" ] && [ "$GENERATE_DEB" ]; then
|
||||||
echo "--- Building binary DEB packages"
|
echo "--- Building binary DEB packages"
|
||||||
(cd "$DEB_SOURCES_DIR" && debuild -us -uc -b)
|
(cd "$DEB_SOURCES_DIR" && debuild -us -uc -b --host-type "$ARCH-linux-gnu")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
error "couldn't create DEB packages"
|
error "couldn't create DEB packages"
|
||||||
fi
|
fi
|
||||||
@ -425,7 +426,7 @@ generate_deb() {
|
|||||||
fi
|
fi
|
||||||
if [ "$GENERATE_DSC" ] && [ "$GENERATE_DEB" ]; then
|
if [ "$GENERATE_DSC" ] && [ "$GENERATE_DEB" ]; then
|
||||||
echo "--- Building DEB and DSC (source DEB) packages"
|
echo "--- Building DEB and DSC (source DEB) packages"
|
||||||
(cd "$DEB_SOURCES_DIR" && debuild -us -uc -F)
|
(cd "$DEB_SOURCES_DIR" && debuild -us -uc -F --host-type "$ARCH-linux-gnu")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
error "couldn't create DEB and DSC packages"
|
error "couldn't create DEB and DSC packages"
|
||||||
fi
|
fi
|
||||||
@ -467,6 +468,10 @@ while (( $# )); do
|
|||||||
dsc)
|
dsc)
|
||||||
GENERATE_DSC="generate_dsc"
|
GENERATE_DSC="generate_dsc"
|
||||||
;;
|
;;
|
||||||
|
--arch|-a)
|
||||||
|
ARCH="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--output-dir|-o)
|
--output-dir|-o)
|
||||||
OUTPUT_DIR="$2"
|
OUTPUT_DIR="$2"
|
||||||
if ! dirname $OUTPUT_DIR &>/dev/null; then
|
if ! dirname $OUTPUT_DIR &>/dev/null; then
|
||||||
|
@ -8,7 +8,7 @@ open-cas-linux (20.03.3.0303-1) trusty; urgency=medium
|
|||||||
|
|
||||||
* Update dependencies
|
* Update dependencies
|
||||||
|
|
||||||
-- Michal Mielewczyk <michal.mielewczyk@intel.com> Mon, 22 Nov 2021 13:02:30 +0100
|
-- Michal Mielewczyk <michal.mielewczyk@intel.com> Mon, 22 Nov 2021 13:02:30 +0100
|
||||||
|
|
||||||
open-cas-linux (20.03.3.0303-1) trusty; urgency=medium
|
open-cas-linux (20.03.3.0303-1) trusty; urgency=medium
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Homepage: <CAS_HOMEPAGE>
|
|||||||
Vcs-Git: <CAS_GIT>
|
Vcs-Git: <CAS_GIT>
|
||||||
|
|
||||||
Package: <CAS_NAME>
|
Package: <CAS_NAME>
|
||||||
Architecture: amd64
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, python3, python3-packaging, python3-yaml,
|
Depends: ${shlibs:Depends}, ${misc:Depends}, python3, python3-packaging, python3-yaml,
|
||||||
<CAS_NAME>-modules (= <CAS_VERSION>-1)
|
<CAS_NAME>-modules (= <CAS_VERSION>-1)
|
||||||
Description: Open Cache Acceleration Software
|
Description: Open Cache Acceleration Software
|
||||||
@ -20,7 +20,7 @@ Description: Open Cache Acceleration Software
|
|||||||
running cache instances (no kernel modules).
|
running cache instances (no kernel modules).
|
||||||
|
|
||||||
Package: <CAS_NAME>-modules
|
Package: <CAS_NAME>-modules
|
||||||
Architecture: amd64
|
Architecture: any
|
||||||
Depends: ${misc:Depends}, debhelper (>= 9), dkms
|
Depends: ${misc:Depends}, debhelper (>= 9), dkms
|
||||||
Description: Open Cache Acceleration Software kernel modules (${kver})
|
Description: Open Cache Acceleration Software kernel modules (${kver})
|
||||||
Open Cache Acceleration Software (Open CAS) is an open source project
|
Open Cache Acceleration Software (Open CAS) is an open source project
|
||||||
|
Loading…
Reference in New Issue
Block a user