bon j'ai eu besoin de voir de quoi est fait le client OVH pour la gestion de compte et j'en ai profité pour en faire un PKGBUILD.
Il existe déjà un PKGBUILD sur AUR mais bon … heu … c'est un peu un brouillon !
Par contre, c'est un binaire donc j’ai dû faire quelques contorsions pour avoir un paquetage à peu près correct, à savoir :
- − déplacement du binaire après avoir patché de script de lancement,
- − liens symboliques sur libssl et libcrypto,
- − copie de la libqwt.so.6 (924K) fournie au lieu d’installer qwt (12 Mo),
- − non intégration des bibliothèques fournies en statique, considérant que le système les intègrent déjà¹,
- − je n'ai pas intégré ovh-updater … je sais pas si il est vraiment utile pour nous.
Code : Tout sélectionner
$ namcap mom-4.1.10-1-i686.pkg.tar.xz
mom E: Insecure RPATH '/usr/local/Trolltech/Qt-4.7.2/lib' in file ('usr/lib/mom/libqwt.so.6')
mom E: Insecure RPATH '/usr/local/Trolltech/Qt-4.7.2/lib' in file ('usr/bin/mom-bin')
mom W: Dependency 'sh' on your system is a testing release
mom W: Referenced library 'libssl.so.4' is an uninstalled dependency
mom W: Referenced library 'libcrypto.so.4' is an uninstalled dependency
mom W: Referenced library 'libqwt.so.6' is an uninstalled dependency
mom E: Symlink (usr/lib/mom/libssl.so.4) points to non-existing /usr/lib/libssl.so
mom E: Symlink (usr/lib/mom/libcrypto.so.4) points to non-existing /usr/lib/libcrypto.so
PKGBUILD pour MoM :
Code : Tout sélectionner
# Contributor: Marc Poiroud <marci1 AT archlinux.fr>
pkgname=mom
pkgver=4.1.10
pkgrel=1
pkgdesc="Management interface software for products offered by OVH"
url="https://www.ovh.com/fr/support/outils/mom.xml"
license=('custom' 'LGPL2.1')
arch=('i686' 'x86_64')
depends=('qjson')
source=(ftp://ftp.ovh.net/MoM/MoM-${pkgver}.tar.gz mom.desktop mom.xpm mom_dotfile.patch)
md5sums=('0a174dffbf807f4ce8687f64f7d97229'
'b24f40485459f0f613bc7dcd863ab941'
'339ef7af508acd58822e3ee8d16920af'
'744996d7be504d85a65b89f29df3cb04')
build() {
cd "$srcdir/MoM"
install -d -m 755 $pkgdir/usr/{bin,lib/mom}
install -d -m 755 $pkgdir/usr/share/{pixmaps,applications,licenses/mom}
# Qt provide : imageformats/libqgif.so
patch -Np0 < $srcdir/mom_dotfile.patch
}
package() {
cd "$srcdir/MoM"
install -m 644 $startdir/mom.xpm $pkgdir/usr/share/pixmaps
install -m 644 $startdir/mom.desktop $pkgdir/usr/share/applications
( # Archlinux want it
cd $srcdir/MoM/licenses
install -D -m 644 license-en.txt $pkgdir/usr/share/licenses/mom/LICENSE
)
# install in /usr/bin with bash script, bin file
install -m 755 $srcdir/MoM/MoM $pkgdir/usr/bin/mom
install -m 755 $srcdir/MoM/.MoM-bin $pkgdir/usr/bin/mom-bin
( # fake some librairy links because the binairy sucks ass
cd $pkgdir/usr/lib/mom
ln -s /usr/lib/libssl.so libssl.so.4
ln -s /usr/lib/libcrypto.so libcrypto.so.4
)
install -m 755 $srcdir/MoM/.lib/libqwt.so.6 $pkgdir/usr/lib/mom
## I don't know what this stuff do !
# install -D -m 755 $srcdir/MoM/ovh-updater-new /
# $pkgdir/usr/share/mom/ovh-updater-new
}
mom.desktop :
Code : Tout sélectionner
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=My OVH Manager
GenericName=MoM
Comment=Management interface software for products offered by OVH
Comment[fr]=Logiciel d'interface de gestion pour les produits OVH
Comment[de]=Verwaltungsinterface für die Dienstleistungen von ovh
Exec=mom
Icon=mom
Terminal=false
Type=Application
Categories=Network;
StartupNotify=true
Code : Tout sélectionner
--- MoM 2011-07-25 14:33:08.000000000 +0200
+++ MoM.diff 2011-08-13 18:13:24.000000000 +0200
@@ -13,6 +13,6 @@
if [ "${dirname%$tmp}" != "/" ]; then
dirname=$PWD/$dirname
fi
-LD_LIBRARY_PATH=$dirname/.lib
+LD_LIBRARY_PATH=/usr/lib/mom
export LD_LIBRARY_PATH
-$dirname/.$appname-bin "$@"
+$dirname/$appname-bin "$@"
Code : Tout sélectionner
└── usr
├── bin
│ ├── mom
│ └── mom-bin
├── lib
│ └── mom
│ ├── libcrypto.so.4 -> /usr/lib/libcrypto.so
│ ├── libqwt.so.6
│ └── libssl.so.4 -> /usr/lib/libssl.so
└── share
├── applications
│ └── mom.desktop
├── licenses
│ └── mom
│ └── LICENSE
└── pixmaps
└── mom.xpm
¹ Liste des bibliothèques fournies par OVH :
Code : Tout sélectionner
~/build/mom/src/MoM/.lib $ ls -1
libcrypto.so.4 −>[ln]
libgcc_s.so.1
libgssapi_krb5.so.2
libk5crypto.so.3
libkrb5.so.3
libqjson.so.0
libQtCore.so.4
libQtGui.so.4
libQtNetwork.so.4
libQtSvg.so.4
libqwt.so.6 −> intégré
libssl.so.4 −>[ln]
libstdc++.so.6