GithubHelp home page GithubHelp logo

demo_dh_make's Introduction

demo_dh_make

Refer to this workflow:

debian_workflow

  1. Use dh_make to generate debian folder
  2. Add hello world
  3. debuild
  4. Convert to quilt format

Use dh_make to generate debian folder

mkdir demo_dh_make
cd demo_dh_make
git init # this repo
dh_make -s -c gpl -n -e [email protected] -p helloworld_0.1

Tree:

.
├── debian
│   ├── changelog
│   ├── compat
│   ├── control
│   ├── copyright
│   ├── helloworld.cron.d.ex
│   ├── helloworld.default.ex
│   ├── helloworld.doc-base.EX
│   ├── helloworld-docs.docs
│   ├── init.d.ex
│   ├── manpage.1.ex
│   ├── manpage.sgml.ex
│   ├── manpage.xml.ex
│   ├── menu.ex
│   ├── postinst.ex
│   ├── postrm.ex
│   ├── preinst.ex
│   ├── prerm.ex
│   ├── README
│   ├── README.Debian
│   ├── README.source
│   ├── rules
│   └── source
│       └── format
└── README.md

=> Result commit

Add hello world

Tree:

.
├── debian
│   ├── changelog
│   ├── compat
│   ├── control
│   ├── copyright
│   ├── helloworld.cron.d.ex
│   ├── helloworld.default.ex
│   ├── helloworld.doc-base.EX
│   ├── helloworld-docs.docs
│   ├── init.d.ex
│   ├── manpage.1.ex
│   ├── manpage.sgml.ex
│   ├── manpage.xml.ex
│   ├── menu.ex
│   ├── postinst.ex
│   ├── postrm.ex
│   ├── preinst.ex
│   ├── prerm.ex
│   ├── README
│   ├── README.Debian
│   ├── README.source
│   ├── rules
│   └── source
│       └── format
├── Makefile                        <==================== new
├── README.md
└── src                             <==================== new
    └── hello.c                     <==================== new

=> Result commit

debuild

  • run debuild to prepare deb files
  • build log => debuild.log
  • Notes:
    • deb / des / ... are placed in parent folder

Tree:

.
├── helloworld_0.1_amd64.build                      <==================== new
├── helloworld_0.1_amd64.changes                    <==================== new
├── helloworld_0.1_amd64.deb                        <==================== new
├── helloworld_0.1.dsc                              <==================== new
├── helloworld_0.1.tar.xz                           <==================== new
└── helloworlddeb
    ├── debian
    │   ├── changelog
    │   ├── compat
    │   ├── control
    │   ├── copyright
    │   ├── debhelper-build-stamp                   <==================== new
    │   ├── files                                   <==================== new
    │   ├── helloworld                              <==================== new
    │   │   ├── bin                                 <==================== new
    │   │   │   └── hello                           <==================== new
    │   │   ├── DEBIAN                              <==================== new
    │   │   │   ├── control                         <==================== new
    │   │   │   └── md5sums                         <==================== new
    │   │   └── usr                                 <==================== new
    │   │       └── share                           <==================== new
    │   │           └── doc                         <==================== new
    │   │               └── helloworld              <==================== new
    │   │                   ├── changelog.gz        <==================== new
    │   │                   ├── copyright           <==================== new
    │   │                   └── README.Debian       <==================== new
    │   ├── helloworld.cron.d.ex
    │   ├── helloworld.debhelper.log
    │   ├── helloworld.default.ex
    │   ├── helloworld.doc-base.EX
    │   ├── helloworld-docs.docs
    │   ├── helloworld.substvars                    <==================== new
    │   ├── init.d.ex
    │   ├── manpage.1.ex
    │   ├── manpage.sgml.ex
    │   ├── manpage.xml.ex
    │   ├── menu.ex
    │   ├── postinst.ex
    │   ├── postrm.ex
    │   ├── preinst.ex
    │   ├── prerm.ex
    │   ├── README
    │   ├── README.Debian
    │   ├── README.source
    │   ├── rules
    │   └── source
    │       └── format
    ├── debian_workflow.png
    ├── debuild.log
    ├── Makefile
    ├── README.md
    └── src
        ├── hello                                   <==================== new
        └── hello.c

=> Result commit

Convert to quilt format

Steps:

debuild # 
cp ../helloworld_0.1.tar.xz ../helloworld_0.1.orig.tar.xz 
echo '3.0 (quilt)' > debian/source/format
dch 'Switch to dpkg-source 3.0 (quilt) format'
debuild

Result:

diff --git a/debian/changelog b/debian/changelog
old mode 100644
new mode 100755
index 12554c6..bf36f78
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+helloworld (0.1) UNRELEASED; urgency=medium
+
+  * Switch to dpkg-source 3.0 (quilt) format
+
+ -- Tim Chen <[email protected]>  Mon, 17 Feb 2020 08:29:52 +0800
+
 helloworld (0.1) unstable; urgency=medium

   * Initial Release.
diff --git a/debian/source/format b/debian/source/format
index 89ae9db..163aaf8 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-3.0 (native)
+3.0 (quilt)

Reference: DebSrc3.0

=> Result commit

demo_dh_make's People

Contributors

timmy00274672 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.