97 lines
3.1 KiB
Makefile
Executable File
97 lines
3.1 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
export DH_VERBOSE=1
|
|
|
|
export CONFIG_PREFIX=/usr
|
|
export PYDIST=$(shell python3 -c "import site; print(site.getsitepackages()[2])")
|
|
|
|
ARCH = $(shell uname -m)
|
|
ifeq ($(ARCH), x86_64)
|
|
TARGET_ARCH = "core2"
|
|
else ifeq ($(ARCH), aarch64)
|
|
TARGET_ARCH = "native"
|
|
else
|
|
TARGET_ARCH = "native"
|
|
endif
|
|
|
|
|
|
%:
|
|
dh $@ --with quilt
|
|
|
|
override_dh_auto_configure:
|
|
./configure \
|
|
--libdir=/usr/lib/"$(DEB_HOST_MULTIARCH)"/spdk \
|
|
--target-arch=${TARGET_ARCH} \
|
|
--prefix=/usr \
|
|
--disable-examples \
|
|
--disable-tests \
|
|
--disable-unit-tests \
|
|
--without-xnvme \
|
|
--with-vhost \
|
|
--with-virtio \
|
|
--with-vbdev-compress \
|
|
--with-rbd \
|
|
--with-rdma \
|
|
--with-iscsi-initiator \
|
|
--with-uring \
|
|
--with-fuse \
|
|
--with-nvme-cuse \
|
|
--with-raid5f \
|
|
--with-crypto \
|
|
--without-sma \
|
|
--without-dpdk
|
|
|
|
override_dh_auto_build:
|
|
dh_auto_build -- PREFIX=/usr
|
|
make -C $(CURDIR)/cpumask
|
|
|
|
override_dh_auto_install:
|
|
dh_auto_install -- DESTDIR=$(CURDIR)/debian/pxvirt-spdk
|
|
|
|
# delete dpdk
|
|
rm -rf $(CURDIR)/debian/pxvirt-spdk/usr/bin/dpdk*
|
|
rm -rf $(CURDIR)/debian/pxvirt-spdk/usr/lib/dpdk
|
|
rm -rf $(CURDIR)/debian/pxvirt-spdk/usr/share/dpdk
|
|
rm -rf $(CURDIR)/debian/pxvirt-spdk/usr/share/docs/dpdk
|
|
|
|
# delete static
|
|
find $(CURDIR)/debian/pxvirt-spdk/ -name "*.a" -exec rm {} \;
|
|
|
|
# delete libisal-dev libdpdk-dev
|
|
find $(CURDIR)/debian/pxvirt-spdk/usr/include/ -name "rte*" -exec rm {} \;
|
|
find $(CURDIR)/debian/pxvirt-spdk/usr/include/ -name "librte*" -exec rm {} \;
|
|
find $(CURDIR)/debian/pxvirt-spdk/usr/lib/ -name "librte*" -exec rm {} \;
|
|
rm $(CURDIR)/debian/pxvirt-spdk/usr/lib/pkgconfig/libdpdk-libs.pc
|
|
rm $(CURDIR)/debian/pxvirt-spdk/usr/lib/pkgconfig/libdpdk.pc
|
|
rm $(CURDIR)/debian/pxvirt-spdk/usr/lib/pkgconfig/libisal.pc
|
|
rm $(CURDIR)/debian/pxvirt-spdk/usr/lib/pkgconfig/libisal_crypto.pc
|
|
rm $(CURDIR)/debian/pxvirt-spdk/usr/include/isa-l* -rf
|
|
|
|
# install python
|
|
rm -rf $(CURDIR)/debian/pxvirt-spdk/usr/local
|
|
rm -rf $(CURDIR)/debian/python3-spdk/usr/local
|
|
mkdir $(CURDIR)/debian/python3-spdk/$(PYDIST) -p
|
|
cp -r $(CURDIR)/python/spdk $(CURDIR)/debian/python3-spdk/$(PYDIST)
|
|
|
|
# install spdk scripts
|
|
mkdir $(CURDIR)/debian/python3-spdk/usr/share/spdk -p
|
|
cp -r $(CURDIR)/scripts $(CURDIR)/debian/python3-spdk/usr/share/spdk/
|
|
cp -r $(CURDIR)/scripts/rpc.py $(CURDIR)/debian/pxvirt-spdk/usr/bin/spdk_rpc
|
|
cp -r $(CURDIR)/scripts/spdkcli.py $(CURDIR)/debian/pxvirt-spdk/usr/bin/spdk_cli
|
|
|
|
# install spdk_setup
|
|
install -Dm644 "scripts/bash-completion/spdk" $(CURDIR)/debian/pxvirt-spdk/usr/share/bash-completion/completions/spdk
|
|
install -Dm644 "LICENSE" $(CURDIR)/debian/pxvirt-spdk/usr/share/licenses/pxvirt-spdk/LICENSE
|
|
|
|
# install tools
|
|
install -Dm755 $(CURDIR)/debian/bin/spdk_loadconfig $(CURDIR)/debian/pxvirt-spdk/usr/bin/spdk_loadconfig
|
|
install -Dm755 $(CURDIR)/debian/bin/spdk_saveconfig $(CURDIR)/debian/pxvirt-spdk/usr/bin/spdk_saveconfig
|
|
install -Dm644 $(CURDIR)/debian/pxvirt-spdk-load.service $(CURDIR)/debian/pxvirt-spdk/lib/systemd/system/pxvirt-spdk-load.service
|
|
install -Dm755 $(CURDIR)/cpumask/cpumask_tool $(CURDIR)/debian/pxvirt-spdk/usr/bin/cpumask_tool
|
|
|
|
override_dh_usrlocal:
|
|
|
|
override_dh_dwz:
|
|
|
|
override_dh_auto_clean:
|