diff options
author | dakataca | 2023-10-02 17:06:15 -0500 |
---|---|---|
committer | dakataca | 2023-10-02 17:06:15 -0500 |
commit | 3f32e50fcecde025e0777f77fd5188323707ca14 (patch) | |
tree | 1b55b29ba938210a823140bf33d097e9fa77e870 | |
parent | 32e03883cd7a133fb97acb45ae168500f8498e03 (diff) | |
download | aur-3f32e50fcecde025e0777f77fd5188323707ca14.tar.gz |
Mejoradas variables y .
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 72 |
2 files changed, 45 insertions, 29 deletions
@@ -5,7 +5,7 @@ pkgbase = pseint url = https://sourceforge.net/projects/pseint arch = x86_64 license = GPL2 - depends = gendesk + makedepends = gendesk depends = wxwidgets-gtk3 conflicts = pseint-bin noextract = creator.psz @@ -1,5 +1,6 @@ # Maintainer: dakataca <馃惉danieldakataca@gmail.com> # Contributor: Cristophero <cristophero.alvarado@gmail.com> + pkgname='pseint' pkgver=20230517 pkgrel=1 @@ -8,64 +9,79 @@ arch=('x86_64') url='https://sourceforge.net/projects/pseint' license=('GPL2') conflicts=('pseint-bin') -depends=('gendesk' 'wxwidgets-gtk3') +makedepends=("gendesk") +depends=('wxwidgets-gtk3') noextract=(creator.psz) -source=("https://netactuate.dl.sourceforge.net/project/${pkgname}/${pkgver}/${pkgname}-src-${pkgver}.tgz") +source=("https://netactuate.dl.sourceforge.net/project/$pkgname/$pkgver/$pkgname-src-$pkgver.tgz") sha256sums=('f3373b0ad0d0f518d72c05504e282cb4fa9d0c9b11f1f7c1a29c4117354ff9e2') # 'makepkg -g' to generate it. + # Funci贸n 'prepare': Prepara el entorno antes de compilar el paquete. prepare(){ - cd ${pkgname} + cd $pkgname # Utilidad 'gendesk' para generar el archivo .desktop. gendesk -f -n \ - --pkgname="${pkgname}" \ - --pkgdesc="${pkgdesc}" \ - --name="${pkgname}" \ - --genericname="${pkgname}" \ - --comment="${pkgdesc}" \ - --exec="${pkgname}" \ - --path="/opt/${pkgname}" \ - --icon="${pkgname}" \ + --pkgname="$pkgname" \ + --pkgdesc="$pkgdesc" \ + --name="$pkgname" \ + --genericname="$pkgname" \ + --comment="$pkgdesc" \ + --exec="$pkgname" \ + --path="/opt/$pkgname" \ + --icon="$pkgname" \ --categories='Development,Education' } + # Funci贸n 'pkgver': Devuelve la versi贸n del paquete. pkgver(){ - cd ${pkgname} + cd $pkgname cat "bin/version" } + # Funci贸n 'build': Compila el paquete. build(){ - cd ${pkgname} - # Obtiene la versi贸n de wx-config. + cd $pkgname + + # Obtener la versi贸n de wx-config. local -r wxconfig_version=$(wx-config --version | sed -E 's/([0-9]\.[0-9])(\.[0-9])*/\1/') - # Reemplaza la versi贸n de wx-config en los archivos Makefile. + + # Reemplazar la versi贸n de wx-config en los archivos Makefile. sed -Ei \ - "s/(--version=)[0-9](\.[0-9])*/\1${wxconfig_version}/g ; \ + "s/(--version=)[0-9](\.[0-9])*/\1$wxconfig_version/g ; \ s,bin(/bin),\1," \ - ${srcdir}/${pkgname}/ps{eval,term,draw{E,3}}/Makefile - # Compila el paquete con la opci贸n ARCH=lnx, para la arquitectura linux. + $srcdir/$pkgname/ps{eval,term,draw{E,3}}/Makefile + + # Compilar el paquete con la opci贸n ARCH=lnx, para la arquitectura linux. make ARCH=lnx - } +} + # Funci贸n 'package': Empaqueta los archivos compilados en el paquete final. package(){ - cd "${pkgname}" + cd "$pkgname" + # Crear ruta de destino transitoria. - mkdir -p ${pkgdir}/opt/${pkgname} + mkdir -p $pkgdir/opt/$pkgname + # Copiar el contenido compilado a la ruta de destino transitoria. - cp -rv bin/* ${pkgdir}/opt/${pkgname} - # Instala el archivo .desktop en la ubicaci贸n (-t) adecuada. - install -Dvm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications/" - # Instala el archivo de licencia en la ubicaci贸n adecuada. - install -Dvm644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - # Crea un archivo ejecutable en la ubicaci贸n /usr/bin/${pkgname} que ejecuta el programa wxPSeInt(pseint). - install -Dvm755 <(echo -e '#!/usr/bin/env bash\n/opt/pseint/wxPSeInt') ${pkgdir}/usr/bin/${pkgname} + cp -rv bin/* $pkgdir/opt/$pkgname + + # Instalar el archivo .desktop en la ubicaci贸n (-t) adecuada. + install -Dvm644 "$pkgname.desktop" -t "$pkgdir/usr/share/applications/" + + # Instalar el archivo de licencia en la ubicaci贸n adecuada. + install -Dvm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # Crear un archivo ejecutable en /usr/bin/$pkgname que ejecuta el programa wxPSeInt(pseint). + install -Dvm755 <(echo -e '#!/usr/bin/env bash\n/opt/pseint/wxPSeInt') $pkgdir/usr/bin/$pkgname } + ## Test # rm -rf pseint-* src/ pkg/ +# makepkg --printsrcinfo > .SRCINFO ## References # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=densify |