What is the simplest Debian Packaging Guide? The Next CEO of Stack OverflowHow to create deb installer from tarballs?How to Create Deb FilesCreating Debian Package For Qt apphow to convert an application to .debany basic app packaging guide for a newbie?How to pack a program for easy Ubuntu installations?Creating debian package of C# app with desktop iconMake your own .deb application package installer after being installed by sudo apt-get installcreate a .deb Package from scripts or binariesTeam Viewer on Ubuntu! Is it running through wine?Ubuntu packaging in bzrCreating Debian Package For Qt appany basic app packaging guide for a newbie?How can I create a simple debian package from binary?How to create a .deb file just for copying certain icons and one javascript file to particular locations?Guidelines for packaging web appdebuild failed at dh_install with cp: cannot stat `debian/tmp//path/to/install/bin/': No such file or directorycreating debian packages for Mozilla ProductsHow to create multiple debian packages using the same debian directoryDebian packaging of python library with extra files

Complex fractions

How does the mv command work with external drives?

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

How do we know the LHC results are robust?

Interfacing a button to MCU (and PC) with 50m long cable

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

Why do airplanes bank sharply to the right after air-to-air refueling?

How do scammers retract money, while you can’t?

How did people program for Consoles with multiple CPUs?

How to count occurrences of text in a file?

Elegant way to replace substring in a regex with optional groups in Python?

In excess I'm lethal

What's the best way to handle refactoring a big file?

Bold, vivid family

Can you replace a racial trait cantrip when leveling up?

Is there a way to save my career from absolute disaster?

Limits on contract work without pre-agreed price/contract (UK)

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Multiple labels for a single equation

Between two walls

If the heap is initialized for security, then why is the stack uninitialized?

Non-deterministic sum of floats

How do I go from 300 unfinished/half written blog posts, to published posts?



What is the simplest Debian Packaging Guide?



The Next CEO of Stack OverflowHow to create deb installer from tarballs?How to Create Deb FilesCreating Debian Package For Qt apphow to convert an application to .debany basic app packaging guide for a newbie?How to pack a program for easy Ubuntu installations?Creating debian package of C# app with desktop iconMake your own .deb application package installer after being installed by sudo apt-get installcreate a .deb Package from scripts or binariesTeam Viewer on Ubuntu! Is it running through wine?Ubuntu packaging in bzrCreating Debian Package For Qt appany basic app packaging guide for a newbie?How can I create a simple debian package from binary?How to create a .deb file just for copying certain icons and one javascript file to particular locations?Guidelines for packaging web appdebuild failed at dh_install with cp: cannot stat `debian/tmp//path/to/install/bin/': No such file or directorycreating debian packages for Mozilla ProductsHow to create multiple debian packages using the same debian directoryDebian packaging of python library with extra files










140















I went to the Ubuntu wiki but got confused,there were too many ways. Please tell me an easy guide to Debian packaging.










share|improve this question



















  • 3





    Do you want to create packages for your own use, on a specific computer, or for others to use?

    – andol
    Aug 6 '10 at 5:49






  • 1





    Which language is the software you'd like to package?

    – Umang
    Aug 6 '10 at 6:07






  • 3





    I have the same issue. Most of the tutorials and guides start with "get the upstream tarball". From this point on we are lost. We have a simple thing we want to deploy, there is no upstream tarball, there is no source code. its just a war file, some scripts, and some jar files. What is the upstream tar ball all about, and has anyone seen a guide NOT using one, which is comprehensive(e.g. deals with the issues of users)

    – John Little
    Nov 13 '15 at 15:38






  • 2





    I'll go for the one I posted over StackOVerflow.

    – user438925
    Nov 17 '15 at 5:52















140















I went to the Ubuntu wiki but got confused,there were too many ways. Please tell me an easy guide to Debian packaging.










share|improve this question



















  • 3





    Do you want to create packages for your own use, on a specific computer, or for others to use?

    – andol
    Aug 6 '10 at 5:49






  • 1





    Which language is the software you'd like to package?

    – Umang
    Aug 6 '10 at 6:07






  • 3





    I have the same issue. Most of the tutorials and guides start with "get the upstream tarball". From this point on we are lost. We have a simple thing we want to deploy, there is no upstream tarball, there is no source code. its just a war file, some scripts, and some jar files. What is the upstream tar ball all about, and has anyone seen a guide NOT using one, which is comprehensive(e.g. deals with the issues of users)

    – John Little
    Nov 13 '15 at 15:38






  • 2





    I'll go for the one I posted over StackOVerflow.

    – user438925
    Nov 17 '15 at 5:52













140












140








140


59






I went to the Ubuntu wiki but got confused,there were too many ways. Please tell me an easy guide to Debian packaging.










share|improve this question
















I went to the Ubuntu wiki but got confused,there were too many ways. Please tell me an easy guide to Debian packaging.







packaging debian






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 29 '15 at 11:04









BuZZ-dEE

9,335115270




9,335115270










asked Aug 6 '10 at 5:38









akshatjakshatj

6,113123764




6,113123764







  • 3





    Do you want to create packages for your own use, on a specific computer, or for others to use?

    – andol
    Aug 6 '10 at 5:49






  • 1





    Which language is the software you'd like to package?

    – Umang
    Aug 6 '10 at 6:07






  • 3





    I have the same issue. Most of the tutorials and guides start with "get the upstream tarball". From this point on we are lost. We have a simple thing we want to deploy, there is no upstream tarball, there is no source code. its just a war file, some scripts, and some jar files. What is the upstream tar ball all about, and has anyone seen a guide NOT using one, which is comprehensive(e.g. deals with the issues of users)

    – John Little
    Nov 13 '15 at 15:38






  • 2





    I'll go for the one I posted over StackOVerflow.

    – user438925
    Nov 17 '15 at 5:52












  • 3





    Do you want to create packages for your own use, on a specific computer, or for others to use?

    – andol
    Aug 6 '10 at 5:49






  • 1





    Which language is the software you'd like to package?

    – Umang
    Aug 6 '10 at 6:07






  • 3





    I have the same issue. Most of the tutorials and guides start with "get the upstream tarball". From this point on we are lost. We have a simple thing we want to deploy, there is no upstream tarball, there is no source code. its just a war file, some scripts, and some jar files. What is the upstream tar ball all about, and has anyone seen a guide NOT using one, which is comprehensive(e.g. deals with the issues of users)

    – John Little
    Nov 13 '15 at 15:38






  • 2





    I'll go for the one I posted over StackOVerflow.

    – user438925
    Nov 17 '15 at 5:52







3




3





Do you want to create packages for your own use, on a specific computer, or for others to use?

– andol
Aug 6 '10 at 5:49





Do you want to create packages for your own use, on a specific computer, or for others to use?

– andol
Aug 6 '10 at 5:49




1




1





Which language is the software you'd like to package?

– Umang
Aug 6 '10 at 6:07





Which language is the software you'd like to package?

– Umang
Aug 6 '10 at 6:07




3




3





I have the same issue. Most of the tutorials and guides start with "get the upstream tarball". From this point on we are lost. We have a simple thing we want to deploy, there is no upstream tarball, there is no source code. its just a war file, some scripts, and some jar files. What is the upstream tar ball all about, and has anyone seen a guide NOT using one, which is comprehensive(e.g. deals with the issues of users)

– John Little
Nov 13 '15 at 15:38





I have the same issue. Most of the tutorials and guides start with "get the upstream tarball". From this point on we are lost. We have a simple thing we want to deploy, there is no upstream tarball, there is no source code. its just a war file, some scripts, and some jar files. What is the upstream tar ball all about, and has anyone seen a guide NOT using one, which is comprehensive(e.g. deals with the issues of users)

– John Little
Nov 13 '15 at 15:38




2




2





I'll go for the one I posted over StackOVerflow.

– user438925
Nov 17 '15 at 5:52





I'll go for the one I posted over StackOVerflow.

– user438925
Nov 17 '15 at 5:52










7 Answers
7






active

oldest

votes


















94














This is a good HOWTO for creating a basic .deb file. It is suitable for creating .deb files for personal use but not stringent enough if you want to the package to be included in Debian / Ubuntu - for that you should read the Debian New Maintainer's Guide and/or the Ubuntu Packaging Guide (which I believe you've already tried).



A good tool for checking your .deb file for compliance is lintian (installable from the repositories).



There were two sessions here in the Ask Ubuntu chatrooms.



The Basics of Packaging on Ubuntu (Packaging: Part 1)



Ubuntu Packaging for Launchpad PPAs (Packaging: Part 2)






share|improve this answer

























  • This nicely compiles what is needed to start with packaging, but in the HOWTO I miss information to include the application icon in the deb file (and haven't found anything about that elsewhere). Any hint on how to do it?

    – nightcod3r
    Jul 3 '17 at 7:48


















13














What parts are you having trouble with? Although complicated, the guide seemed quite clear when I was following it.



Quick Summary:



  • Extract source .tar.gz

  • Run dh_make

  • Edit debian files

  • Run debuild





share|improve this answer




















  • 3





    What confused me is, is this process the same no matter the source language or directory structure?

    – Seth
    Sep 26 '14 at 0:15






  • 7





    The crux is, we dont have a .tar.gz. we want to package an app we wrote. No guide seems to cover this, they all start with an "upstream tarball" which we dont have.

    – John Little
    Nov 13 '15 at 15:40











  • @JohnLittle this answer may be of assistance: askubuntu.com/a/27731/5

    – Nathan Osman
    Nov 13 '15 at 18:25






  • 1





    What about long-term, repeated packaging? Do I have to every-time do such long and complicated packaging process?

    – kravemir
    Aug 13 '17 at 18:28











  • If the user has no GPG key, debuild will fail with "debsign: gpg error occurred! Aborting....".

    – agc
    Dec 15 '17 at 16:04


















8














You can even use dpkg-deb for creating simple packages.



Here's a nice tutorial from Ubuntuforums.






share|improve this answer
































    5














    The very easiest way to package something is to use checkinstall.






    share|improve this answer


















    • 4





      checkinstall provides a quick way to build debin binary package(.deb ) from a source install method. However it does not provide a proper debian package (built from a debian source package).

      – João Pinto
      Aug 6 '10 at 20:14











    • OH man.. I had to use that BEFORE compiling.. that's like hours of compiling.

      – ppumkin
      Feb 20 '15 at 23:57


















    3














    No, the simplest and clearest packaging guide in this world is



    http://blog.noizeramp.com/2005/08/31/packaging-java-applications-for-ubuntu-and-other-debians/.



    Few days ago, for my first application, I created DEB package by following this tutorial. Very clear and my app packaged succesfully. Yes, at least it is simplest for me.



    You can compare it with Debian Packaging Guide.






    share|improve this answer


















    • 2





      "Simple" does not mean "complete". There's a lot of policies a basic .deb packaging tutorial will not cover for different types of programs, and therefore packaging is not as easy as just a "simple tutorial".

      – Thomas Ward
      Jul 7 '13 at 2:54











    • definitely simple. It got me started and I was able to create my first debian package within minutes. Still a lot of details to deal with (bad package quality messsages from lintian) but great starting point.

      – atmelino
      Nov 22 '15 at 1:05


















    3














    Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:



    The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.



    These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):




    1. Create the files and folders in order to recreate the following structure:



      ProgramName-Version/
      ProgramName-Version/DEBIAN
      ProgramName-Version/DEBIAN/control
      ProgramName-Version/usr/
      ProgramName-Version/usr/bin/
      ProgramName-Version/usr/bin/your_script


      The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/




    2. Change all the folder permissions to root:



       chown root:root -R /path/to/ProgramName-Version 



    3. Change the script's permissions:



       chmod 0755 /path/to/the/script


    4. Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)


    Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.



    Package: ProgramName
    Version: VERSION
    Architecture: all
    Maintainer: YOUR NAME <EMAIL>
    Depends: python2.7, etc , etc,
    Installed-Size: in_kb
    Homepage: http://foo.com
    Description: Here you can put a one line description.This is the short Description.
    Here you put the long description, indented by 1 space.





    share|improve this answer
































      0














      Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:

      The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.

      These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):

      Create the files and folders in order to recreate the following structure:

      ProgramName-Version/
      ProgramName-Version/DEBIAN
      ProgramName-Version/DEBIAN/control
      ProgramName-Version/usr/
      ProgramName-Version/usr/bin/
      ProgramName-Version/usr/bin/your_script
      The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/

      Change all the folder permissions to root:

      chown root:root -R /path/to/ProgramName-Version
      Change the script's permissions:

      chmod 0755 /path/to/the/script
      Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)

      Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.

      Package: ProgramName
      Version: VERSION
      Architecture: all
      Maintainer: YOUR NAME <EMAIL>
      Depends: python2.7, etc , etc,
      Installed-Size: in_kb
      Homepage: http://foo.com
      Description: Here you can put a one line description.This is the short Description.
      Here you put the long description, indented by 1 space.


      Haven't tried it yet, but this is the kind of answer I was looking for.






      share|improve this answer








      New contributor




      wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















        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',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        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%2f1345%2fwhat-is-the-simplest-debian-packaging-guide%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        7 Answers
        7






        active

        oldest

        votes








        7 Answers
        7






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        94














        This is a good HOWTO for creating a basic .deb file. It is suitable for creating .deb files for personal use but not stringent enough if you want to the package to be included in Debian / Ubuntu - for that you should read the Debian New Maintainer's Guide and/or the Ubuntu Packaging Guide (which I believe you've already tried).



        A good tool for checking your .deb file for compliance is lintian (installable from the repositories).



        There were two sessions here in the Ask Ubuntu chatrooms.



        The Basics of Packaging on Ubuntu (Packaging: Part 1)



        Ubuntu Packaging for Launchpad PPAs (Packaging: Part 2)






        share|improve this answer

























        • This nicely compiles what is needed to start with packaging, but in the HOWTO I miss information to include the application icon in the deb file (and haven't found anything about that elsewhere). Any hint on how to do it?

          – nightcod3r
          Jul 3 '17 at 7:48















        94














        This is a good HOWTO for creating a basic .deb file. It is suitable for creating .deb files for personal use but not stringent enough if you want to the package to be included in Debian / Ubuntu - for that you should read the Debian New Maintainer's Guide and/or the Ubuntu Packaging Guide (which I believe you've already tried).



        A good tool for checking your .deb file for compliance is lintian (installable from the repositories).



        There were two sessions here in the Ask Ubuntu chatrooms.



        The Basics of Packaging on Ubuntu (Packaging: Part 1)



        Ubuntu Packaging for Launchpad PPAs (Packaging: Part 2)






        share|improve this answer

























        • This nicely compiles what is needed to start with packaging, but in the HOWTO I miss information to include the application icon in the deb file (and haven't found anything about that elsewhere). Any hint on how to do it?

          – nightcod3r
          Jul 3 '17 at 7:48













        94












        94








        94







        This is a good HOWTO for creating a basic .deb file. It is suitable for creating .deb files for personal use but not stringent enough if you want to the package to be included in Debian / Ubuntu - for that you should read the Debian New Maintainer's Guide and/or the Ubuntu Packaging Guide (which I believe you've already tried).



        A good tool for checking your .deb file for compliance is lintian (installable from the repositories).



        There were two sessions here in the Ask Ubuntu chatrooms.



        The Basics of Packaging on Ubuntu (Packaging: Part 1)



        Ubuntu Packaging for Launchpad PPAs (Packaging: Part 2)






        share|improve this answer















        This is a good HOWTO for creating a basic .deb file. It is suitable for creating .deb files for personal use but not stringent enough if you want to the package to be included in Debian / Ubuntu - for that you should read the Debian New Maintainer's Guide and/or the Ubuntu Packaging Guide (which I believe you've already tried).



        A good tool for checking your .deb file for compliance is lintian (installable from the repositories).



        There were two sessions here in the Ask Ubuntu chatrooms.



        The Basics of Packaging on Ubuntu (Packaging: Part 1)



        Ubuntu Packaging for Launchpad PPAs (Packaging: Part 2)







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 29 '15 at 11:05









        BuZZ-dEE

        9,335115270




        9,335115270










        answered Aug 6 '10 at 18:50









        dv3500eadv3500ea

        29.1k1290144




        29.1k1290144












        • This nicely compiles what is needed to start with packaging, but in the HOWTO I miss information to include the application icon in the deb file (and haven't found anything about that elsewhere). Any hint on how to do it?

          – nightcod3r
          Jul 3 '17 at 7:48

















        • This nicely compiles what is needed to start with packaging, but in the HOWTO I miss information to include the application icon in the deb file (and haven't found anything about that elsewhere). Any hint on how to do it?

          – nightcod3r
          Jul 3 '17 at 7:48
















        This nicely compiles what is needed to start with packaging, but in the HOWTO I miss information to include the application icon in the deb file (and haven't found anything about that elsewhere). Any hint on how to do it?

        – nightcod3r
        Jul 3 '17 at 7:48





        This nicely compiles what is needed to start with packaging, but in the HOWTO I miss information to include the application icon in the deb file (and haven't found anything about that elsewhere). Any hint on how to do it?

        – nightcod3r
        Jul 3 '17 at 7:48













        13














        What parts are you having trouble with? Although complicated, the guide seemed quite clear when I was following it.



        Quick Summary:



        • Extract source .tar.gz

        • Run dh_make

        • Edit debian files

        • Run debuild





        share|improve this answer




















        • 3





          What confused me is, is this process the same no matter the source language or directory structure?

          – Seth
          Sep 26 '14 at 0:15






        • 7





          The crux is, we dont have a .tar.gz. we want to package an app we wrote. No guide seems to cover this, they all start with an "upstream tarball" which we dont have.

          – John Little
          Nov 13 '15 at 15:40











        • @JohnLittle this answer may be of assistance: askubuntu.com/a/27731/5

          – Nathan Osman
          Nov 13 '15 at 18:25






        • 1





          What about long-term, repeated packaging? Do I have to every-time do such long and complicated packaging process?

          – kravemir
          Aug 13 '17 at 18:28











        • If the user has no GPG key, debuild will fail with "debsign: gpg error occurred! Aborting....".

          – agc
          Dec 15 '17 at 16:04















        13














        What parts are you having trouble with? Although complicated, the guide seemed quite clear when I was following it.



        Quick Summary:



        • Extract source .tar.gz

        • Run dh_make

        • Edit debian files

        • Run debuild





        share|improve this answer




















        • 3





          What confused me is, is this process the same no matter the source language or directory structure?

          – Seth
          Sep 26 '14 at 0:15






        • 7





          The crux is, we dont have a .tar.gz. we want to package an app we wrote. No guide seems to cover this, they all start with an "upstream tarball" which we dont have.

          – John Little
          Nov 13 '15 at 15:40











        • @JohnLittle this answer may be of assistance: askubuntu.com/a/27731/5

          – Nathan Osman
          Nov 13 '15 at 18:25






        • 1





          What about long-term, repeated packaging? Do I have to every-time do such long and complicated packaging process?

          – kravemir
          Aug 13 '17 at 18:28











        • If the user has no GPG key, debuild will fail with "debsign: gpg error occurred! Aborting....".

          – agc
          Dec 15 '17 at 16:04













        13












        13








        13







        What parts are you having trouble with? Although complicated, the guide seemed quite clear when I was following it.



        Quick Summary:



        • Extract source .tar.gz

        • Run dh_make

        • Edit debian files

        • Run debuild





        share|improve this answer















        What parts are you having trouble with? Although complicated, the guide seemed quite clear when I was following it.



        Quick Summary:



        • Extract source .tar.gz

        • Run dh_make

        • Edit debian files

        • Run debuild






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 29 '15 at 11:05









        BuZZ-dEE

        9,335115270




        9,335115270










        answered Aug 6 '10 at 6:11









        Nathan OsmanNathan Osman

        21.1k32144237




        21.1k32144237







        • 3





          What confused me is, is this process the same no matter the source language or directory structure?

          – Seth
          Sep 26 '14 at 0:15






        • 7





          The crux is, we dont have a .tar.gz. we want to package an app we wrote. No guide seems to cover this, they all start with an "upstream tarball" which we dont have.

          – John Little
          Nov 13 '15 at 15:40











        • @JohnLittle this answer may be of assistance: askubuntu.com/a/27731/5

          – Nathan Osman
          Nov 13 '15 at 18:25






        • 1





          What about long-term, repeated packaging? Do I have to every-time do such long and complicated packaging process?

          – kravemir
          Aug 13 '17 at 18:28











        • If the user has no GPG key, debuild will fail with "debsign: gpg error occurred! Aborting....".

          – agc
          Dec 15 '17 at 16:04












        • 3





          What confused me is, is this process the same no matter the source language or directory structure?

          – Seth
          Sep 26 '14 at 0:15






        • 7





          The crux is, we dont have a .tar.gz. we want to package an app we wrote. No guide seems to cover this, they all start with an "upstream tarball" which we dont have.

          – John Little
          Nov 13 '15 at 15:40











        • @JohnLittle this answer may be of assistance: askubuntu.com/a/27731/5

          – Nathan Osman
          Nov 13 '15 at 18:25






        • 1





          What about long-term, repeated packaging? Do I have to every-time do such long and complicated packaging process?

          – kravemir
          Aug 13 '17 at 18:28











        • If the user has no GPG key, debuild will fail with "debsign: gpg error occurred! Aborting....".

          – agc
          Dec 15 '17 at 16:04







        3




        3





        What confused me is, is this process the same no matter the source language or directory structure?

        – Seth
        Sep 26 '14 at 0:15





        What confused me is, is this process the same no matter the source language or directory structure?

        – Seth
        Sep 26 '14 at 0:15




        7




        7





        The crux is, we dont have a .tar.gz. we want to package an app we wrote. No guide seems to cover this, they all start with an "upstream tarball" which we dont have.

        – John Little
        Nov 13 '15 at 15:40





        The crux is, we dont have a .tar.gz. we want to package an app we wrote. No guide seems to cover this, they all start with an "upstream tarball" which we dont have.

        – John Little
        Nov 13 '15 at 15:40













        @JohnLittle this answer may be of assistance: askubuntu.com/a/27731/5

        – Nathan Osman
        Nov 13 '15 at 18:25





        @JohnLittle this answer may be of assistance: askubuntu.com/a/27731/5

        – Nathan Osman
        Nov 13 '15 at 18:25




        1




        1





        What about long-term, repeated packaging? Do I have to every-time do such long and complicated packaging process?

        – kravemir
        Aug 13 '17 at 18:28





        What about long-term, repeated packaging? Do I have to every-time do such long and complicated packaging process?

        – kravemir
        Aug 13 '17 at 18:28













        If the user has no GPG key, debuild will fail with "debsign: gpg error occurred! Aborting....".

        – agc
        Dec 15 '17 at 16:04





        If the user has no GPG key, debuild will fail with "debsign: gpg error occurred! Aborting....".

        – agc
        Dec 15 '17 at 16:04











        8














        You can even use dpkg-deb for creating simple packages.



        Here's a nice tutorial from Ubuntuforums.






        share|improve this answer





























          8














          You can even use dpkg-deb for creating simple packages.



          Here's a nice tutorial from Ubuntuforums.






          share|improve this answer



























            8












            8








            8







            You can even use dpkg-deb for creating simple packages.



            Here's a nice tutorial from Ubuntuforums.






            share|improve this answer















            You can even use dpkg-deb for creating simple packages.



            Here's a nice tutorial from Ubuntuforums.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 31 '10 at 6:35

























            answered Dec 16 '10 at 9:12









            SearockSearock

            2493723




            2493723





















                5














                The very easiest way to package something is to use checkinstall.






                share|improve this answer


















                • 4





                  checkinstall provides a quick way to build debin binary package(.deb ) from a source install method. However it does not provide a proper debian package (built from a debian source package).

                  – João Pinto
                  Aug 6 '10 at 20:14











                • OH man.. I had to use that BEFORE compiling.. that's like hours of compiling.

                  – ppumkin
                  Feb 20 '15 at 23:57















                5














                The very easiest way to package something is to use checkinstall.






                share|improve this answer


















                • 4





                  checkinstall provides a quick way to build debin binary package(.deb ) from a source install method. However it does not provide a proper debian package (built from a debian source package).

                  – João Pinto
                  Aug 6 '10 at 20:14











                • OH man.. I had to use that BEFORE compiling.. that's like hours of compiling.

                  – ppumkin
                  Feb 20 '15 at 23:57













                5












                5








                5







                The very easiest way to package something is to use checkinstall.






                share|improve this answer













                The very easiest way to package something is to use checkinstall.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 6 '10 at 5:44









                e8johane8johan

                1752




                1752







                • 4





                  checkinstall provides a quick way to build debin binary package(.deb ) from a source install method. However it does not provide a proper debian package (built from a debian source package).

                  – João Pinto
                  Aug 6 '10 at 20:14











                • OH man.. I had to use that BEFORE compiling.. that's like hours of compiling.

                  – ppumkin
                  Feb 20 '15 at 23:57












                • 4





                  checkinstall provides a quick way to build debin binary package(.deb ) from a source install method. However it does not provide a proper debian package (built from a debian source package).

                  – João Pinto
                  Aug 6 '10 at 20:14











                • OH man.. I had to use that BEFORE compiling.. that's like hours of compiling.

                  – ppumkin
                  Feb 20 '15 at 23:57







                4




                4





                checkinstall provides a quick way to build debin binary package(.deb ) from a source install method. However it does not provide a proper debian package (built from a debian source package).

                – João Pinto
                Aug 6 '10 at 20:14





                checkinstall provides a quick way to build debin binary package(.deb ) from a source install method. However it does not provide a proper debian package (built from a debian source package).

                – João Pinto
                Aug 6 '10 at 20:14













                OH man.. I had to use that BEFORE compiling.. that's like hours of compiling.

                – ppumkin
                Feb 20 '15 at 23:57





                OH man.. I had to use that BEFORE compiling.. that's like hours of compiling.

                – ppumkin
                Feb 20 '15 at 23:57











                3














                No, the simplest and clearest packaging guide in this world is



                http://blog.noizeramp.com/2005/08/31/packaging-java-applications-for-ubuntu-and-other-debians/.



                Few days ago, for my first application, I created DEB package by following this tutorial. Very clear and my app packaged succesfully. Yes, at least it is simplest for me.



                You can compare it with Debian Packaging Guide.






                share|improve this answer


















                • 2





                  "Simple" does not mean "complete". There's a lot of policies a basic .deb packaging tutorial will not cover for different types of programs, and therefore packaging is not as easy as just a "simple tutorial".

                  – Thomas Ward
                  Jul 7 '13 at 2:54











                • definitely simple. It got me started and I was able to create my first debian package within minutes. Still a lot of details to deal with (bad package quality messsages from lintian) but great starting point.

                  – atmelino
                  Nov 22 '15 at 1:05















                3














                No, the simplest and clearest packaging guide in this world is



                http://blog.noizeramp.com/2005/08/31/packaging-java-applications-for-ubuntu-and-other-debians/.



                Few days ago, for my first application, I created DEB package by following this tutorial. Very clear and my app packaged succesfully. Yes, at least it is simplest for me.



                You can compare it with Debian Packaging Guide.






                share|improve this answer


















                • 2





                  "Simple" does not mean "complete". There's a lot of policies a basic .deb packaging tutorial will not cover for different types of programs, and therefore packaging is not as easy as just a "simple tutorial".

                  – Thomas Ward
                  Jul 7 '13 at 2:54











                • definitely simple. It got me started and I was able to create my first debian package within minutes. Still a lot of details to deal with (bad package quality messsages from lintian) but great starting point.

                  – atmelino
                  Nov 22 '15 at 1:05













                3












                3








                3







                No, the simplest and clearest packaging guide in this world is



                http://blog.noizeramp.com/2005/08/31/packaging-java-applications-for-ubuntu-and-other-debians/.



                Few days ago, for my first application, I created DEB package by following this tutorial. Very clear and my app packaged succesfully. Yes, at least it is simplest for me.



                You can compare it with Debian Packaging Guide.






                share|improve this answer













                No, the simplest and clearest packaging guide in this world is



                http://blog.noizeramp.com/2005/08/31/packaging-java-applications-for-ubuntu-and-other-debians/.



                Few days ago, for my first application, I created DEB package by following this tutorial. Very clear and my app packaged succesfully. Yes, at least it is simplest for me.



                You can compare it with Debian Packaging Guide.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 7 '13 at 2:21









                Ade Malsasa AkbarAde Malsasa Akbar

                439311




                439311







                • 2





                  "Simple" does not mean "complete". There's a lot of policies a basic .deb packaging tutorial will not cover for different types of programs, and therefore packaging is not as easy as just a "simple tutorial".

                  – Thomas Ward
                  Jul 7 '13 at 2:54











                • definitely simple. It got me started and I was able to create my first debian package within minutes. Still a lot of details to deal with (bad package quality messsages from lintian) but great starting point.

                  – atmelino
                  Nov 22 '15 at 1:05












                • 2





                  "Simple" does not mean "complete". There's a lot of policies a basic .deb packaging tutorial will not cover for different types of programs, and therefore packaging is not as easy as just a "simple tutorial".

                  – Thomas Ward
                  Jul 7 '13 at 2:54











                • definitely simple. It got me started and I was able to create my first debian package within minutes. Still a lot of details to deal with (bad package quality messsages from lintian) but great starting point.

                  – atmelino
                  Nov 22 '15 at 1:05







                2




                2





                "Simple" does not mean "complete". There's a lot of policies a basic .deb packaging tutorial will not cover for different types of programs, and therefore packaging is not as easy as just a "simple tutorial".

                – Thomas Ward
                Jul 7 '13 at 2:54





                "Simple" does not mean "complete". There's a lot of policies a basic .deb packaging tutorial will not cover for different types of programs, and therefore packaging is not as easy as just a "simple tutorial".

                – Thomas Ward
                Jul 7 '13 at 2:54













                definitely simple. It got me started and I was able to create my first debian package within minutes. Still a lot of details to deal with (bad package quality messsages from lintian) but great starting point.

                – atmelino
                Nov 22 '15 at 1:05





                definitely simple. It got me started and I was able to create my first debian package within minutes. Still a lot of details to deal with (bad package quality messsages from lintian) but great starting point.

                – atmelino
                Nov 22 '15 at 1:05











                3














                Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:



                The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.



                These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):




                1. Create the files and folders in order to recreate the following structure:



                  ProgramName-Version/
                  ProgramName-Version/DEBIAN
                  ProgramName-Version/DEBIAN/control
                  ProgramName-Version/usr/
                  ProgramName-Version/usr/bin/
                  ProgramName-Version/usr/bin/your_script


                  The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/




                2. Change all the folder permissions to root:



                   chown root:root -R /path/to/ProgramName-Version 



                3. Change the script's permissions:



                   chmod 0755 /path/to/the/script


                4. Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)


                Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.



                Package: ProgramName
                Version: VERSION
                Architecture: all
                Maintainer: YOUR NAME <EMAIL>
                Depends: python2.7, etc , etc,
                Installed-Size: in_kb
                Homepage: http://foo.com
                Description: Here you can put a one line description.This is the short Description.
                Here you put the long description, indented by 1 space.





                share|improve this answer





























                  3














                  Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:



                  The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.



                  These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):




                  1. Create the files and folders in order to recreate the following structure:



                    ProgramName-Version/
                    ProgramName-Version/DEBIAN
                    ProgramName-Version/DEBIAN/control
                    ProgramName-Version/usr/
                    ProgramName-Version/usr/bin/
                    ProgramName-Version/usr/bin/your_script


                    The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/




                  2. Change all the folder permissions to root:



                     chown root:root -R /path/to/ProgramName-Version 



                  3. Change the script's permissions:



                     chmod 0755 /path/to/the/script


                  4. Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)


                  Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.



                  Package: ProgramName
                  Version: VERSION
                  Architecture: all
                  Maintainer: YOUR NAME <EMAIL>
                  Depends: python2.7, etc , etc,
                  Installed-Size: in_kb
                  Homepage: http://foo.com
                  Description: Here you can put a one line description.This is the short Description.
                  Here you put the long description, indented by 1 space.





                  share|improve this answer



























                    3












                    3








                    3







                    Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:



                    The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.



                    These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):




                    1. Create the files and folders in order to recreate the following structure:



                      ProgramName-Version/
                      ProgramName-Version/DEBIAN
                      ProgramName-Version/DEBIAN/control
                      ProgramName-Version/usr/
                      ProgramName-Version/usr/bin/
                      ProgramName-Version/usr/bin/your_script


                      The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/




                    2. Change all the folder permissions to root:



                       chown root:root -R /path/to/ProgramName-Version 



                    3. Change the script's permissions:



                       chmod 0755 /path/to/the/script


                    4. Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)


                    Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.



                    Package: ProgramName
                    Version: VERSION
                    Architecture: all
                    Maintainer: YOUR NAME <EMAIL>
                    Depends: python2.7, etc , etc,
                    Installed-Size: in_kb
                    Homepage: http://foo.com
                    Description: Here you can put a one line description.This is the short Description.
                    Here you put the long description, indented by 1 space.





                    share|improve this answer















                    Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:



                    The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.



                    These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):




                    1. Create the files and folders in order to recreate the following structure:



                      ProgramName-Version/
                      ProgramName-Version/DEBIAN
                      ProgramName-Version/DEBIAN/control
                      ProgramName-Version/usr/
                      ProgramName-Version/usr/bin/
                      ProgramName-Version/usr/bin/your_script


                      The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/




                    2. Change all the folder permissions to root:



                       chown root:root -R /path/to/ProgramName-Version 



                    3. Change the script's permissions:



                       chmod 0755 /path/to/the/script


                    4. Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)


                    Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.



                    Package: ProgramName
                    Version: VERSION
                    Architecture: all
                    Maintainer: YOUR NAME <EMAIL>
                    Depends: python2.7, etc , etc,
                    Installed-Size: in_kb
                    Homepage: http://foo.com
                    Description: Here you can put a one line description.This is the short Description.
                    Here you put the long description, indented by 1 space.






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Aug 29 '17 at 0:58


























                    community wiki





                    14 revs, 3 users 51%
                    karel






















                        0














                        Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:

                        The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.

                        These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):

                        Create the files and folders in order to recreate the following structure:

                        ProgramName-Version/
                        ProgramName-Version/DEBIAN
                        ProgramName-Version/DEBIAN/control
                        ProgramName-Version/usr/
                        ProgramName-Version/usr/bin/
                        ProgramName-Version/usr/bin/your_script
                        The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/

                        Change all the folder permissions to root:

                        chown root:root -R /path/to/ProgramName-Version
                        Change the script's permissions:

                        chmod 0755 /path/to/the/script
                        Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)

                        Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.

                        Package: ProgramName
                        Version: VERSION
                        Architecture: all
                        Maintainer: YOUR NAME <EMAIL>
                        Depends: python2.7, etc , etc,
                        Installed-Size: in_kb
                        Homepage: http://foo.com
                        Description: Here you can put a one line description.This is the short Description.
                        Here you put the long description, indented by 1 space.


                        Haven't tried it yet, but this is the kind of answer I was looking for.






                        share|improve this answer








                        New contributor




                        wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.
























                          0














                          Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:

                          The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.

                          These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):

                          Create the files and folders in order to recreate the following structure:

                          ProgramName-Version/
                          ProgramName-Version/DEBIAN
                          ProgramName-Version/DEBIAN/control
                          ProgramName-Version/usr/
                          ProgramName-Version/usr/bin/
                          ProgramName-Version/usr/bin/your_script
                          The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/

                          Change all the folder permissions to root:

                          chown root:root -R /path/to/ProgramName-Version
                          Change the script's permissions:

                          chmod 0755 /path/to/the/script
                          Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)

                          Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.

                          Package: ProgramName
                          Version: VERSION
                          Architecture: all
                          Maintainer: YOUR NAME <EMAIL>
                          Depends: python2.7, etc , etc,
                          Installed-Size: in_kb
                          Homepage: http://foo.com
                          Description: Here you can put a one line description.This is the short Description.
                          Here you put the long description, indented by 1 space.


                          Haven't tried it yet, but this is the kind of answer I was looking for.






                          share|improve this answer








                          New contributor




                          wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






















                            0












                            0








                            0







                            Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:

                            The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.

                            These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):

                            Create the files and folders in order to recreate the following structure:

                            ProgramName-Version/
                            ProgramName-Version/DEBIAN
                            ProgramName-Version/DEBIAN/control
                            ProgramName-Version/usr/
                            ProgramName-Version/usr/bin/
                            ProgramName-Version/usr/bin/your_script
                            The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/

                            Change all the folder permissions to root:

                            chown root:root -R /path/to/ProgramName-Version
                            Change the script's permissions:

                            chmod 0755 /path/to/the/script
                            Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)

                            Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.

                            Package: ProgramName
                            Version: VERSION
                            Architecture: all
                            Maintainer: YOUR NAME <EMAIL>
                            Depends: python2.7, etc , etc,
                            Installed-Size: in_kb
                            Homepage: http://foo.com
                            Description: Here you can put a one line description.This is the short Description.
                            Here you put the long description, indented by 1 space.


                            Haven't tried it yet, but this is the kind of answer I was looking for.






                            share|improve this answer








                            New contributor




                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.










                            Originally posted on StackOverFlow, this guide is for pre-compiled or interpreted software:

                            The right way of building a deb package is using dpkg-buildpackage but sometimes it is a little bit complicated. Instead you can use dpkg -b <folder> and it will create your Debian package.

                            These are the basics for creating a Debian package with dpkg -b <folder> with any binary or with any kind of script that runs automatically without needing manual compilation (Python, Bash, Pearl, Ruby):

                            Create the files and folders in order to recreate the following structure:

                            ProgramName-Version/
                            ProgramName-Version/DEBIAN
                            ProgramName-Version/DEBIAN/control
                            ProgramName-Version/usr/
                            ProgramName-Version/usr/bin/
                            ProgramName-Version/usr/bin/your_script
                            The scripts placed at /usr/bin/ are directly called from the terminal, note that I didn't add an extension to the script. Also you can notice that the structure of the deb package will be the structure of the program once it's installed. So if you follow this logic if your program has a single file, you can directly place it under ProgramName-Version/usr/bin/your_script, but if you have multiple files, you should place them under ProgramName-Version/usr/share/ProgramName/all your files and place only one file under /usr/bin/ that will call your scripts from /usr/share/ProgramName/

                            Change all the folder permissions to root:

                            chown root:root -R /path/to/ProgramName-Version
                            Change the script's permissions:

                            chmod 0755 /path/to/the/script
                            Finally, you can run: dpkg -b /path/to/the/ProgramName-Version and your deb package will be created! (You can also add the post/pre inst scripts and everything you want, it works like a normal Debian package)

                            Here is an example of the control file. You only need to copy/paste it in to an empty file called "control" and put it in the DEBIAN folder.

                            Package: ProgramName
                            Version: VERSION
                            Architecture: all
                            Maintainer: YOUR NAME <EMAIL>
                            Depends: python2.7, etc , etc,
                            Installed-Size: in_kb
                            Homepage: http://foo.com
                            Description: Here you can put a one line description.This is the short Description.
                            Here you put the long description, indented by 1 space.


                            Haven't tried it yet, but this is the kind of answer I was looking for.







                            share|improve this answer








                            New contributor




                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            share|improve this answer



                            share|improve this answer






                            New contributor




                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            answered 21 mins ago









                            wyatt jacksonwyatt jackson

                            1




                            1




                            New contributor




                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.





                            New contributor





                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1345%2fwhat-is-the-simplest-debian-packaging-guide%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

                                Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

                                Antonio De Lisio Carrera Referencias Menú de navegación«Caracas: evolución relacional multipleja»«Cuando los gobiernos subestiman a las localidades: L a Iniciativa para la Integración de la Infraestructura Regional Suramericana (IIRSA) en la frontera Colombo-Venezolana»«Maestría en Planificación Integral del Ambiente»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«Conózcanos»«Caracas: evolución relacional multipleja»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»