1

I'm able to create a deb package. Now, I want to write a Debian rule to copy the file to its target.

For example, a script should be copied to /etc/init.d be executed after installation.

Note: I followed this blog to build debian package https://abz89.wordpress.com/2008/03/24/building-debian-deb-package-from-tarball-source-targz/

0

1 Answer 1

3

Use debian/install instead. A debian/install containing:

foo /etc/init.d

Will cause foo to be copied to /etc/init.d relative to the package build directory.

21
  • Can you please brief about the debian/install. What i did is I have created file debian/mypackage.install it contains rule usr/bin rule etc/init.d/. Here rule is a file, After building the deb package the rule file is not copied to etc/init.d/ & usr/bin/ Any suggestions
    – prem
    Sep 17, 2015 at 12:59
  • @Jacob the path is supposed to be relative to root, so, without a leading slash.
    – muru
    Sep 17, 2015 at 13:52
  • @prem where would rule be located after building the source?
    – muru
    Sep 17, 2015 at 13:53
  • ...ah, I see. I always use with, never tried without. Sep 17, 2015 at 14:38
  • @ muru rule file should be at /etc/init.d/ after building the source
    – prem
    Sep 17, 2015 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .