Create a debian package from the jar executable without using any tools or scripts

I created a package based on the http://packaging.ubuntu.com/html/packaging-new-software.html sample. In this example, the sources are C ++ files. I want to create my new package from the source file jar files. I found maven, ANT and dhBuild tools, but I do not want to use these tools. So I need a way to create my command line package. Please give me some tips or samples to learn more about this.

+4
source share
2 answers

The goal is to create a package that simply puts the shell of the script where I want.

  • Create a directory to create your packages. Some use deb, while others use packages. Others create a directory structure to create multiple packages under "deb" (or something else).

    mkdir deb

  • Create a directory structure in deb that represents where you want to place the script 1

mkdir -p./deb/usr/local/bin

3. Copy the script to the new directory

cp /path/to/my/script/myscript.sh ./deb/usr/local/bin/

4. Create a subdirectory called "DEBIAN", it will store the package management file.

mkdir -p ./deb/DEBIAN
Create a control file.
touch ./deb/DEBIAN/control

5. Open the control file and enter the text below.

Package: myPackagename (no spaces or underscores allowed) 
Priority: optional Section: 
misc Maintainer: Maintainer Name <user@mail.com> 
Architecture: all Version: 1.0       
Depends: package1, package2, ......... Description: short description here long   description here (don't remove space at the beginning of line) (replace this with an empty line)
Change ownership: sudo chown -R root:root ./deb

6. Create the debian package.

dpkg -b ./deb /my/output/destination/packagename.deb
+4
source

I do not understand how "do not use debhelper" and "creating a package from cmdline" are contradictory.

, " - ", :

    • a .deb - ar chive, $ ar xf /path/to/package.deb
  • $ ls debian-binary control.tar.gz data.tar.gz debian-binary - ( 2.0)

    data.tar.gz .

    control.tar.gz , ( ), ; ..

  • .deb, , :

    • tar data.tar.gz

    • deb control.tar.gz

    • debian-binary, , : $ echo "2.0" > debian-binary

    • deb , : $ ar q /tmp/mypackage.deb debian-binary control.tar.gz data.tar.gz

, , , . . , .

!

0

All Articles