summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9a676d08ec449ce167d539fbfaae3922f5fa90a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Maintainer: William Gathoye <william + aur at gathoye dot be>
# Contributor:

pkgname=mimipenguin-git
pkgver=r102.d69cc00
pkgrel=1
pkgdesc="A tool to dump the login password from the current linux user"
arch=('any')

url="https://github.com/huntergregal/mimipenguin"
license=('CCPL:by')

makedepends=(
  'git'
)
depends=(
    'python'
)
provides=('mimipenguin')
conflicts=('mimipenguin')

source=('git+https://github.com/huntergregal/mimipenguin')
sha512sums=('SKIP')

# Get the number of revisions since beginning of the history
# src.: https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git
pkgver() {
    cd "${pkgname%-git}"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {

    cd "${pkgname%-git}"

    # Force use of python3.
    sed -i 's/python2 -c "import crypt; print crypt.crypt($CRYPT)"/python -c "import crypt; print(crypt.crypt($CRYPT))"/g' mimipenguin.sh
}

package() {
    # When entering here, we are in the src directory, go in the cloned
    # mimipenguin directory.
    cd "${pkgname%-git}"

    install -Dm644 LICENSE "$pkgdir/usr/share/license/mimipenguin/LICENSE"
    install -Dm755 mimipenguin.py "$pkgdir/usr/bin/mimipenguin.py"
    install -Dm755 mimipenguin.sh "$pkgdir/usr/bin/mimipenguin.sh"
}