So what ? I already made 4 packages with sources from my Precise 12.04

http://sourceforge.net/projects/zint/

The sources will need libpng12 however for those have installed libpn
1.5 and up

'libpng15/png.h' no longer includes 'zlib.h'. You must do it yourself.

In 'convert.c':

#include <png.h>
#include <zlib.h>

Then it's straight forward

Compile the sources
___________________

$ tar -zxf zint-2.4.3.tar.gz
$ cd zint-2.4.3
$ mkdir build
$ cd build/
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
FIX:PATH=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test CXX_COMPILER_FLAG_WALL
-- Performing Test CXX_COMPILER_FLAG_WALL - Success
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.3.4") 
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.2") 
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.1") 
-- Configuring done
-- Generating done
-- Build files have been written to: 
/home/ubuntu-precise/user/Downloads/Barcode Software/Zint Barcode 
Generator/zint-2.4.3/build
$ make -j4

To make a simple debian packaging you can use first checkinstall as

$ sudo checkinstall --install=no

Then when asked about the information

This package will be built according to these values:

0 -  Maintainer: [ root@User-PC ]
1 -  Summary: [ a barcode encoding library supporting over 50 symbologies ]
2 -  Name:    [ zint ]
3 -  Version: [ 2.4.3 ]
4 -  Release: [ 0ubuntu0~precise ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ build ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ build ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

In the end

$ sudo chown user:user zint_2.4.3-0ubuntu0~precise_amd64.deb
$ sudo chmod 664 zint_2.4.3-0ubuntu0~precise_amd64.deb

You can then install it as one package

$ sudo dpkg -i  zint_2.4.3-0ubuntu0~precise_amd64.deb

Or as I did split it up in 4 separates packages

zint
zint-dev
zintqt
zintqt-dev

using dpkg -b package-name-folder

For this rename the package to orig.deb

$ mv zint_2.4.3-0ubuntu0~precise_amd64.deb
zint_2.4.3-0ubuntu0~precise_amd64.orig.deb

Extract its data content (it will be extracted in a new usr folder)
[seen in http://en.chys.info/2010/02/extract-deb-files/]

$ mkdir zint_2.4.3-0ubuntu0~precise_amd64.orig
$ mkdir zint_2.4.3-0ubuntu0~precise_amd64.orig/DEBIAN
$ cd zint_2.4.3-0ubuntu0~precise_amd64.orig
$ ar -p ../zint_2.4.3-0ubuntu0~precise_amd64.orig.deb ../data.tar.gz | tar -zxf 
-
$ cd DEBIAN
$ ar -p ../../zint_2.4.3-0ubuntu0~precise_amd64.orig.deb ../../control.tar.gz | 
tar -zxf -
$ cd ../..

Edit the control file from the extracted sources
zint-2.4.3/debian/control to make 4 packages

For example

$ cd zint-2.4.2/build
$ mkdir zint_2.4.2-0ubuntu0~precise_amd64
$ mkdir zint_2.4.2-0ubuntu0~precise_amd64/DEBIAN
$ mkdir zint_2.4.2-0ubuntu0~precise_amd64/usr
$ mkdir zint_2.4.2-0ubuntu0~precise_amd64/usr/bin
$ mkdir zint_2.4.2-0ubuntu0~precise_amd64/usr/lib
$ mkdir zint_2.4.2-0ubuntu0~precise_amd64/usr/share

Copy the control file in the DEBIAN folder.

Then compute the md5sums file

$ cd zint_2.4.2-0ubuntu0~precise_amd64
$ find ./usr -type f -exec md5sum {} \;>>md5sums.md5
$ mv md5sums.md5 DEBIAN/md5sums
$ cd ..
$ dpkg-deb -b zint_2.4.2-0ubuntu0~precise_amd64
$ sudo chmod 664 zint_2.4.2-0ubuntu0~precise_amd64.deb

the same for the 3 other packages ... Anyone as has a quicker fix to
build these packages ?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/569249

Title:
  [needs-packaging] zint

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/569249/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to