Come suggerito da Gimmy qui mi sono messo all'opera per il PKGBUILD di ermesms-git.
- Codice: Seleziona tutto
# Contributor=
# Maintainer =
pkgname=ermeSms-git
pkgver=20120629
pkgrel=1
pkgdesc="A program to send SMS via web (Fork of MoioSMS)"
url="https://github.com/thomasbertani/ermeSms"
license=('GPL2')
arch=('any')
depends=('python-pycurl' 'pyqt' 'python2-psutil' 'wxpython')
makedepends=('git')
optdepends=('gocr: for automatic captcha recognition'
'graphicsmagick: for automatic captcha recognition'
'ocrad: for automatic captcha recognition'
'psutils: A set of postscript utilities')
install='ermeSms.install'
source=('ermeSms.install'
'ermeSms.desktop'
'ermeSms.xpm')
md5sums=('e0423cd8d1474452f456198bee5efc9d'
'6ccc97e95109f3cba672f6e93ada8344'
'eff37215b8657cec67853bf3b420aaed')
_gitroot=https://github.com/thomasbertani/ermeSms.git
_gitname=ermeSms
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [[ -d "$_gitname" ]]; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
msg "Starting build..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
}
package() {
cd "$srcdir/$_gitname-build"
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/python2.4$|#!/usr/bin/python2|" \
$(find . -name '*.py')
install -Dm755 ermeSms.py \
${pkgdir}/usr/share/ermeSms/ermeSms.py
install -Dm755 importer.py \
${pkgdir}/usr/share/ermeSms/importer.py
install -d ${pkgdir}/usr/lib/python2.7
cp -rf ermesms ${pkgdir}/usr/lib/python2.7/
# License
install -Dm644 ${srcdir}/$_gitname-build/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
# install icon and desktop file
install -Dm644 ${srcdir}/ermeSms.xpm \
${pkgdir}/usr/share/pixmaps/ermesms.xpm
install -Dm644 ${srcdir}/ermeSms.desktop \
${pkgdir}/usr/share/applications/ermeSms.desktop
# symlinks to ermesms
install -d ${pkgdir}/usr/bin/
ln -sf /usr/share/ermeSms/ermeSms.py ${pkgdir}/usr/bin/ermesms
ln -sf /usr/share/ermeSms/ermeSms.py ${pkgdir}/usr/bin/sms
}
# vim:set ts=2 sw=2 et:
Ho cercato di seguire le linee guida per la creazione del PKGBUILD ma non so se mi è riuscito bene o male, quindi attendo i vostri suggerimenti.
A parte questo ci sono dei problemi per le dipendenze. Ho installato (e messo in depends) quelle riportate nel file README del progetto, ma temo no bastino perché quando lancio l'eseguibile mi da
- Codice: Seleziona tutto
Traceback (most recent call last):
File "/usr/bin/ermesms", line 20, in <module>
from ermesms.plugins.UI import UI
ImportError: No module named ermesms.plugins.UI
Se invece lancio quello del progetto (contenuto in .../src/ermeSms-build) l'errore è
- Codice: Seleziona tutto
Traceback (most recent call last):
File "./ermeSms.py", line 20, in <module>
from ermesms.plugins.UI import UI
File ".../src/ermeSms-build/ermesms/plugins/UI.py", line 3, in <module>
from ermesms.Plugin import Plugin
File ".../src/ermeSms-build/ermesms/Plugin.py", line 3, in <module>
from ermesms.lib.singletonmixin import Singleton
File ".../src/ermeSms-build/ermesms/lib/singletonmixin.py", line 64
raise SingletonException, 'Can not override __new__ in a Singleton'
^
SyntaxError: invalid syntax
Grazie a chi mi aiuterà