Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 10519  / 3 Years ago, sun, july 18, 2021, 5:21:31

I've started creating a .deb package for my software a while back and the method I've stumbled upon then (I knew nothing about the domain) basically is like this:




  • create a directory structure like this




-- pkg-dir
-- DEBIAN
-- controlfile
-- postinst
-- postrm
-- conffiles
-- usr
-- share
-- myapp
-- etc
-- myapp




  • fakeroot dpkg-deb --build pkg-dir

  • lintian pkg.deb



However these days the info I'm finding all point to dh-make. Is dh-make the new or preferred way? Where does my method come from? I'd like to use the standard way in future but for now I'd like to finish what I've started using this as I'm pressured for time. Where do I get more info on my method?


More From » packaging

 Answers
5

You can create Debian packages in several ways. dh- tools are helperscripts to aid you in creating the correct directory structure and files. dh-make is the most basic one, yet has a lot of heuristic and works well with software using the GNU autotools (the ./configure, make, make install ones). It will do a lot of work for you.



Then you can use debuild to create a source and binary package.



"Your way" is just building from binary files. This is unwanted, as you can't build for other distributions (releases) or architectures. Also, Debian/Ubuntu requires to have a source package in order to be included in the repositories (along a lot of other requirements and guidelines). See for more information the links @saji89 povided. I also suggest you to download packages and inspect how they're put together, using apt-get source packagename.



Update



You mentioned later in a comment you're packaging a Java application. The Debian wiki on Java packaging mentions this:




Use of javahelper is not actually required, however implementing the
required policy elements without javahelper is quite difficult, so it
is assumed that you will be using javahelper.




So, I suggest to start reading about how to package using javahelper and DH, or the alternative to DH: CDBS.


[#34281] Sunday, July 18, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
freezidepu

Total Points: 394
Total Questions: 105
Total Answers: 118

Location: Libya
Member since Mon, Dec 7, 2020
3 Years ago
freezidepu questions
Tue, Apr 19, 22, 16:03, 2 Years ago
Fri, Nov 11, 22, 18:04, 2 Years ago
Sat, Mar 18, 23, 10:59, 1 Year ago
;