summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 878c0aeac7b692dcfd43d423d4c886d2f40f56ff (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
49
50
51
52
53
54
55
56
57
# Maintainer: dakataca <🐬danieldakataca@gmail.com>
# Contributor: Cristophero <cristophero.alvarado@gmail.com>
pkgname=pseint-bin
_pkgname=${pkgname%-*}
pkgver=20210609
pkgrel=1
pkgdesc="A tool for learning programming basis with a simple spanish pseudocode"
arch=('x86_64')
url='http://pseint.sourceforge.net'
license=('GPL2')
conflicts=('pseint')
depends=('gendesk' 'wxwidgets-gtk3')
noextract=(creator.psz)
source=("${_pkgname}-${pkgver}.tgz::https://cfhcable.dl.sourceforge.net/project/${_pkgname}/${pkgver}/${_pkgname}-l64-${pkgver}.tgz")
sha256sums=('a5df4e147c529e3da509b30dee02791642c32cb3b5bbbc6cd3cd7594f10cb9f4')  # 'makepkg -g' to generate it.

prepare(){

    cd ${_pkgname}
    gendesk -f -n \
        --pkgname="${_pkgname}" \
        --pkgdesc="${pkgdesc}" \
        --name="${_pkgname}" \
        --genericname="${_pkgname}" \
        --comment="${pkgdesc}" \
        --exec="${_pkgname}" \
        --path="/opt/${_pkgname}" \
        --icon="${_pkgname}" \
        --categories='Development,Education'
}

pkgver(){

    cd ${_pkgname}
    cat version
}

package(){

    cd ${_pkgname}
    mkdir -p ${pkgdir}/opt/${_pkgname}
    cp -rv . ${pkgdir}/opt/${_pkgname}

    install -Dvm644 "${_pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dvm644 "imgs/icon.icns" "${pkgdir}/usr/share/pixmaps/${_pkgname}.icns"
    install -Dvm755 <(echo -e '#!/usr/bin/env bash\n/opt/pseint/wxPSeInt') ${pkgdir}/usr/bin/${_pkgname}
}

## Test:
#  rm -rf pseint-* src/ pkg/

## References
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=densify
# https://wiki.archlinux.org/title/Desktop_entries#How_to_use
# https://sourceforge.net/projects/pseint/files/
# https://sourceforge.net/projects/pseint/files/20210609/pseint-l64-20210609.tgz/download
# https://www.gnu.org/software/bash/manual/html_node/Process-Substitution.html