0

I'm trying to build deb files from source code, I've used the component msgpack-python: https://github.com/msgpack/msgpack-python.git

Here is what I've tried:

git clone https://github.com/msgpack/msgpack-python.git
mv msgpack-python msgpackpython-0.6
tar -czvf msgpackpython-0.6.tar.gz msgpackpython-0.6
cd msgpackpython-0.6
dh_make -f ../msgpackpython-0.6.tar.gz
dpkg-source --commit
sudo dpkg-buildpackage -us -uc

However, when I executed sudo dpkg-buildpackage -us -uc, I got the error as below:

make[1]: Leaving directory '/data_repo/wzq/tmp/source_code/python_gw/msgpackpython-0.6'
   dh_auto_test
 debian/rules binary
dh binary
   dh_testroot
   dh_prep
   dh_installdirs
   dh_auto_install
   dh_install
dh_install: msgpackpython-dev missing files: usr/include/*
dh_install: msgpackpython-dev missing files: usr/lib/*/lib*.so
dh_install: msgpackpython-dev missing files: usr/lib/*/pkgconfig/*
dh_install: msgpackpython-dev missing files: usr/share/pkgconfig/*
dh_install: missing files, aborting
debian/rules:18: recipe for target 'binary' failed

It doesn't seems that it can find the necessary files under usr/include, usr/lib etc.

However, after executing sudo dpkg-buildpackage -us -uc, I found that two so files were generated in the current directory:

./msgpack/_packer.so
./msgpack/_unpacker.so

Also, I got the path-config file here: ./debian/msgpackpython-dev.install whose contents are:

usr/include/*
usr/lib/*/lib*.so
usr/lib/*/pkgconfig/*
usr/share/pkgconfig/*

So, to resolve this error, I have to copy the generated so files to usr/include, usr/lib etc. Which means that I have to first mkdir usr/include && mkdir usr/lib in the current directory and then move the header files and so files in to them.

I simply want to know if I can avoid this manual step, meaning that I want to write a bash script, which is suitable for all different source codes of components.

  • If you needed to manually move those files, debian/rules should be fixed to do so for you. – muru Oct 30 '18 at 5:04

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.