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

前端 未结 2 1494
执念已碎
执念已碎 2021-01-30 05:30

I have a large project where we have the following files:

  • A few 3rd party pre-compiled binaries
  • Our own in-house binaries
  • collection of
相关标签:
2条回答
  • 2021-01-30 05:54

    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/
    
    0 讨论(0)
  • 2021-01-30 05:59

    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
    
    0 讨论(0)
提交回复
热议问题