77 lines
2.2 KiB
Makefile
Executable File
77 lines
2.2 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])")
|
|
|
|
%:
|
|
dh $@ --with quilt
|
|
|
|
override_dh_auto_configure:
|
|
./configure \
|
|
--libdir=/usr/lib/"$(DEB_HOST_MULTIARCH)"/spdk \
|
|
--prefix=/usr \
|
|
--disable-examples \
|
|
--disable-tests \
|
|
--disable-unit-tests \
|
|
--with-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
|
|
|
|
override_dh_auto_build:
|
|
dh_auto_build -- PREFIX=/usr
|
|
|
|
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
|
|
|
|
# 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/
|
|
|
|
# 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
|
|
|
|
|
|
|
|
override_dh_usrlocal:
|
|
|
|
override_dh_dwz:
|
|
|
|
override_dh_auto_clean:
|