User Tools

Site Tools


how_to_build_a_debian_package

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
how_to_build_a_debian_package [2016/01/09 11:41]
sgripon
how_to_build_a_debian_package [2018/11/01 22:56] (current)
sgripon [References]
Line 2: Line 2:
  
 In this tutorial, all examples are related to the building of the owncloud-client package for raspberry pi like described in [[building_owncloud_client_for_raspberry_pi|Building owncloud client for Raspberry pi's raspbian]]. I assume files needed in the package are already copied in the deb/​owncloud folder. In this tutorial, all examples are related to the building of the owncloud-client package for raspberry pi like described in [[building_owncloud_client_for_raspberry_pi|Building owncloud client for Raspberry pi's raspbian]]. I assume files needed in the package are already copied in the deb/​owncloud folder.
 +
 +===== Fin dependencies =====
 +
 +To find dependencies to declare in the deb package control file, use readelf command:
 +  readelf -d /​usr/​local/​bin/​owncloud
 +  readelf -d /​usr/​local/​lib/​arm-linux-gnueabihf/​libowncloud_csync.so.2.5.0
 +  readelf -d /​usr/​local/​lib/​arm-linux-gnueabihf/​libowncloudsync.so.2.5.0
 +  ​
 +  ​
 +The output is like this:
 +
 +<​code>​
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5DBus.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5WebKitWidgets.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5Xml.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libowncloudsync.so.0]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libowncloud_csync.so.0]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libsqlite3.so.0]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5Concurrent.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libz.so.1]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libqt5keychain.so.1]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5Widgets.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5WebKit.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5Network.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5Gui.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libQt5Core.so.5]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libstdc++.so.6]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libm.so.6]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libgcc_s.so.1]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [libc.so.6]
 + ​0x00000001 (NEEDED) ​                    ​Shared library: [ld-linux-armhf.so.3]
 +</​code>​
 +
 +Just find the corresponding packages using apt search and add them in dependencies list.
 +
 +===== Create package =====
  
 First, create DEBIAN folder: First, create DEBIAN folder:
Line 36: Line 72:
   vim /​home/​pi/​dev/​owncloud-client/​deb/​owncloud-client/​DEBIAN/​postinst   vim /​home/​pi/​dev/​owncloud-client/​deb/​owncloud-client/​DEBIAN/​postinst
   ​   ​
-<​file ​sh postinst>​+<​file ​bash postinst>​
 #!/bin/sh #!/bin/sh
 set -e set -e
Line 60: Line 96:
 ===== References ===== ===== References =====
  
-This tutorial is originally based on [[http://​linuxconfig.org/​easy-way-to-create-a-debian-package-and-local-package-repository]].+  * This tutorial is originally based on [[http://​linuxconfig.org/​easy-way-to-create-a-debian-package-and-local-package-repository]]. 
 +  * To sign repository: http://​blog.glehmann.net/​2015/​01/​27/​Creating-a-debian-repository/​
  
how_to_build_a_debian_package.1452336080.txt.gz · Last modified: 2016/01/09 11:41 by sgripon