Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (37 sloc) 1.17 KB
# Maintainer: ArchStrike <team@archstrike.org>
buildarch=1
pkgname=callerpy-git
pkgver=20140518.r40
pkgrel=6
groups=('archstrike' 'archstrike-scanners')
pkgdesc="Truecaller Name Retriever"
arch=('any')
url='https://github.com/Logic-gate/callerpy'
license=('GPL2')
depends=('python2-beautifulsoup4' 'python2-mechanize')
makedepends=('git')
provides=('callerpy')
replaces=('callerypy-git')
conflicts=('callerypy-git')
source=("${pkgname}::git+https://github.com/Logic-gate/callerpy.git")
sha512sums=('SKIP')
pkgver() {
cd "${pkgname}" || exit
printf "%s.r%s" "$(git show -s --format=%ci master | sed 's/\ .*//g;s/-//g')" "$(git rev-list --count HEAD)"
}
prepare(){
grep -iRl 'python' "${srcdir}/${pkgname}" | xargs sed -i 's|#!.*/usr/bin/python|#!/usr/bin/python2|;s|#!.*/usr/bin/env python$|#!/usr/bin/env python2|'
}
package() {
cd "${pkgname}" || exit
# Make base directories.
install -dm755 "${pkgdir}/usr/share/callerpy"
install -dm755 "${pkgdir}/usr/bin"
cp -a --no-preserve=ownership ./* "${pkgdir}/usr/share/callerpy"
cat > "${pkgdir}/usr/bin/callerpy" << EOF
#!/bin/sh
cd /usr/share/callerpy
python2 callerpy.py "\$@"
EOF
chmod +x "${pkgdir}/usr/bin/callerpy"
}
You can’t perform that action at this time.