04 Sep 2014, 13:00

Postgresql 9.3.5 pour Debian Wheezy et architecture armhf (raspberry, cubieboard, cubietruck, etc)

La fondation Postgres ne fournit des paquets debian/ubuntu que pour les architectures i386/x86_64 ; Voulant avoir une version 9.3 pour mes projets sur carte Raspberry / Cubietruck, j'ai donc recompilé les paquets sur la base des informations fournies ici que je complète.

### add postgre’s sources to apt
sudo echo "deb-src http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" >> /etc/apt/sources.list.d/pgdg.list

### add apt key if not done before
wget –quiet -O – https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

### Prepare your own environment
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential fakeroot

### Satisfy your dependencies
sudo apt-get build-dep postgresql-9.3
sudo apt-get build-dep postgresql-common
sudo apt-get build-dep postgresql-client-common
sudo apt-get build-dep pgdg-keyring

### !!! ATTENTION -> do not run as root or build will fail on test “can not run tests as root”.
### As it can require quite a long time, you are encourage to have a remote session using screen or tmux for example to avoid network disconnection.
cd /tmp
apt-get source --compile postgresql-9.3
apt-get source --compile postgresql-common
apt-get source --compile postgresql-client-common
apt-get source --compile pgdg-keyring

### create own repository
sudo mkdir /var/local/repository
sudo echo "deb [ trusted=yes ] file:///var/local/repository ./" > /etc/apt/sources.list.d/my_own_repo.list
sudo mv /tmp/*.deb /var/local/repository/
cd /var/local/repository
sudo dpkg-scanpackages ./ > Packages && gzip -f Packages

### Update your package list
sudo apt-get update

### <:o) install postgres
sudo apt-get install postgresql-9.3

### list of generated packages :
libecpg6_9.3.5-1.pgdg70+1_armhf.deb
libecpg-compat3_9.3.5-1.pgdg70+1_armhf.deb
libecpg-dev_9.3.5-1.pgdg70+1_armhf.deb
libpgtypes3_9.3.5-1.pgdg70+1_armhf.deb
libpq5_9.3.5-1.pgdg70+1_armhf.deb
libpq-dev_9.3.5-1.pgdg70+1_armhf.deb
pgdg-keyring_2013.2_all.deb
postgresql_9.3+154.pgdg70+1_all.deb
postgresql-9.3_9.3.5-1.pgdg70+1_armhf.deb
postgresql-9.3-dbg_9.3.5-1.pgdg70+1_armhf.deb
postgresql-client_9.3+154.pgdg70+1_all.deb
postgresql-client-9.3_9.3.5-1.pgdg70+1_armhf.deb
postgresql-client-common_154.pgdg70+1_all.deb
postgresql-common_154.pgdg70+1_all.deb
postgresql-contrib_9.3+154.pgdg70+1_all.deb
postgresql-contrib-9.3_9.3.5-1.pgdg70+1_armhf.deb
postgresql-doc_9.3+154.pgdg70+1_all.deb
postgresql-doc-9.3_9.3.5-1.pgdg70+1_all.deb
postgresql-plperl-9.3_9.3.5-1.pgdg70+1_armhf.deb
postgresql-plpython3-9.3_9.3.5-1.pgdg70+1_armhf.deb
postgresql-plpython-9.3_9.3.5-1.pgdg70+1_armhf.deb
postgresql-pltcl-9.3_9.3.5-1.pgdg70+1_armhf.deb
postgresql-server-dev-9.3_9.3.5-1.pgdg70+1_armhf.deb
postgresql-server-dev-all_154.pgdg70+1_all.deb

have fun.

Si quelqu'un est intérressé par la mise en place d'un dépôt, qu'il se manifeste.