| 1 | <!-- |
| 2 | .. title: Making Mosquitto packages for Debian yourself |
| 3 | .. slug: making-mosquitto-packages-for-debian-yourself |
| 4 | .. date: 2012-11-27 16:26:41 |
| 5 | .. tags: Packaging,Solutions |
| 6 | .. category: |
| 7 | .. link: |
| 8 | .. description: |
| 9 | .. type: text |
| 10 | --> |
| 11 | |
| 12 | As Debian has been in feature freeze since before Mosquitto 1.0 was released, |
| 13 | it will be a long time until there is an updated version of Mosquitto in |
| 14 | Debian. It is, however, fairly straightforward to do the packaging yourself. |
| 15 | Here's how to do that from the command line. |
| 16 | |
| 17 | Download and unpack the mosquitto source tarball: |
| 18 | |
| 19 | ``` |
| 20 | wget http://mosquitto.org/files/source/mosquitto-1.1.2.tar.gz |
| 21 | tar -zxf mosquitto-1.1.2.tar.gz |
| 22 | ``` |
| 23 | |
| 24 | Rename the tarball to match Debian requirements: |
| 25 | |
| 26 | ``` |
| 27 | mv mosquitto-1.1.2.tar.gz mosquitto_1.1.2.orig.tar.gz |
| 28 | ``` |
| 29 | |
| 30 | The current mosquitto packaging files are available at |
| 31 | <https://packages.debian.org/source/stable/mosquitto> - you want the |
| 32 | .debian.tar.xz. |
| 33 | |
| 34 | The next step is to build the package, but you may find that you need to |
| 35 | install some packages first: |
| 36 | |
| 37 | ``` |
| 38 | sudo apt-get install build-essential python quilt libwrap0-dev libssl-dev devscripts python-setuptools |
| 39 | ``` |
| 40 | |
| 41 | To build the packages do |
| 42 | |
| 43 | ``` |
| 44 | cd mosquitto-1.1.2/ |
| 45 | debuild |
| 46 | ``` |
| 47 | |
| 48 | You should now have a list of .deb files in the parent directory which you can |
| 49 | install with: |
| 50 | |
| 51 | ``` |
| 52 | sudo dpkg -i <deb file> |
| 53 | ``` |
| 54 | |
| 55 | Please leave comments if you find this useful or have any problems. |