I need my Debian rules file to simply copy files to it's target

落花浮王杯 提交于 2019-12-02 14:30:33
Umang

Although you've already got your own answer, I'll point out a couple of things.

You seem to be doing this in a very complicated manner. If you simply need to copy files into certain directories, write a debian/mypackagename.install with the following format:

path/to/file/relative/to/source/root path/to/install/relative/to/system/root

(do not prepend / before /usr, or /opt, or whatever your target directory is. Read man dh_install for more information)

Then your debian/rules can be:

#!/usr/bin/make -f

%:
    dh $@

If you have some sort of makefile, etc in your source root, then append this to the above rules file:

override_dh_auto_build:

override_dh_auto_install:

Don't forget put 7 in debian/compat.

Also, you shouldn't install files into /opt/ or /usr/local/, etc. Those are meant for files not installed by Debian packages. Debian recommends installing in /usr/share/yourcompany/. As juzzlin points out below, the Ubuntu Software Center may have different requirements.

More specifically, your mypackage.install file should look like this:

src/bin/* usr/bin
src/etc/* etc/

You can install cdbs and change the rules file like this

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

binary-install/package_name::
                   mkdir debian/$(cdbs_curpkg)/destination_path 
                   cp path_of_your_files  debian/$(cdbs_curpkg)/destination_path
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!