How to create a native multi deb package with static files?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












My source tree is as following:



.
├── debian
│   ├── changelog
│   ├── compat
│   ├── control
│   ├── copyright
│   ├── README.Debian
│   ├── rules
│   ├── source
├── Makefile
├── sub1
│   └── etc
│ | └── pkg
| | | └── pkg.conf
├── sub2
│ └── etc
│ | └── pkg
| | | └── pkg.conf


My control file defines the two sub-packages I want to create:



Source: pkg
Section: web
Priority: optional
Maintainer: Guillaume Humbert <guillaume.humbert.jp@gmail.com>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.7
Homepage: http://xxx

Package: pkg-sub1
Architecture: any
Multi-Arch: foreign
Depends: $misc:Depends, $shlibs:Depends
Description: blabla
blablabla

Package: pkg-sub2
Architecture: any
Multi-Arch: foreign
Depends: $misc:Depends, $shlibs:Depends
Description: blabla
blablabla


What I want as a result, is to have two created packages containing the correct /etc/pkg/pkg.conf file.



Is there a way to achieve this?
I am not even sure on what to put in the Makefile, since the conf files are both at the same location.



I was thinking having a dynamic Makefile, where I could inject a variable from dh_install, and have have dpkg-buildpackage to pick the right folder:



#!/usr/bin/make -f

.PHONY: all
all: # Nothing to build

install:
mkdir -p $(DESTDIR)/etc/pkg
cp $(SUB)/etc/pkg/* $(DESTDIR)/$(SUB)/etc/pkg/


Is that even possible?










share|improve this question

























    up vote
    0
    down vote

    favorite












    My source tree is as following:



    .
    ├── debian
    │   ├── changelog
    │   ├── compat
    │   ├── control
    │   ├── copyright
    │   ├── README.Debian
    │   ├── rules
    │   ├── source
    ├── Makefile
    ├── sub1
    │   └── etc
    │ | └── pkg
    | | | └── pkg.conf
    ├── sub2
    │ └── etc
    │ | └── pkg
    | | | └── pkg.conf


    My control file defines the two sub-packages I want to create:



    Source: pkg
    Section: web
    Priority: optional
    Maintainer: Guillaume Humbert <guillaume.humbert.jp@gmail.com>
    Build-Depends: debhelper (>=9)
    Standards-Version: 3.9.7
    Homepage: http://xxx

    Package: pkg-sub1
    Architecture: any
    Multi-Arch: foreign
    Depends: $misc:Depends, $shlibs:Depends
    Description: blabla
    blablabla

    Package: pkg-sub2
    Architecture: any
    Multi-Arch: foreign
    Depends: $misc:Depends, $shlibs:Depends
    Description: blabla
    blablabla


    What I want as a result, is to have two created packages containing the correct /etc/pkg/pkg.conf file.



    Is there a way to achieve this?
    I am not even sure on what to put in the Makefile, since the conf files are both at the same location.



    I was thinking having a dynamic Makefile, where I could inject a variable from dh_install, and have have dpkg-buildpackage to pick the right folder:



    #!/usr/bin/make -f

    .PHONY: all
    all: # Nothing to build

    install:
    mkdir -p $(DESTDIR)/etc/pkg
    cp $(SUB)/etc/pkg/* $(DESTDIR)/$(SUB)/etc/pkg/


    Is that even possible?










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      My source tree is as following:



      .
      ├── debian
      │   ├── changelog
      │   ├── compat
      │   ├── control
      │   ├── copyright
      │   ├── README.Debian
      │   ├── rules
      │   ├── source
      ├── Makefile
      ├── sub1
      │   └── etc
      │ | └── pkg
      | | | └── pkg.conf
      ├── sub2
      │ └── etc
      │ | └── pkg
      | | | └── pkg.conf


      My control file defines the two sub-packages I want to create:



      Source: pkg
      Section: web
      Priority: optional
      Maintainer: Guillaume Humbert <guillaume.humbert.jp@gmail.com>
      Build-Depends: debhelper (>=9)
      Standards-Version: 3.9.7
      Homepage: http://xxx

      Package: pkg-sub1
      Architecture: any
      Multi-Arch: foreign
      Depends: $misc:Depends, $shlibs:Depends
      Description: blabla
      blablabla

      Package: pkg-sub2
      Architecture: any
      Multi-Arch: foreign
      Depends: $misc:Depends, $shlibs:Depends
      Description: blabla
      blablabla


      What I want as a result, is to have two created packages containing the correct /etc/pkg/pkg.conf file.



      Is there a way to achieve this?
      I am not even sure on what to put in the Makefile, since the conf files are both at the same location.



      I was thinking having a dynamic Makefile, where I could inject a variable from dh_install, and have have dpkg-buildpackage to pick the right folder:



      #!/usr/bin/make -f

      .PHONY: all
      all: # Nothing to build

      install:
      mkdir -p $(DESTDIR)/etc/pkg
      cp $(SUB)/etc/pkg/* $(DESTDIR)/$(SUB)/etc/pkg/


      Is that even possible?










      share|improve this question













      My source tree is as following:



      .
      ├── debian
      │   ├── changelog
      │   ├── compat
      │   ├── control
      │   ├── copyright
      │   ├── README.Debian
      │   ├── rules
      │   ├── source
      ├── Makefile
      ├── sub1
      │   └── etc
      │ | └── pkg
      | | | └── pkg.conf
      ├── sub2
      │ └── etc
      │ | └── pkg
      | | | └── pkg.conf


      My control file defines the two sub-packages I want to create:



      Source: pkg
      Section: web
      Priority: optional
      Maintainer: Guillaume Humbert <guillaume.humbert.jp@gmail.com>
      Build-Depends: debhelper (>=9)
      Standards-Version: 3.9.7
      Homepage: http://xxx

      Package: pkg-sub1
      Architecture: any
      Multi-Arch: foreign
      Depends: $misc:Depends, $shlibs:Depends
      Description: blabla
      blablabla

      Package: pkg-sub2
      Architecture: any
      Multi-Arch: foreign
      Depends: $misc:Depends, $shlibs:Depends
      Description: blabla
      blablabla


      What I want as a result, is to have two created packages containing the correct /etc/pkg/pkg.conf file.



      Is there a way to achieve this?
      I am not even sure on what to put in the Makefile, since the conf files are both at the same location.



      I was thinking having a dynamic Makefile, where I could inject a variable from dh_install, and have have dpkg-buildpackage to pick the right folder:



      #!/usr/bin/make -f

      .PHONY: all
      all: # Nothing to build

      install:
      mkdir -p $(DESTDIR)/etc/pkg
      cp $(SUB)/etc/pkg/* $(DESTDIR)/$(SUB)/etc/pkg/


      Is that even possible?







      package-management dpkg deb debuild






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 10 at 16:23









      Guillaume

      1011




      1011

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1023720%2fhow-to-create-a-native-multi-deb-package-with-static-files%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1023720%2fhow-to-create-a-native-multi-deb-package-with-static-files%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Trouble downloading packages list due to a “Hash sum mismatch” error

          How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

          How do I move numbers in filenames, in a batch renaming operation?