j'aimerais utiliser la bibliothèque de traitement d'image pandore, mais comme elle n'est pas dispo, j'essaie d'en faire un paquet AUR.
Voici mon PKGBUILD :
Code : Tout sélectionner
### This is an example PKGBUILD file. Use this as a start to creating your own,
### and remove these comments. For more information, see 'man PKGBUILD'.
### NOTE: Please fill out the license field for your package! If it is unknown,
### then please put 'unknown'.
### Maintainer: kamui57 <kamui_57 at yahoo dot fr>
pkgname=pandore
pkgver=6.5.2
pkgrel=1
epoch=
pkgdesc="A library of image processing operators"
arch=('i686' 'x86_64')
url="http://www.greyc.ensicaen.fr/~regis/Pandore/"
license=('custom')
### 'http://www.greyc.ensicaen.fr/~regis/Pandore/#documentation')
### cf fichier pandore.install et fichier LICENSE
groups=()
depends=()
makedepends=()
checkdepends=()
### Optdepends : http://www.greyc.ensicaen.fr/~regis/Pandore/installation-en.html
### ↓ ↓ ↓
### - Qt version >= 4.0.0 for visualization operation (www.trolltech.com).
### - or X11 and Motif for visualization operators.
### However, Qt is preferred to X11.
### Without these two API, operators 'pvisu' and 'pdraw' are not available.
### However, the rest of the operators work without Qt (or X11).
optdepends=('qt>=4.0.0: visualization operations pvisu and pdraw (recommended)'
'openmotif: visualization operations pvisu and pdraw')
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=${pkgname}.install
changelog=
source=(http://www.greyc.ensicaen.fr/~regis/Pandore/tarballs/${pkgname}${pkgver}-unix-src.tgz)
md5sums=('17f0bcf20e5f9a7f69caaf6871a7784f')
noextract=()
#generate with 'makepkg -g'
build() {
### INSTALLATION
### Use:
### ./configure
### make (or make -j6)
### make install
### make clean
tar zxf ${pkgname}${pkgver}-unix-src.tgz && cd "$srcdir/$pkgname"
./configure --prefix=/usr
make || return 1
}
check() {
cd "$srcdir/$pkgname"
###make -k check
### http://www.greyc.ensicaen.fr/~regis/Pandore/installation-en.html
### The complete installation should create the followings:
### - the library 'libpandore.so' (or libpandore.dylib under MacOS X) in the folder './lib',
### - executable operators in the folder './bin',
### - the launch script './pandore'.
###
### To check the installation, execute the following commands:
### pandore
### pversion
### or a more complete commands sequence:
### pbmp2pan examples/tangram.bmp /tmp/tangram.pan
### pstatus
### pvisu /tmp/tangram.pan
### The command 'pstatus' must display "SUCCESS".
if [ ! -f ./lib/libpandore.so ] ; then echo "File $srcdir/$pkgname/lib/libpandore.so missing" ; return 1 ; fi
if [ ! -f ./pandore ] ; then echo "File $srcdir/$pkgname/pandore missing" ; return 1 ; fi
if [ ! -d ./bin ] ; then echo "Folder $srcdir/$pkgname/bin missing or empty" ; return 1 ; fi
### $srcdir/$pkgname/bin/pbmp2pan $srcdir/$pkgname/examples/tangram.bmp /tmp/tangram.pan
### if [ `$srcdir/$pkgname/bin/pstatus` != 'SUCCESS' ]; then echo "pstatus doesn't return success for pbmp2pan examples/tangram.bmp /tmp/tangram.pan" ; return 1 ; fi
### ↓ ↓ ↓
### ==> Lancement de check()...
### /home/stepharch/aur/pandore/src/pandore/bin/pbmp2pan: error while loading shared libraries: libpandore.so: cannot open shared object file: No such file or directory
### ==> ERREUR: Une erreur s'est produite dans check().
### Abandon...
}
package() {
cd "$srcdir/$pkgname"
make DESTDIR="$pkgdir/" install
echo -n "Copying LICENSE to $pkgdir/usr/share/licenses/$pkgname..."
cp LICENSE $pkgdir/usr/share/licenses/$pkgname
echo " done."
}
# vim:set ts=2 sw=2 et:
Code : Tout sélectionner
# This is a default template for a post-install scriptlet.
# Uncomment only required functions and remove any functions
# you don't need (and this header).
## arg 1: the new package version
#pre_install() {
# do something here
#}
## arg 1: the new package version
post_install() {
cat << EOF
To check the installation, execute the following commands:
pandore
pversion
or a more complete commands sequence:
pbmp2pan examples/tangram.bmp /tmp/tangram.pan
pstatus
pvisu /tmp/tangram.pan
The command 'pstatus' must display "SUCCESS".
EOF
}
## arg 1: the new package version
## arg 2: the old package version
#pre_upgrade() {
# do something here
#}
## arg 1: the new package version
## arg 2: the old package version
#post_upgrade() {
# do something here
#}
## arg 1: the old package version
#pre_remove() {
# do something here
#}
## arg 1: the old package version
#post_remove() {
# do something here
#}
# vim:set ts=2 sw=2 et:
Code : Tout sélectionner
12:55:46 stepharch@mittelerde:~/aur/pandore 44$ makepkg -f
==> Création du paquet pandore 6.5.2-1 (lun. mars 28 12:55:51 CEST 2011)
==> Vérification des dépendances pour l'exécution...
==> Vérification des dépendances pour la compilation...
==> Récupération des sources...
-> pandore6.5.2-unix-src.tgz trouvé
==> Validation des fichiers sources avec md5sums...
pandore6.5.2-unix-src.tgz ... Réussite
==> Extraction des sources...
-> Extraction de pandore6.5.2-unix-src.tgz avec bsdtar
==> Suppression du répertoire pkg/ existant...
==> Lancement de build()...
checking target system type... Linux-2.6.37-ARCH-i686
checking dynamic loading options for LINUX_ELF... yes
checking C++ compiler... g++
checking linker... g++
checking make... make
checking perl binary... yes
checking Qt version >= 4.0.0... yes (4.7.2)
setting qmake est /usr/bin/qmake
generating dependencies for objects files... bundled.cpp, collection.cpp, errc.cpp, graph.cpp, main.cpp, pobject.cpp, region.cpp, ... done.
generating dependencies for operators files... pabs.cpp [...] psuperimposition.cpp, ... done.
generating Makefile for src/viewers/Qt... done.
generating Makefile... done.
generating 'pandore' script file... done.
SUMMARY
Your system is: LINUX_ELF
Perl interpreter is: perl
make command is: make
C++ compiler is: g++
Linker is: g++
Dynamic library libpandore is: libpandore.so
Compilation options for object files: -s -DNDEBUG -O2 -Iinclude -pedantic -fpic
Linker options for object files: -shared
Compilation options for operators: -s -DNDEBUG -O2 -Iinclude -pedantic -DMAIN -Isrc/operatorsP0
Linker options for operators: -Llib -lpandore
The Graphical User Interface is: Qt
Qt version: 4.7.2
Installed boxes: none.
If this is correct, you can just type 'make' now at your shell prompt.
Once everything is built, you must run 'make install'.
The Pandore script will be installed into '/usr/bin'
Otherwise, rerun configure with proper options
(see the INSTALL file for a description of Pandore configure options.)
cd src/viewers/Qt && make
make[1]: entrant dans le répertoire « /home/stepharch/aur/pandore/src/pandore/src/viewers/Qt »
make[1]: Rien à faire pour « first ».
make[1]: quittant le répertoire « /home/stepharch/aur/pandore/src/pandore/src/viewers/Qt »
==> Lancement de check()...
==> Entre dans l'environnement fakeroot...
==> Lancement de package()...
Installation folder: /usr/bin
cp -f "./pandore" "/usr/bin/pandore"
cp: impossible de créer le fichier standard « /usr/bin/pandore »: Permission non accordée
make: [install] Erreur 1 (ignorée)
chmod gou+x "/usr/bin/pandore"
chmod: impossible d'accéder à « /usr/bin/pandore »: Aucun fichier ou dossier de ce type
make: [install] Erreur 1 (ignorée)
==> Nettoyage de l'installation...
-> Suppression d'autres fichiers...
-> Compression des man/info pages...
-> Strip des symboles de débogage inutiles dans les binaires et les bibliothèques...
==> Création du paquet...
-> Génération du fichier .PKGINFO...
-> Ajout du fichier install...
-> Compression du paquet...
==> Quitte l'environnement fakeroot.
==> Création finie: pandore 6.5.2-1 (lun. mars 28 12:56:23 CEST 2011)
12:56:23 stepharch@mittelerde:~/aur/pandore 45$ ls
Code : Tout sélectionner
Copyright
Permission to use, copy, modify, and distribute Pandore and its documentation for any purpose, without fee, and without a written agreement is hereby granted.
In no event shall the GREYC laboratory be liable to any party for direct, indirect, special, incidental, or consequential damages, including lost profits, arising out of the use of this software and its documentation.
Pandore provided hereunder is on an "as-is" basis, and the GREYC laboratory has no obligations to provide maintenance, support, updates, enhancements, or modifications.
Avez-vous des remarques concernant les fichiers ?
Faut-il lancer makepkg en root pour résoudre les erreurs de permissions à l'installation ?
Merci
Edit : copie de la LICENSE non plus dans la fonction post_install de pandore.install mais dans la fonction package du PKGBUILD suite à la remarque de FoolEcho.