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

Next revision
Previous revision
how_to_build_a_debian_package [2016/01/09 11:34]
sgripon created
how_to_build_a_debian_package [2016/11/05 19:20] (current)
sgripon [How To Build a Debian Package for Raspberry pi]
Line 1: Line 1:
-====== How To Build a Debian Package ======+====== How To Build a Debian Package ​for Raspberry pi ======
  
-This tutorial is based on [[http://​linuxconfig.org/​easy-way-to-create-a-debian-package-and-local-package-repository]]. +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 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.+
  
 First, create DEBIAN folder: First, create DEBIAN folder:
Line 16: Line 14:
 The content: The content:
  
- +<​file ​txt control>
-<file control>+
 Package: owncloud-client Package: owncloud-client
 Version: 2.1.0+debian+rpi1 Version: 2.1.0+debian+rpi1
Line 34: Line 31:
  sync clients.  sync clients.
 </​file>​ </​file>​
 +
 +It is also to add a post installation script in order to update dynamic libraries links:
 +
 +  vim /​home/​pi/​dev/​owncloud-client/​deb/​owncloud-client/​DEBIAN/​postinst
 +  ​
 +<file bash postinst>​
 +#!/bin/sh
 +set -e
 +
 +echo "​Postinst running ..."
 +ldconfig
 +echo "​Done"​
 +</​file>​
 +
 +And give the good credentials:​
 +  sudo chmod 0755 /​home/​pi/​dev/​owncloud-client/​deb/​owncloud-client/​DEBIAN/​postinst
 + 
 +
 +Then build the package:
 +
 +  cd /​home/​pi/​dev/​owncloud-client/​deb
 +  dpkg-deb --build owncloud-client
 +
 +After that, you just have to install it:
 +
 +  sudo dpkg -i owncloud-client.deb
 +
 +===== References =====
 +
 +This tutorial is originally based on [[http://​linuxconfig.org/​easy-way-to-create-a-debian-package-and-local-package-repository]].
 +
how_to_build_a_debian_package.1452335672.txt.gz · Last modified: 2016/01/09 11:34 by sgripon